From 642db1c680bd06716e9f79b94d8553d93864e1ac Mon Sep 17 00:00:00 2001 From: narcolepticinsomniac Date: Fri, 8 Mar 2019 03:51:22 -0500 Subject: [PATCH] Improve exclude rule matching --- popup/popup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/popup/popup.js b/popup/popup.js index 64b04f68..62fa4f60 100644 --- a/popup/popup.js +++ b/popup/popup.js @@ -359,9 +359,9 @@ function styleExcluded({exclusions}, type) { function getExcludeRule(type) { if (type === 'domain') { - return new URL(tabURL).origin + '/*'; + return new URL(tabURL).origin + '*'; } - return tabURL + '*'; + return tabURL.split(/#|\?/)[0].replace(/\/$/, '') + '*'; } Object.assign(handleEvent, {