new fix for #163
This commit is contained in:
parent
7bfa6be62c
commit
8b68d5f2dd
4 changed files with 92 additions and 31 deletions
|
@ -36,6 +36,8 @@
|
|||
<label for="cache" data-localize="cache">Use caching to improve performance (recommended value is true). Uncheck this option only if you are using the custom mode and also you need the user-agent string to be altered from the provided list on every single request.</label>
|
||||
<input type="checkbox" id="exactMatch">
|
||||
<label for="exactMatch" data-localize="exactMatch">Use exact matching (if checked, you will need to insert all sub-domains in the white-list and black-list modes to be considered. If unchecked, all the sub-domains are passing the matching condition (e.g: www.google.com passes the matching if google.com is in the list))</label>
|
||||
<input type="checkbox" id="userAgentData">
|
||||
<label for="userAgentData" data-localize="userAgentData">Expose "navigator.userAgentData" object on Chromium browsers</label>
|
||||
<input type="checkbox" id="faqs">
|
||||
<label for="faqs" data-localize="faqs">Open FAQs page on updates</label>
|
||||
<input type="checkbox" id="log">
|
||||
|
|
|
@ -78,6 +78,7 @@ function save() {
|
|||
chrome.storage.local.set({
|
||||
exactMatch: document.getElementById('exactMatch').checked,
|
||||
faqs: document.getElementById('faqs').checked,
|
||||
userAgentData: document.getElementById('userAgentData').checked,
|
||||
log: document.getElementById('log').checked,
|
||||
cache: document.getElementById('cache').checked,
|
||||
blacklist: prepare(document.getElementById('blacklist').value),
|
||||
|
@ -101,6 +102,7 @@ function restore() {
|
|||
chrome.storage.local.get({
|
||||
exactMatch: false,
|
||||
faqs: true,
|
||||
userAgentData: true,
|
||||
log: false,
|
||||
cache: true,
|
||||
mode: 'blacklist',
|
||||
|
@ -119,6 +121,7 @@ function restore() {
|
|||
}, prefs => {
|
||||
document.getElementById('exactMatch').checked = prefs.exactMatch;
|
||||
document.getElementById('faqs').checked = prefs.faqs;
|
||||
document.getElementById('userAgentData').checked = prefs.userAgentData;
|
||||
document.getElementById('log').checked = prefs.log;
|
||||
document.getElementById('cache').checked = prefs.cache;
|
||||
document.querySelector(`[name="mode"][value="${prefs.mode}"`).checked = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue