mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-05-19 03:33:17 +12:00
code review: typos
This commit is contained in:
parent
b627b62f6c
commit
06436c61fc
|
@ -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 = {
|
||||
|
|
|
@ -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 = '';
|
||||
|
|
|
@ -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) {
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue