New Version 1.3.3.9
You can now manually specify in the settings which request types you would like to have all examined by ClearURLs. #84
This commit is contained in:
parent
aba3393ca5
commit
49a08881ed
|
@ -212,5 +212,10 @@
|
|||
"setting_hash_url_label": {
|
||||
"message": "Die Url zu der rules.hash Datei (Hash)",
|
||||
"description": ""
|
||||
},
|
||||
|
||||
"setting_types_label": {
|
||||
"message": "<a href='https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest/ResourceType' target='_blank'>Request types</a> (Expertenniveau)",
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
|
|
|
@ -212,5 +212,10 @@
|
|||
"setting_hash_url_label": {
|
||||
"message": "The url to the rules.hash file (hash)",
|
||||
"description": ""
|
||||
},
|
||||
|
||||
"setting_types_label": {
|
||||
"message": "<a href='https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest/ResourceType' target='_blank'>Request types</a> (expert level)",
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
|
|
|
@ -635,7 +635,7 @@ function start(items)
|
|||
*/
|
||||
browser.webRequest.onBeforeRequest.addListener(
|
||||
promise,
|
||||
{urls: ["<all_urls>"]},
|
||||
{urls: ["<all_urls>"], types: getData("types")},
|
||||
["blocking"]
|
||||
);
|
||||
});
|
||||
|
@ -724,6 +724,9 @@ function saveOnExit()
|
|||
case "log":
|
||||
json[key] = JSON.stringify(value);
|
||||
break;
|
||||
case "types":
|
||||
json[key] = value.toString();
|
||||
break;
|
||||
default:
|
||||
json[key] = value;
|
||||
}
|
||||
|
@ -776,6 +779,9 @@ function setData(key, value)
|
|||
case "ruleURL":
|
||||
storage[key] = replaceOldGithubURLs(value);
|
||||
break;
|
||||
case "types":
|
||||
storage[key] = value.split(',');
|
||||
break;
|
||||
default:
|
||||
storage[key] = value;
|
||||
}
|
||||
|
@ -833,6 +839,7 @@ function initSettings()
|
|||
storage.badged_color = "ffa500";
|
||||
storage.hashURL = "https://gitlab.com/KevinRoebert/ClearUrls/raw/master/data/rules.hash";
|
||||
storage.ruleURL = "https://gitlab.com/KevinRoebert/ClearUrls/raw/master/data/data.json";
|
||||
storage.types = ["main_frame", "sub_frame", "xmlhttprequest"];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,12 +43,12 @@ function reset()
|
|||
*/
|
||||
function save()
|
||||
{
|
||||
|
||||
core(function (ref){
|
||||
ref.setData('badged_color', $('input[name=badged_color]').val());
|
||||
ref.setBadgedStatus();
|
||||
ref.setData('ruleURL', $('input[name=rule_url]').val());
|
||||
ref.setData('hashURL', $('input[name=hash_url]').val());
|
||||
ref.setData('types', $('input[name=types]').val());
|
||||
ref.saveOnExit();
|
||||
ref.reload();
|
||||
});
|
||||
|
@ -75,6 +75,7 @@ function getData()
|
|||
settings.badged_color = ref.getData('badged_color');
|
||||
settings.rule_url = ref.getData('ruleURL');
|
||||
settings.hash_url = ref.getData('hashURL');
|
||||
settings.types = ref.getData('types');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -93,6 +94,8 @@ function setText()
|
|||
$('input[name=rule_url]').val(settings.rule_url);
|
||||
$('#hash_url_label').text(translate('setting_hash_url_label'));
|
||||
$('input[name=hash_url]').val(settings.hash_url);
|
||||
$('#types_label').html(translate('setting_types_label'));
|
||||
$('input[name=types]').val(settings.types);
|
||||
$('#save_settings_btn').text(translate('settings_html_save_button'));
|
||||
$('#save_settings_btn').prop('title', translate('settings_html_save_button_title'));
|
||||
}
|
||||
|
|
|
@ -57,6 +57,11 @@
|
|||
<input type="url" id="hash_url" value="" name="hash_url" class="form-control" />
|
||||
</p>
|
||||
<br />
|
||||
<p>
|
||||
<label id="types_label"></label><br />
|
||||
<input type="text" id="types" value="" name="types" class="form-control" />
|
||||
</p>
|
||||
<br />
|
||||
<p class="text-center">
|
||||
<button type="button" id="save_settings_btn"
|
||||
class="btn btn-success" title="Save the settings"></button>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"manifest_version": 2,
|
||||
"name": "ClearURLs",
|
||||
"version": "1.3.3.8",
|
||||
"version": "1.3.3.9",
|
||||
"author": "Kevin R.",
|
||||
"description": "Remove tracking elements form URLs.",
|
||||
"homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls",
|
||||
|
@ -46,6 +46,7 @@
|
|||
},
|
||||
"permissions": [
|
||||
"*://*/*",
|
||||
"<all_urls>",
|
||||
"webRequest",
|
||||
"webRequestBlocking",
|
||||
"storage",
|
||||
|
|
Loading…
Reference in New Issue
Block a user