This commit is contained in:
gorhill 2016-09-16 17:41:17 -04:00
parent cc36a6896d
commit 269c35a04a
5 changed files with 16 additions and 5 deletions

View File

@ -50,6 +50,7 @@ return {
userSettings: {
advancedUserEnabled: false,
alwaysDetachLogger: false,
autoUpdate: true,
cloudStorageEnabled: false,
collapseBlocked: true,

View File

@ -139,7 +139,7 @@ var onMessage = function(request, sender, callback) {
break;
case 'gotoURL':
vAPI.tabs.open(request.details);
µb.openNewTab(request.details);
break;
case 'reloadTab':

View File

@ -571,8 +571,6 @@ var gotoURL = function(ev) {
ev.preventDefault();
var rel = this.getAttribute('rel') || '';
messaging.send(
'popupPanel',
{
@ -581,7 +579,7 @@ var gotoURL = function(ev) {
url: this.getAttribute('href'),
select: true,
index: -1,
popup: rel === 'popup' && ev.shiftKey
shiftKey: ev.shiftKey
}
}
);

View File

@ -210,3 +210,15 @@
};
/******************************************************************************/
µBlock.openNewTab = function(details) {
if ( details.url.startsWith('logger-ui.html') ) {
if ( details.shiftKey ) {
this.userSettings.alwaysDetachLogger = !this.userSettings.alwaysDetachLogger;
}
details.popup = this.userSettings.alwaysDetachLogger;
}
vAPI.tabs.open(details);
};
/******************************************************************************/

View File

@ -18,7 +18,7 @@
<p class="statName">
<span data-i18n="popupBlockedOnThisPagePrompt">&nbsp;</span>&ensp;
<span id="gotoPick" class="fa tool" data-i18n-tip="popupTipPicker">&#xf1fb;</span>&ensp;
<a href="logger-ui.html" rel="popup" class="fa tool enabled" data-i18n-tip="popupTipLog">&#xf022;</a>
<a href="logger-ui.html" class="fa tool enabled" data-i18n-tip="popupTipLog">&#xf022;</a>
</p>
<p class="statValue" id="page-blocked">?</p>
<div id="refresh" class="fa">&#xf021;</div>