mirror of
https://gitlab.com/KevinRoebert/ClearUrls
synced 2025-12-17 14:45:37 +07:00
allowing editing of whitelisted sites in settings
just show data in a text input no fancy formatting needed!
This commit is contained in:
@@ -82,6 +82,7 @@ function save() {
|
||||
saveData("badged_color", pickr.getColor().toHEXA().toString())
|
||||
.then(() => saveData("ruleURL", document.querySelector('input[name=ruleURL]').value))
|
||||
.then(() => saveData("hashURL", document.querySelector('input[name=hashURL]').value))
|
||||
.then(() => saveData("whitelist", document.querySelector('input[name=whitelist]').value))
|
||||
.then(() => saveData("types", document.querySelector('input[name=types]').value))
|
||||
.then(() => saveData("logLimit", Math.max(0, Math.min(5000, document.querySelector('input[name=logLimit]').value))))
|
||||
.then(() => browser.runtime.sendMessage({
|
||||
@@ -122,6 +123,7 @@ function getData() {
|
||||
|
||||
loadData("ruleURL")
|
||||
.then(() => loadData("hashURL"))
|
||||
.then(() => loadData("whitelist"))
|
||||
.then(() => loadData("types"))
|
||||
.then(() => loadData("logLimit"))
|
||||
.then(logData => {
|
||||
@@ -216,6 +218,7 @@ function setText() {
|
||||
document.getElementById('reset_settings_btn').setAttribute('title', translate('setting_html_reset_button_title'));
|
||||
document.getElementById('rule_url_label').textContent = translate('setting_rule_url_label');
|
||||
document.getElementById('hash_url_label').textContent = translate('setting_hash_url_label');
|
||||
document.getElementById('whitelist_list_label').textContent = translate('setting_whitelist_list_label');
|
||||
document.getElementById('types_label').innerHTML = translate('setting_types_label');
|
||||
document.getElementById('save_settings_btn').textContent = translate('settings_html_save_button');
|
||||
document.getElementById('save_settings_btn').setAttribute('title', translate('settings_html_save_button_title'));
|
||||
|
||||
Reference in New Issue
Block a user