Fix getStyles returning global styles for extensions pages

This didn't work anyway but wrongly showed nonzero style count in an opened popup when the option was changed in another window.
This commit is contained in:
tophf 2015-10-05 17:44:44 +03:00
parent 965ea073c9
commit 274584510f

View File

@ -224,6 +224,10 @@ function sectionAppliesToUrl(section, url) {
if (url.indexOf("http") != 0 && url.indexOf("file") != 0 && url.indexOf("chrome-extension") != 0 && url.indexOf("ftp") != 0) {
return false;
}
// other extensions can't be styled
if (url.indexOf("chrome-extension") == 0 && url.indexOf(chrome.extension.getURL("")) != 0) {
return false;
}
if (!section.urls && !section.domains && !section.urlPrefixes && !section.regexps) {
//console.log(section.id + " is global");
return true;