1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 20:46:39 +02:00

Added session white list

Fixes #197
This commit is contained in:
kkapsner 2018-07-17 13:07:50 +02:00
parent 6c2dbbebf0
commit 5077c86859
11 changed files with 306 additions and 1 deletions

View file

@ -48,6 +48,9 @@
};
});
return addMatchToList(list);
}
function addMatchToList(list){
list.match = function(url){
return this.some(function(entry){
return entry.match(url);
@ -59,6 +62,7 @@
var lists = {
white: [],
sessionWhite: [],
"ignore": [],
black: []
};
@ -105,6 +109,10 @@
updateStackList(settings.stackList);
scope.get = function getList(type){
if (type === "white"){
var combined = lists.white.slice().concat(lists.sessionWhite);
return addMatchToList(combined);
}
return lists[type];
};
scope.appendTo = function appendToList(type, entry){