Use @include for better compatibility.

It shouldn't be any less safe as long as we keep wildcards out of
the scheme and host parts of the URL.
This commit is contained in:
ccd0 2015-06-23 12:01:51 -07:00
parent 68ebbf2151
commit 9c8f0e372c

View File

@ -8,7 +8,14 @@
// @license MIT; <%= meta.repo %>blob/<%= meta.mainBranch %>/LICENSE
<%=
meta.matches.map(function(match) {
return '// @match ' + match;
if (/^\*/.test(match)) {
return (
'// @include ' + match.replace(/^\*/, 'http') + '\n' +
'// @include ' + match.replace(/^\*/, 'https')
);
} else {
return '// @include ' + match;
}
}).join('\n')
%>
// @grant GM_getValue