diff options
author | Alessio Vanni <vannilla@firemail.cc> | 2019-02-20 00:02:26 +0100 |
---|---|---|
committer | Alessio Vanni <vannilla@firemail.cc> | 2019-02-20 00:02:26 +0100 |
commit | b3863f5c4984ae814eeb32407ae5899693b735ab (patch) | |
tree | 097e3320401da482117c07a2f08d98297340abd6 /js/tab.js | |
parent | a35201f45aa8e7735f668d1bb349fca3b1c3cc1e (diff) | |
download | ematrix-b3863f5c4984ae814eeb32407ae5899693b735ab.tar.lz ematrix-b3863f5c4984ae814eeb32407ae5899693b735ab.tar.xz ematrix-b3863f5c4984ae814eeb32407ae5899693b735ab.zip |
Change all names from μMatrix to ηMatrix
Hopefully I caught all of them!
Diffstat (limited to 'js/tab.js')
-rw-r--r-- | js/tab.js | 58 |
1 files changed, 29 insertions, 29 deletions
@@ -29,13 +29,13 @@ /******************************************************************************/ -var µm = µMatrix; +var ηm = ηMatrix; // https://github.com/gorhill/httpswitchboard/issues/303 // Some kind of trick going on here: // Any scheme other than 'http' and 'https' is remapped into a fake -// URL which trick the rest of µMatrix into being able to process an -// otherwise unmanageable scheme. µMatrix needs web page to have a proper +// URL which trick the rest of ηMatrix into being able to process an +// otherwise unmanageable scheme. ηMatrix needs web page to have a proper // hostname to work properly, so just like the 'behind-the-scene' // fake domain name, we map unknown schemes into a fake '{scheme}-scheme' // hostname. This way, for a specific scheme you can create scope with @@ -44,7 +44,7 @@ var µm = µMatrix; /******************************************************************************/ /******************************************************************************/ -µm.normalizePageURL = function(tabId, pageURL) { +ηm.normalizePageURL = function(tabId, pageURL) { if ( vAPI.isBehindTheSceneTabId(tabId) ) { return 'http://' + this.behindTheSceneScope + '/'; } @@ -140,7 +140,7 @@ housekeep itself. */ -µm.tabContextManager = (function() { +ηm.tabContextManager = (function() { var tabContexts = Object.create(null); // https://github.com/chrisaljoudi/uBlock/issues/1001 @@ -227,7 +227,7 @@ housekeep itself. if ( i < this.stack.length ) { this.stack.length = i; this.update(); - µm.bindTabToPageStats(this.tabId, 'newURL'); + ηm.bindTabToPageStats(this.tabId, 'newURL'); } }; @@ -251,11 +251,11 @@ housekeep itself. return; } this.rawURL = this.stack[this.stack.length - 1].url; - this.normalURL = µm.normalizePageURL(this.tabId, this.rawURL); - this.scheme = µm.URI.schemeFromURI(this.rawURL); - this.rootHostname = µm.URI.hostnameFromURI(this.normalURL); - this.rootDomain = µm.URI.domainFromHostname(this.rootHostname) || this.rootHostname; - this.secure = µm.URI.isSecureScheme(this.scheme); + this.normalURL = ηm.normalizePageURL(this.tabId, this.rawURL); + this.scheme = ηm.URI.schemeFromURI(this.rawURL); + this.rootHostname = ηm.URI.hostnameFromURI(this.normalURL); + this.rootDomain = ηm.URI.domainFromHostname(this.rootHostname) || this.rootHostname; + this.secure = ηm.URI.isSecureScheme(this.scheme); }; // Called whenever a candidate root URL is spotted for the tab. @@ -280,7 +280,7 @@ housekeep itself. this.commitTimer = vAPI.setTimeout(this.onCommit.bind(this), 1000); } this.update(); - µm.bindTabToPageStats(this.tabId, context); + ηm.bindTabToPageStats(this.tabId, context); }; // These are to be used for the API of the tab context manager. @@ -342,9 +342,9 @@ housekeep itself. var entry = new TabContext(vAPI.noTabId); entry.stack.push(new StackEntry('', true)); entry.rawURL = ''; - entry.normalURL = µm.normalizePageURL(entry.tabId); - entry.rootHostname = µm.URI.hostnameFromURI(entry.normalURL); - entry.rootDomain = µm.URI.domainFromHostname(entry.rootHostname) || entry.rootHostname; + entry.normalURL = ηm.normalizePageURL(entry.tabId); + entry.rootHostname = ηm.URI.hostnameFromURI(entry.normalURL); + entry.rootDomain = ηm.URI.domainFromHostname(entry.rootHostname) || entry.rootHostname; })(); // https://github.com/gorhill/uMatrix/issues/513 @@ -356,7 +356,7 @@ housekeep itself. var tabId = details.tabId; if ( vAPI.isBehindTheSceneTabId(tabId) ) { return; } push(tabId, details.url, 'newURL'); - µm.updateBadgeAsync(tabId); + ηm.updateBadgeAsync(tabId); }; // https://github.com/gorhill/uMatrix/issues/872 @@ -372,7 +372,7 @@ housekeep itself. }; vAPI.tabs.onClosed = function(tabId) { - µm.unbindTabFromPageStats(tabId); + ηm.unbindTabFromPageStats(tabId); var entry = tabContexts[tabId]; if ( entry instanceof TabContext ) { entry.destroy(); @@ -393,7 +393,7 @@ vAPI.tabs.registerListeners(); // Create an entry for the tab if it doesn't exist -µm.bindTabToPageStats = function(tabId, context) { +ηm.bindTabToPageStats = function(tabId, context) { this.updateBadgeAsync(tabId); // Do not create a page store for URLs which are of no interests @@ -454,7 +454,7 @@ vAPI.tabs.registerListeners(); /******************************************************************************/ -µm.unbindTabFromPageStats = function(tabId) { +ηm.unbindTabFromPageStats = function(tabId) { // Never unbind behind-the-scene page store. if ( vAPI.isBehindTheSceneTabId(tabId) ) { return; @@ -489,7 +489,7 @@ vAPI.tabs.registerListeners(); /******************************************************************************/ -µm.resurrectPageStore = function(tabId, pageURL) { +ηm.resurrectPageStore = function(tabId, pageURL) { if ( this.pageStoreCemetery.hasOwnProperty(tabId) === false ) { return null; } @@ -516,7 +516,7 @@ vAPI.tabs.registerListeners(); /******************************************************************************/ -µm.incineratePageStore = function(tabId, pageURL) { +ηm.incineratePageStore = function(tabId, pageURL) { if ( this.pageStoreCemetery.hasOwnProperty(tabId) === false ) { return; } @@ -542,18 +542,18 @@ vAPI.tabs.registerListeners(); /******************************************************************************/ -µm.pageStoreFromTabId = function(tabId) { +ηm.pageStoreFromTabId = function(tabId) { return this.pageStores[tabId] || null; }; // Never return null -µm.mustPageStoreFromTabId = function(tabId) { +ηm.mustPageStoreFromTabId = function(tabId) { return this.pageStores[tabId] || this.pageStores[vAPI.noTabId]; }; /******************************************************************************/ -µm.forceReload = function(tabId, bypassCache) { +ηm.forceReload = function(tabId, bypassCache) { vAPI.tabs.reload(tabId, bypassCache); }; @@ -565,7 +565,7 @@ vAPI.tabs.registerListeners(); // incrementally, as chromium overwrite the icon at some point without // notifying me, and this causes internal cached state to be out of sync. -µm.updateBadgeAsync = (function() { +ηm.updateBadgeAsync = (function() { var tabIdToTimer = Object.create(null); var updateBadge = function(tabId) { @@ -604,7 +604,7 @@ vAPI.tabs.registerListeners(); /******************************************************************************/ -µm.updateTitle = (function() { +ηm.updateTitle = (function() { var tabIdToTimer = Object.create(null); var tabIdToTryCount = Object.create(null); var delay = 499; @@ -623,7 +623,7 @@ vAPI.tabs.registerListeners(); return false; } tabIdToTryCount[tabId] = count - 1; - tabIdToTimer[tabId] = vAPI.setTimeout(updateTitle.bind(µm, tabId), delay); + tabIdToTimer[tabId] = vAPI.setTimeout(updateTitle.bind(ηm, tabId), delay); return true; }; @@ -677,11 +677,11 @@ vAPI.tabs.registerListeners(); var cleanup = function() { var vapiTabs = vAPI.tabs; - var tabIds = Object.keys(µm.pageStores).sort(); + var tabIds = Object.keys(ηm.pageStores).sort(); var checkTab = function(tabId) { vapiTabs.get(tabId, function(tab) { if ( !tab ) { - µm.unbindTabFromPageStats(tabId); + ηm.unbindTabFromPageStats(tabId); } }); }; |