diff --git a/background.js b/background.js index f20248bf..be6cc985 100644 --- a/background.js +++ b/background.js @@ -221,7 +221,7 @@ function getApplicableSections(style, url) { function sectionAppliesToUrl(section, url) { // 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; } if (!section.urls && !section.domains && !section.urlPrefixes && !section.regexps) { diff --git a/manifest.json b/manifest.json index e2c2ba5e..9f3b6626 100644 --- a/manifest.json +++ b/manifest.json @@ -29,7 +29,7 @@ }, "content_scripts": [ { - "matches": ["http://*/*", "https://*/*", "file:///*"], + "matches": [""], "run_at": "document_start", "all_frames": true, "js": ["apply.js"] diff --git a/popup.js b/popup.js index 7b02eeda..d14cefe6 100644 --- a/popup.js +++ b/popup.js @@ -10,7 +10,7 @@ if (!prefs.getPref("popup.stylesFirst")) { getActiveTabRealURL(updatePopUp); function updatePopUp(url) { - var urlWillWork = /^(file|http|https|chrome\-extension):/.exec(url); + var urlWillWork = /^(file|http|https|ftps?|chrome\-extension):/.exec(url); if (!urlWillWork) { document.body.classList.add("blocked"); document.getElementById("unavailable").style.display = "block";