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).
master
magnolia1234 2019-11-05 13:55:17 +01:00 committed by GitHub
parent d6705e8438
commit d9414b063c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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));