1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 12:36:37 +02:00

Code cleanup and removed blockAll bug

blockAll did not block readout-API. This could be relevant if a user
changes the setting and an open tab still holds a reference to a
canvas-context.
This commit is contained in:
kkapsner 2015-04-22 11:55:31 +02:00
parent 30407e71a0
commit af47ee8d87
4 changed files with 17 additions and 15 deletions

View file

@ -1,4 +1,11 @@
/* global console,exports */
/* 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/. */
function getDomainRegExpList(domainList){
"use strict";
var list = domainList
.split(",")
.map(function(entry){
@ -38,6 +45,8 @@ function getDomainRegExpList(domainList){
}
function checkURL(url, blockMode, whiteList, blackList){
"use strict";
var mode = "block";
switch (blockMode){
case "blockEverything":