mirror of
https://github.com/SoPat712/videospeed.git
synced 2026-04-27 06:32:52 -04:00
Release v5.2.7
This commit is contained in:
@@ -60,10 +60,28 @@
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether Speeder should run on this URL given global enabled and the matched rule (if any).
|
||||
* - No rule: follows global (enabled unless explicitly false).
|
||||
* - Rule with site "off" / disableExtension: always inactive (blacklist).
|
||||
* - Rule with site "on": active even when global is off (whitelist).
|
||||
*/
|
||||
function isSpeederActiveForSite(globalEnabled, siteRule) {
|
||||
var globalOn = globalEnabled !== false;
|
||||
if (!siteRule) {
|
||||
return globalOn;
|
||||
}
|
||||
if (isSiteRuleDisabled(siteRule)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return {
|
||||
compileSiteRulePattern: compileSiteRulePattern,
|
||||
escapeStringRegExp: escapeStringRegExp,
|
||||
isSiteRuleDisabled: isSiteRuleDisabled,
|
||||
isSpeederActiveForSite: isSpeederActiveForSite,
|
||||
matchSiteRule: matchSiteRule
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user