|
阅读:2126回复:1
FF 45 uc脚本失效 地址栏输入网址在新标签打开
更新到FF 45 beta后,地址栏输入的网址在新标签打开的uc脚本功能失效,地址栏输入网址后,按回车没反应,不会打开该网址的页面,或者在地址栏 右键选粘贴并转到,不会打开该网址的页面。哪位大神看一下这脚本还能救不?谢谢!
// ==UserScript==
// @name NewTabPlus.uc.js
// @description 新しいタブで開く(空白タブを利用)
// @include main
// @include chrome://browser/content/bookmarks/bookmarksPanel.xul
// @include chrome://browser/content/history/history-panel.xul
// @include chrome://browser/content/places/places.xul
// @compatibility Firefox 20
// ==/UserScript==
(function() {
// 新标签打开:书签、历史
try {
eval('openLinkIn = ' + openLinkIn.toString().
replace('w.gBrowser.selectedTab.pinned', '(!w.isTabEmpty(w.gBrowser.selectedTab) || $&)').
replace(/&&\s+w\.gBrowser\.currentURI\.host != uriObj\.host/, ''));
}catch(e){}
/* 地址栏 */
try {
location == 'chrome://browser/content/browser.xul' &&
eval('gURLBar.handleCommand = ' + gURLBar.handleCommand.toString().
replace(/^\s*(load.+);/gm, '\
if(/^javascript:/.test(url) || isTabEmpty(gBrowser.selectedTab)){\
loadCurrent();\
}else{\
this.handleRevert();\
gBrowser.loadOneTab(url,{postData:postData,inBackground:false,allowThirdPartyFixup:true});\
}\
'));
}catch(e){}
/*主页新标签打开*/
try {
eval("BrowserGoHome = " + BrowserGoHome.toString().replace(
/switch \(where\) {/, "where = (gBrowser.currentURI.spec!="
+"'about:blank' || gBrowser.webProgress.isLoadingDocument"+
") ? 'tab' : 'current'; $&"));
}catch(e){}
/* 搜索栏: Dieser Abschnitt ist noch nicht für den Fuchs 20 geändert! */
try {
var searchbar = document.getElementById("searchbar");
eval("searchbar.handleSearchCommand="+searchbar.handleSearchCommand.
toString().replace(/this.doSearch\(textValue, where\);/,
"if (!gBrowser.webProgress.isLoadingDocument && gBrowser.curren"
+"tURI.spec=='about:blank') where='current'; else where='tab'; "
+"$&"));
}catch(e){}
//右键关闭标签页
gBrowser.mTabContainer.addEventListener("click",
function(e) {
if (e.target.localName == "tab" && e.button == 2 && !e.ctrlKey) {
gBrowser.removeTab(e.target);
e.stopPropagation();
e.preventDefault();
}
},
false);
})(); |
|
|
1楼#
发布于:2016-02-14 19:09
已找到原因 这货惹得祸
图片:QQ截图20160214190625.png |
|
