this fixes logger button in popup

This commit is contained in:
gorhill 2015-05-08 19:00:01 -04:00
parent f9652b5f57
commit ce6eb9b7ac
4 changed files with 2 additions and 13 deletions

View file

@ -246,7 +246,6 @@ var getStats = function(tabId, tabTitle) {
r.contentLastModified = pageStore.contentLastModified;
r.firewallRules = getFirewallRules(tabContext.rootHostname, r.hostnameDict);
r.canElementPicker = tabContext.rootHostname.indexOf('.') !== -1;
r.canRequestLog = canRequestLog;
r.noPopups = µb.hnSwitches.evaluateZ('no-popups', tabContext.rootHostname);
r.noStrictBlocking = µb.hnSwitches.evaluateZ('no-strict-blocking', tabContext.rootHostname);
r.noCosmeticFiltering = µb.hnSwitches.evaluateZ('no-cosmetic-filtering', tabContext.rootHostname);
@ -262,15 +261,9 @@ var getStats = function(tabId, tabTitle) {
return r;
};
// Not the most elegant approach, but it does keep everything simple:
// This will be set by getTargetTabId() and used by getStats().
var canRequestLog = true;
/******************************************************************************/
var getTargetTabId = function(tab) {
canRequestLog = true;
if ( !tab ) {
return '';
}
@ -280,8 +273,6 @@ var getTargetTabId = function(tab) {
// This allows a user to actually modify filtering profile for
// behind-the-scene requests.
canRequestLog = false;
// Extract the target tab id from the URL
var matches = tab.url.match(/[\?&]tabId=([^&]+)/);
if ( matches && matches.length === 2 ) {

View file

@ -392,8 +392,6 @@ var renderPopup = function() {
);
// If you think the `=== true` is pointless, you are mistaken
uDom('#gotoLog').toggleClass('enabled', popupData.canRequestLog === true)
.attr('href', 'logger-ui.html');
uDom('#gotoPick').toggleClass('enabled', popupData.canElementPicker === true);
var text;

View file

@ -4,7 +4,7 @@
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/common.css">
<link rel="stylesheet" type="text/css" href="css/logger-ui.css">
<title>uMatrix log</title>
<title data-i18n="statsPageName"></title>
</head>
<body class="compactView f">

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="#" target="_blank" id="gotoLog" class="fa tool" data-i18n-tip="popupTipLog">&#xf022;</a>
<a href="logger-ui.html" target="_blank" id="gotoLog" class="fa tool enabled" data-i18n-tip="popupTipLog">&#xf022;</a>
</p>
<p class="statValue" id="page-blocked">?</p>
<p class="statName" data-i18n="popupBlockedSinceInstallPrompt">&nbsp;</p>