From d9414b063ca16298c7e1574b06cea3a22a096404 Mon Sep 17 00:00:00 2001 From: magnolia1234 <54500520+magnolia1234@users.noreply.github.com> Date: Tue, 5 Nov 2019 13:55:17 +0100 Subject: [PATCH] Fix default websites not checked in options Default websites with postfix like ' (javascript disabled) are not checked in options because mismatch in key. New filter to disregard any space + text in parentheses (options.js). --- options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options.js b/options.js index 1b55e0f..136da36 100644 --- a/options.js +++ b/options.js @@ -132,7 +132,7 @@ function renderOptions() { inputEl.type = 'checkbox'; inputEl.dataset.key = key; inputEl.dataset.value = value; - inputEl.checked = key in sites; + inputEl.checked = key.replace(/\s\(.*\)/, '') in sites; labelEl.appendChild(inputEl); labelEl.appendChild(document.createTextNode(' '+key));