1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-04 16:47:15 +02:00

work around for #2734 until fixed in Nightly

This commit is contained in:
gorhill 2017-07-03 09:51:34 -04:00
parent 20346ef0ed
commit a8382e821d
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
4 changed files with 15 additions and 7 deletions

View File

@ -478,12 +478,12 @@ vAPI.tabs.open = function(details) {
var targetURLWithoutHash = pos === -1 ? targetURL : targetURL.slice(0, pos);
chrome.tabs.query({ url: targetURLWithoutHash }, function(tabs) {
if ( chrome.runtime.lastError ) { /* noop */ }
var tab = tabs[0];
if ( !tab ) {
wrapper();
return;
}
var _details = {
active: true,
url: undefined

View File

@ -14,19 +14,16 @@
"commands": {
"launch-element-zapper": {
"suggested_key": {
"default": "Alt+Z"
},
"description": "__MSG_popupTipZapper__"
},
"launch-element-picker": {
"suggested_key": {
"default": "Alt+X"
},
"description": "__MSG_popupTipPicker__"
},
"launch-logger": {
"suggested_key": {
"default": "Alt+L"
},
"description": "__MSG_popupTipLog__"
}

View File

@ -999,7 +999,6 @@ var onHideTooltip = function() {
uDom('#switch').on('click', toggleNetFilteringSwitch);
uDom('#gotoZap').on('click', gotoZap);
uDom('#gotoPick').on('click', gotoPick);
uDom('a[href]').on('click', gotoURL);
uDom('h2').on('click', toggleFirewallPane);
uDom('#refresh').on('click', reloadTab);
uDom('.hnSwitch').on('click', toggleHostnameSwitch);
@ -1009,6 +1008,18 @@ var onHideTooltip = function() {
uDom('body').on('mouseenter', '[data-tip]', onShowTooltip)
.on('mouseleave', '[data-tip]', onHideTooltip);
// https://github.com/gorhill/uBlock/issues/2734
// Workaround until fixed in Firefox Nightly.
if ( typeof chrome.runtime.getBrowserInfo !== 'function' ) {
uDom('a[href]').on('click', gotoURL);
} else {
chrome.runtime.getBrowserInfo().then(function(info) {
if ( info.name !== 'Firefox' ) {
uDom('a[href]').on('click', gotoURL);
}
});
}
})();
/******************************************************************************/

View File

@ -17,8 +17,8 @@
<p id="basicTools">
<span id="gotoZap" class="fa tool" data-i18n-tip="popupTipZapper" data-tip-position="under">&#xf0e7;</span>
<span id="gotoPick" class="fa tool" data-i18n-tip="popupTipPicker" data-tip-position="under">&#xf1fb;</span>
<a href="logger-ui.html" class="fa tool enabled" data-i18n-tip="popupTipLog" data-tip-position="under">&#xf022;</a>
<a href="dashboard.html" class="fa tool enabled" data-i18n-tip="popupTipDashboard" data-tip-position="under">&#xf085;</a>
<a href="logger-ui.html" class="fa tool enabled" data-i18n-tip="popupTipLog" data-tip-position="under" target="uBOLogger">&#xf022;</a>
<a href="dashboard.html" class="fa tool enabled" data-i18n-tip="popupTipDashboard" data-tip-position="under" target="uBODashboard">&#xf085;</a>
</p>
<h2 id="dfToggler" data-i18n="popupBlockedRequestPrompt">&nbsp;</h2>
<p class="statName">