mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Code cleanup.
This commit is contained in:
parent
951277e922
commit
6ce7b81124
7 changed files with 10 additions and 38 deletions
|
@ -1,3 +1,4 @@
|
|||
/* jslint moz: true */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
@ -70,17 +71,18 @@ Object.keys(lists).forEach(function(type){
|
|||
});
|
||||
|
||||
function updateStackList(){
|
||||
var list;
|
||||
try {
|
||||
var data = JSON.parse(prefs.stackList);
|
||||
if (!Array.isArray(data)){
|
||||
data = [data];
|
||||
}
|
||||
var list = data.filter(function(entry){
|
||||
list = data.filter(function(entry){
|
||||
return typeof entry === "object" && typeof entry.url === "string";
|
||||
});
|
||||
}
|
||||
catch(e){
|
||||
var list = [];
|
||||
list = [];
|
||||
}
|
||||
list.match = function(stack){
|
||||
return this.some(function(stackRule){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue