mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 12:36:37 +02:00
Linted all files.
This commit is contained in:
parent
6c46d28593
commit
0904d8e2a6
6 changed files with 31 additions and 10 deletions
12
lib/lists.js
12
lib/lists.js
|
@ -56,9 +56,13 @@ var lists = {
|
|||
};
|
||||
|
||||
function updateList(type){
|
||||
"use strict";
|
||||
|
||||
lists[type] = getDomainRegExpList(prefs[type + "List"]);
|
||||
}
|
||||
Object.keys(lists).forEach(function(type){
|
||||
"use strict";
|
||||
|
||||
preferences.on(type + "List", function(){
|
||||
updateList(type);
|
||||
});
|
||||
|
@ -66,11 +70,15 @@ Object.keys(lists).forEach(function(type){
|
|||
});
|
||||
|
||||
exports.get = function getList(type){
|
||||
"use strict";
|
||||
|
||||
return lists[type];
|
||||
}
|
||||
};
|
||||
exports.appendTo = function appendToList(type, entry){
|
||||
"use strict";
|
||||
|
||||
prefs[type + "List"] += (prefs[type + "List"]? ",": "") + entry;
|
||||
prefService.set("extensions.CanvasBlocker@kkapsner.de.whiteList", prefs[type + "List"]);
|
||||
updateList(type);
|
||||
}
|
||||
};
|
||||
exports.update = updateList;
|
Loading…
Add table
Add a link
Reference in a new issue