diff --git a/pages/options/options.js b/pages/options/options.js index caeb9370..9080900d 100644 --- a/pages/options/options.js +++ b/pages/options/options.js @@ -257,19 +257,17 @@ options._openRuleSet = function({target}) { let btnCopy = document.getElementById("button-copy-rule-set"); let content = ""; - let ruleSyntax = ""; - - if (optionKey === "uMatrix") { - ruleSyntax = " script allow"; - } else if (optionKey === "uBlock") { - ruleSyntax = " * noop"; - } textArea.style.display = "block"; btnCopy.style.display = "block"; for (var domain in urls) { - content += "* " + domain + ruleSyntax + '\n'; + if (optionKey === "uMatrix") { + content += "* " + domain + " script allow" + '\n'; + content += "* " + domain + " css allow" + '\n'; + } else if (optionKey === "uBlock") { + content += "* " + domain + " * noop" + '\n'; + } } textArea.value = content.replace(/\n+$/, ""); } diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 38c09e1f..45aea525 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -28,6 +28,7 @@
  • Added: Swiper JS+CSS v4.5.1 and v5.4.2 (#22)
  • Added: Cloudflare Mirage2 (#22)
  • Improved: Help page (#22)
  • +
  • Improved: uMatrix Rule Generator (#23)
  • Please update your uBlock/uMatrix rules diff --git a/pages/updates/updates.js b/pages/updates/updates.js index 9043c1a5..34700f59 100644 --- a/pages/updates/updates.js +++ b/pages/updates/updates.js @@ -32,19 +32,17 @@ updates._openRuleSet = function({target}) { let btnCopy = document.getElementById("button-copy-rule-set"); let content = ""; - let ruleSyntax = ""; - - if (updateKey === "uMatrix") { - ruleSyntax = " script allow"; - } else if (updateKey === "uBlock") { - ruleSyntax = " * noop"; - } textArea.style.display = "block"; btnCopy.style.display = "block"; for (var domain in urls) { - content += "* " + domain + ruleSyntax + '\n'; + if (updateKey === "uMatrix") { + content += "* " + domain + " script allow" + '\n'; + content += "* " + domain + " css allow" + '\n'; + } else if (updateKey === "uBlock") { + content += "* " + domain + " * noop" + '\n'; + } } textArea.value = content.replace(/\n+$/, ""); }