diff --git a/src/js/messaging.js b/src/js/messaging.js index b8295f7..9a645dc 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -944,8 +944,8 @@ var onMessage = function(request, sender, callback) { for ( let entry of µm.pageStores ) { let tabId = entry[0]; let pageStore = entry[1]; - if ( pageStore.rawUrl.startsWith(loggerURL) ) { continue; } - pageStores.push([ tabId, pageStore.title || pageStore.rawUrl ]); + if ( pageStore.rawURL.startsWith(loggerURL) ) { continue; } + pageStores.push([ tabId, pageStore.title || pageStore.rawURL ]); } } response = { diff --git a/src/js/pagestats.js b/src/js/pagestats.js index f9c8e7b..46c951b 100644 --- a/src/js/pagestats.js +++ b/src/js/pagestats.js @@ -110,7 +110,7 @@ PageStore.prototype = { init: function(tabContext) { this.tabId = tabContext.tabId; - this.rawUrl = tabContext.rawURL; + this.rawURL = tabContext.rawURL; this.pageUrl = tabContext.normalURL; this.pageHostname = tabContext.rootHostname; this.pageDomain = tabContext.rootDomain; @@ -135,7 +135,7 @@ PageStore.prototype = { dispose: function() { this.tabId = ''; - this.rawUrl = ''; + this.rawURL = ''; this.pageUrl = ''; this.pageHostname = ''; this.pageDomain = ''; diff --git a/src/js/tab.js b/src/js/tab.js index be62c1f..2424349 100644 --- a/src/js/tab.js +++ b/src/js/tab.js @@ -50,11 +50,11 @@ var µm = µMatrix; // If the URL is that of our "blocked page" document, return the URL of // the blocked page. - if ( pageURL.lastIndexOf(vAPI.getURL('main-blocked.html'), 0) === 0 ) { - var matches = /main-blocked\.html\?details=([^&]+)/.exec(pageURL); + if ( pageURL.startsWith(vAPI.getURL('main-blocked.html')) ) { + let matches = /main-blocked\.html\?details=([^&]+)/.exec(pageURL); if ( matches && matches.length === 2 ) { try { - var details = JSON.parse(atob(matches[1])); + let details = JSON.parse(atob(matches[1])); pageURL = details.url; } catch (e) { }