fix: for in to of
This commit is contained in:
parent
0b2687ecfa
commit
a019b6157a
|
@ -1,9 +1,12 @@
|
|||
var app = {};
|
||||
|
||||
chrome.webRequest.onBeforeRequest.addListener(function (e) {
|
||||
if(e.url.startsWith("https://video-")) {
|
||||
return {"cancel": true};
|
||||
};}, {"urls": ["*://*/*"]}, ["blocking"]);
|
||||
for(var u of ["https://video-", "https://txvid.vod"]) {
|
||||
if(e.url.startsWith(u)) {
|
||||
return {"cancel": true};
|
||||
};
|
||||
}
|
||||
}, {"urls": ["*://*/*"]}, ["blocking"]);
|
||||
|
||||
app.version = function () {return chrome.runtime.getManifest().version};
|
||||
app.homepage = function () {return chrome.runtime.getManifest().homepage_url};
|
||||
|
|
|
@ -33,13 +33,15 @@ core.webrequest = {
|
|||
"blocking": {"types": []},
|
||||
"block": function (e) {
|
||||
|
||||
if(e.url.startsWith("https://video-")) {
|
||||
return {"cancel": true};
|
||||
};
|
||||
// if(e.url.startsWith("https://video-")) {
|
||||
// return {"cancel": true};
|
||||
// };
|
||||
|
||||
if(e.url.startsWith("https://txvid.vod")) {
|
||||
return {"cancel": true};
|
||||
};
|
||||
for(var u of ["https://video-", "https://txvid.vod"]) {
|
||||
if(e.url.startsWith(u)) {
|
||||
return {"cancel": true};
|
||||
};
|
||||
}
|
||||
|
||||
var ftp = e.url.indexOf("ftp") === 0;
|
||||
var http = e.url.indexOf("http") === 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user