Ignore non permissible urls when hiding as we can't open them which causes issues. Fixes #793
This commit is contained in:
@@ -63,8 +63,7 @@ const backgroundLogic = {
|
||||
url = undefined;
|
||||
}
|
||||
|
||||
// We can't open these we just have to throw them away
|
||||
if (new URL(url).protocol === "about:") {
|
||||
if (!this.isPermissibleURL(url)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -76,6 +75,17 @@ const backgroundLogic = {
|
||||
});
|
||||
},
|
||||
|
||||
isPermissibleURL(url) {
|
||||
const protocol = new URL(url).protocol;
|
||||
// We can't open these we just have to throw them away
|
||||
if (protocol === "about:"
|
||||
|| protocol === "chrome:"
|
||||
|| protocol === "moz-extension:") {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
checkArgs(requiredArguments, options, methodName) {
|
||||
requiredArguments.forEach((argument) => {
|
||||
if (!(argument in options)) {
|
||||
|
||||
Reference in New Issue
Block a user