Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chromium/background-scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ function onBeforeRequest(details) {
util.log(util.NOTE, "Redirect counter hit for " + uri.href);
urlBlacklist.add(uri.href);
rules.settings.domainBlacklist.add(uri.hostname);
util.log(util.WARN, "Domain blacklisted " + uri.hostname);
util.log(util.WARN, "Domain blocked " + uri.hostname);
return redirectOnCancel(shouldCancel, details.url);
}

Expand Down
4 changes: 2 additions & 2 deletions chromium/background-scripts/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,11 +666,11 @@ RuleSets.prototype = {
// cookies. XXX This is not a very satisfactory heuristic. Sometimes we
// would want to secure the cookie anyway, because the URLs that loop are
// not authenticated or not important. Also by the time the loop has been
// observed and the domain blacklisted, a cookie might already have been
// observed and the domain blocked, a cookie might already have been
// flagged as secure.

if (settings.domainBlacklist.has(hostname)) {
util.log(util.INFO, "cookies for " + hostname + "blacklisted");
util.log(util.INFO, "cookies for " + hostname + "blocked");
return false;
}

Expand Down
27 changes: 14 additions & 13 deletions chromium/background-scripts/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,24 @@ const rules = require('./rules');
const util = require("./util");

function initialize() {
return new Promise(resolve => {
if (chrome.storage.sync) {
chrome.storage.sync.set({"sync-set-test": true}, () => {
if(chrome.runtime.lastError) {
setStorage(chrome.storage.local);
} else {
setStorage(chrome.storage.sync);
}
resolve();
});
} else {
setStorage(chrome.storage.local);
return new Promise((resolve, reject) => {
// Asynchronously fetch all data from storage.sync.
chrome.storage.sync.get(null, () => {
// Pass any observed errors down the promise chain.
if (chrome.runtime.lastError) {
setStorage(chrome.storage.local);
return reject(chrome.runtime.lastError);
} else {
setStorage(chrome.storage.sync);
}
// Pass the data retrieved from storage down the promise chain.
resolve();
}
});
});
}



/* Storage promise setters and getters */

function generic_get_promise(key, default_val, storage) {
Expand Down