Greasemonkey: fix default include value

Greasemonkey scripts are supposed to default to running on all pages.
@jgkamat and @nemanjan00 repurted some script not running on all pages
unless they either removed (or broke) the metadata block or added an
include directive. Indeed I had a logic error when it only defaulted to
being included on all pages when no metadata block at all was included.
Whoops.
This commit is contained in:
Jimmy 2018-04-03 20:11:15 +12:00
parent 79823a9a0b
commit 164ea98a5b

View File

@ -92,7 +92,7 @@ class GreasemonkeyScript:
props = ""
script = cls(re.findall(cls.PROPS_REGEX, props), source)
script.script_meta = props
if not props:
if not script.includes:
script.includes = ['*']
return script