aboutsummaryrefslogtreecommitdiffstats
path: root/js/cookies.js
diff options
context:
space:
mode:
authorAlessio Vanni <vannilla@firemail.cc>2019-02-20 00:02:26 +0100
committerAlessio Vanni <vannilla@firemail.cc>2019-02-20 00:02:26 +0100
commitb3863f5c4984ae814eeb32407ae5899693b735ab (patch)
tree097e3320401da482117c07a2f08d98297340abd6 /js/cookies.js
parenta35201f45aa8e7735f668d1bb349fca3b1c3cc1e (diff)
downloadematrix-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/cookies.js')
-rw-r--r--js/cookies.js44
1 files changed, 22 insertions, 22 deletions
diff --git a/js/cookies.js b/js/cookies.js
index 7626ad0..056744f 100644
--- a/js/cookies.js
+++ b/js/cookies.js
@@ -34,11 +34,11 @@
// Use cached-context approach rather than object-based approach, as details
// of the implementation do not need to be visible
-µMatrix.cookieHunter = (function() {
+ηMatrix.cookieHunter = (function() {
/******************************************************************************/
-var µm = µMatrix;
+var ηm = ηMatrix;
var recordPageCookiesQueue = new Map();
var removePageCookiesQueue = new Map();
@@ -62,7 +62,7 @@ CookieEntry.prototype.init = function(cookie) {
this.session = cookie.session;
this.anySubdomain = cookie.domain.charAt(0) === '.';
this.hostname = this.anySubdomain ? cookie.domain.slice(1) : cookie.domain;
- this.domain = µm.URI.domainFromHostname(this.hostname) || this.hostname;
+ this.domain = ηm.URI.domainFromHostname(this.hostname) || this.hostname;
this.path = cookie.path;
this.name = cookie.name;
this.value = cookie.value;
@@ -146,11 +146,11 @@ var cookieKeyFromCookie = function(cookie) {
};
var cookieKeyFromCookieURL = function(url, type, name) {
- var µmuri = µm.URI.set(url);
+ var ηmuri = ηm.URI.set(url);
var cb = cookieKeyBuilder;
- cb[0] = µmuri.scheme;
- cb[2] = µmuri.hostname;
- cb[3] = µmuri.path;
+ cb[0] = ηmuri.scheme;
+ cb[2] = ηmuri.hostname;
+ cb[3] = ηmuri.path;
cb[5] = type;
cb[7] = name;
return cb.join('');
@@ -215,7 +215,7 @@ var recordPageCookie = function(pageStore, cookieKey) {
var cookieEntry = cookieDict.get(cookieKey);
var pageHostname = pageStore.pageHostname;
- var block = µm.mustBlock(pageHostname, cookieEntry.hostname, 'cookie');
+ var block = ηm.mustBlock(pageHostname, cookieEntry.hostname, 'cookie');
cookieLogEntryBuilder[0] = cookieURLFromCookieEntry(cookieEntry);
cookieLogEntryBuilder[2] = cookieEntry.session ? 'session' : 'persistent';
@@ -227,7 +227,7 @@ var recordPageCookie = function(pageStore, cookieKey) {
// https://github.com/gorhill/httpswitchboard/issues/60
// Need to URL-encode cookie name
pageStore.recordRequest('cookie', cookieURL, block);
- µm.logger.writeOne(pageStore.tabId, 'net', pageHostname, cookieURL, 'cookie', block);
+ ηm.logger.writeOne(pageStore.tabId, 'net', pageHostname, cookieURL, 'cookie', block);
cookieEntry.usedOn.add(pageHostname);
@@ -238,7 +238,7 @@ var recordPageCookie = function(pageStore, cookieKey) {
if ( !block ) {
return;
}
- if ( !µm.userSettings.deleteCookies ) {
+ if ( !ηm.userSettings.deleteCookies ) {
return;
}
removeCookieAsync(cookieKey);
@@ -284,15 +284,15 @@ var chromeCookieRemove = function(cookieEntry, name) {
var template = success ? i18nCookieDeleteSuccess : i18nCookieDeleteFailure;
if ( removeCookieFromDict(sessionCookieKey) ) {
if ( success ) {
- µm.cookieRemovedCounter += 1;
+ ηm.cookieRemovedCounter += 1;
}
- µm.logger.writeOne('', 'info', 'cookie', template.replace('{{value}}', sessionCookieKey));
+ ηm.logger.writeOne('', 'info', 'cookie', template.replace('{{value}}', sessionCookieKey));
}
if ( removeCookieFromDict(persistCookieKey) ) {
if ( success ) {
- µm.cookieRemovedCounter += 1;
+ ηm.cookieRemovedCounter += 1;
}
- µm.logger.writeOne('', 'info', 'cookie', template.replace('{{value}}', persistCookieKey));
+ ηm.logger.writeOne('', 'info', 'cookie', template.replace('{{value}}', persistCookieKey));
}
};
@@ -329,7 +329,7 @@ var processPageRemoveQueue = function() {
// Effectively remove cookies.
var processRemoveQueue = function() {
- var userSettings = µm.userSettings;
+ var userSettings = ηm.userSettings;
var deleteCookies = userSettings.deleteCookies;
// Session cookies which timestamp is *after* tstampObsolete will
@@ -364,7 +364,7 @@ var processRemoveQueue = function() {
// Query scopes only if we are going to use them
if ( srcHostnames === undefined ) {
- srcHostnames = µm.tMatrix.extractAllSourceHostnames();
+ srcHostnames = ηm.tMatrix.extractAllSourceHostnames();
}
// Ensure cookie is not allowed on ALL current web pages: It can
@@ -389,7 +389,7 @@ var processRemoveQueue = function() {
// maybe a user has 1000s of cookies sitting in his browser...
var processClean = function() {
- var us = µm.userSettings;
+ var us = ηm.userSettings;
if ( us.deleteCookies || us.deleteUnusedSessionCookies ) {
var cookieKeys = Array.from(cookieDict.keys()),
len = cookieKeys.length,
@@ -443,7 +443,7 @@ var canRemoveCookie = function(cookieKey, srcHostnames) {
var srcHostname;
for ( srcHostname of cookieEntry.usedOn ) {
- if ( µm.mustAllow(srcHostname, cookieHostname, 'cookie') ) {
+ if ( ηm.mustAllow(srcHostname, cookieHostname, 'cookie') ) {
return false;
}
}
@@ -455,7 +455,7 @@ var canRemoveCookie = function(cookieKey, srcHostnames) {
var pos;
for (;;) {
if ( srcHostnames.has(srcHostname) ) {
- if ( µm.mustAllow(srcHostname, cookieHostname, 'cookie') ) {
+ if ( ηm.mustAllow(srcHostname, cookieHostname, 'cookie') ) {
return false;
}
}
@@ -490,7 +490,7 @@ vAPI.cookies.onChanged = function(cookie) {
// Go through all pages and update if needed, as one cookie can be used
// by many web pages, so they need to be recorded for all these pages.
- var pageStores = µm.pageStores;
+ var pageStores = ηm.pageStores;
var pageStore;
for ( var tabId in pageStores ) {
if ( pageStores.hasOwnProperty(tabId) === false ) {
@@ -511,7 +511,7 @@ vAPI.cookies.onChanged = function(cookie) {
vAPI.cookies.onRemoved = function(cookie) {
var cookieKey = cookieKeyFromCookie(cookie);
if ( removeCookieFromDict(cookieKey) ) {
- µm.logger.writeOne('', 'info', 'cookie', i18nCookieDeleteSuccess.replace('{{value}}', cookieKey));
+ ηm.logger.writeOne('', 'info', 'cookie', i18nCookieDeleteSuccess.replace('{{value}}', cookieKey));
}
};
@@ -522,7 +522,7 @@ vAPI.cookies.onRemoved = function(cookie) {
vAPI.cookies.onAllRemoved = function() {
for ( var cookieKey of cookieDict.keys() ) {
if ( removeCookieFromDict(cookieKey) ) {
- µm.logger.writeOne('', 'info', 'cookie', i18nCookieDeleteSuccess.replace('{{value}}', cookieKey));
+ ηm.logger.writeOne('', 'info', 'cookie', i18nCookieDeleteSuccess.replace('{{value}}', cookieKey));
}
}
};