exact matching preference; fixes #26
This commit is contained in:
parent
e51d174079
commit
62d3eefd67
3 changed files with 24 additions and 3 deletions
|
@ -45,6 +45,9 @@
|
|||
<tr>
|
||||
<td><label><input type="checkbox" id="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></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label><input type="checkbox" id="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></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label><input type="checkbox" id="faqs"> Open FAQs page on updates</label></td>
|
||||
</tr>
|
||||
|
|
|
@ -29,6 +29,7 @@ function save() {
|
|||
}
|
||||
|
||||
chrome.storage.local.set({
|
||||
exactMatch: document.getElementById('exactMatch').checked,
|
||||
faqs: document.getElementById('faqs').checked,
|
||||
cache: document.getElementById('cache').checked,
|
||||
blacklist: prepare(document.getElementById('blacklist').value),
|
||||
|
@ -43,6 +44,7 @@ function save() {
|
|||
|
||||
function restore() {
|
||||
chrome.storage.local.get({
|
||||
exactMatch: false,
|
||||
faqs: true,
|
||||
cache: true,
|
||||
mode: 'blacklist',
|
||||
|
@ -50,6 +52,7 @@ function restore() {
|
|||
blacklist: [],
|
||||
custom: {}
|
||||
}, prefs => {
|
||||
document.getElementById('exactMatch').checked = prefs.exactMatch;
|
||||
document.getElementById('faqs').checked = prefs.faqs;
|
||||
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