加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
fixbug429166FocusLockOnCross-windowDrag-and-dropOfTextToSearchbar.uc.js 785 Bytes
一键复制 编辑 原始数据 按行查看 历史
alice0775 提交于 2011-06-11 03:05 . first commit
// ==UserScript==
// @name hack to fix bug 429166
// @namespace
// @description Focus lock on cross-window drag-and-drop of text to search bar
// @include main
// @compatibility Firefox 3.0
// @author
// @version
// @Note
// ==/UserScript==
//Bug 429166 - Focus lock on cross-window drag-and-drop of text to search bar
(function(){
var searchBar = document.getElementById("searchbar");
var func = searchBar.doSearch.toString();
func = func.replace(
'openUILinkIn(submission.uri.spec, aWhere, null, submission.postData);',
<><![CDATA[
focus();
$&
]]></>
);
func = func.replace(
'if (shortcutURL && shortcutURL != aData) {',
<><![CDATA[
focus();
$&
]]></>
);
eval("searchBar.doSearch = " + func);
})();
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化