From ce6eb9b7ac22891112a95d057afe4b092bc1750b Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 8 May 2015 19:00:01 -0400 Subject: [PATCH] this fixes logger button in popup --- src/js/messaging.js | 9 --------- src/js/popup.js | 2 -- src/logger-ui.html | 2 +- src/popup.html | 2 +- 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/js/messaging.js b/src/js/messaging.js index 8ba9f40d1..7d7d494d5 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -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 ) { diff --git a/src/js/popup.js b/src/js/popup.js index 6feb857e6..c5967ab29 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -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; diff --git a/src/logger-ui.html b/src/logger-ui.html index b17406db4..143a857f7 100644 --- a/src/logger-ui.html +++ b/src/logger-ui.html @@ -4,7 +4,7 @@ -uMatrix log + diff --git a/src/popup.html b/src/popup.html index c54bd6e1a..1f6208a00 100644 --- a/src/popup.html +++ b/src/popup.html @@ -18,7 +18,7 @@

   - +

?