diff --git a/modules/internal/rule-generator.js b/modules/internal/rule-generator.js index fbd19c12..3f9ca297 100644 --- a/modules/internal/rule-generator.js +++ b/modules/internal/rule-generator.js @@ -46,6 +46,8 @@ ruleGenerator.openRuleSet = function ({target}) { content += `* ${domain} * noop\n`; } else if (key === 'AdGuard') { content += `@@||${domain}^\n`; + } else if (key === 'NoScript') { + content += `"$:${domain}",\n`; } } textArea.value = content.replace(/\n+$/, ''); diff --git a/pages/options/options-advanced.js b/pages/options/options-advanced.js index 2e6ad1b6..4f785c93 100644 --- a/pages/options/options-advanced.js +++ b/pages/options/options-advanced.js @@ -95,6 +95,7 @@ optionsAdvanced.init = function (opt) { document.getElementById('generate-ublock-rules').addEventListener('change', ruleGenerator.openRuleSet); document.getElementById('generate-umatrix-rules').addEventListener('change', ruleGenerator.openRuleSet); document.getElementById('generate-adguard-rules').addEventListener('change', ruleGenerator.openRuleSet); + document.getElementById('generate-noscript-rules').addEventListener('change', ruleGenerator.openRuleSet); document.getElementById('button-copy-rule-set').addEventListener('click', ruleGenerator.copyRuleSet); document.getElementById('negate-html-filter-list-warning').addEventListener('click', function () { options._onLinkClick(Links.CODEBERG_HTML_FILTER); }); document.getElementById('ruleset-help').addEventListener('click', function () { options._onLinkClick(Links.CODEBERG_RULESET); }); diff --git a/pages/options/options.html b/pages/options/options.html index 7bbbcf1d..e1e70a54 100644 --- a/pages/options/options.html +++ b/pages/options/options.html @@ -227,6 +227,12 @@
+