From c95becae3468c5c50e4602c8762e6bc483b6383d Mon Sep 17 00:00:00 2001 From: magnolia1234 <54500520+magnolia1234@users.noreply.github.com> Date: Tue, 5 Nov 2019 18:13:46 +0100 Subject: [PATCH] Fix default websites not checked in options (part 2) Now both for new install and update of options. --- options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options.js b/options.js index 136da36..d912f21 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.replace(/\s\(.*\)/, '') in sites; + inputEl.checked = (key in sites) || (key.replace(/\s\(.*\)/, '') in sites); labelEl.appendChild(inputEl); labelEl.appendChild(document.createTextNode(' '+key));