From 9c8f0e372cc8c9412e28e4a331f6abd08b2aae02 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 23 Jun 2015 12:01:51 -0700 Subject: [PATCH] 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. --- src/General/meta/metadata.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/General/meta/metadata.js b/src/General/meta/metadata.js index 86d508a62..e99497578 100755 --- a/src/General/meta/metadata.js +++ b/src/General/meta/metadata.js @@ -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