mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
Added URL specific settings
For blockMode and showNotifications. Fixes #148.
This commit is contained in:
parent
78a0ccc243
commit
01780da9f5
10 changed files with 618 additions and 78 deletions
|
@ -19,7 +19,8 @@
|
|||
const logging = require("./logging");
|
||||
|
||||
scope.check = function check({url, errorStack}){
|
||||
var match = checkBoth(errorStack, url, settings.blockMode).match(
|
||||
url = new URL(url || "about:blank");
|
||||
var match = checkBoth(errorStack, url, settings.get("blockMode", url)).match(
|
||||
/^(block|allow|fake|ask)(|Readout|Everything|Context|Input|Internal)$/
|
||||
);
|
||||
if (match){
|
||||
|
@ -50,7 +51,6 @@
|
|||
|
||||
function checkURL(url, blockMode){
|
||||
logging.message("check url %s for block mode %s", url, blockMode);
|
||||
url = new URL(url || "about:blank");
|
||||
switch (url.protocol){
|
||||
case "about:":
|
||||
if (url.href === "about:blank"){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue