commit
461d52ac41
|
@ -221,7 +221,7 @@ function getApplicableSections(style, url) {
|
||||||
|
|
||||||
function sectionAppliesToUrl(section, url) {
|
function sectionAppliesToUrl(section, url) {
|
||||||
// only http, https, file, and chrome-extension allowed
|
// only http, https, file, and chrome-extension allowed
|
||||||
if (url.indexOf("http") != 0 && url.indexOf("file") != 0 && url.indexOf("chrome-extension") != 0) {
|
if (url.indexOf("http") != 0 && url.indexOf("file") != 0 && url.indexOf("chrome-extension") != 0 && url.indexOf("ftp") != 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!section.urls && !section.domains && !section.urlPrefixes && !section.regexps) {
|
if (!section.urls && !section.domains && !section.urlPrefixes && !section.regexps) {
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
},
|
},
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"matches": ["http://*/*", "https://*/*", "file:///*"],
|
"matches": ["<all_urls>"],
|
||||||
"run_at": "document_start",
|
"run_at": "document_start",
|
||||||
"all_frames": true,
|
"all_frames": true,
|
||||||
"js": ["apply.js"]
|
"js": ["apply.js"]
|
||||||
|
|
2
popup.js
2
popup.js
|
@ -10,7 +10,7 @@ if (!prefs.getPref("popup.stylesFirst")) {
|
||||||
getActiveTabRealURL(updatePopUp);
|
getActiveTabRealURL(updatePopUp);
|
||||||
|
|
||||||
function updatePopUp(url) {
|
function updatePopUp(url) {
|
||||||
var urlWillWork = /^(file|http|https|chrome\-extension):/.exec(url);
|
var urlWillWork = /^(file|http|https|ftps?|chrome\-extension):/.exec(url);
|
||||||
if (!urlWillWork) {
|
if (!urlWillWork) {
|
||||||
document.body.classList.add("blocked");
|
document.body.classList.add("blocked");
|
||||||
document.getElementById("unavailable").style.display = "block";
|
document.getElementById("unavailable").style.display = "block";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user