Browse Source

code review: typos

pull/2/head
Raymond Hill 7 years ago
parent
commit
06436c61fc
No known key found for this signature in database GPG Key ID: 25E1490B761470C2
  1. 4
      src/js/messaging.js
  2. 4
      src/js/pagestats.js
  3. 6
      src/js/tab.js

4
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 = {

4
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 = '';

6
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) {
}

Loading…
Cancel
Save