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": {
|
"setting_hash_url_label": {
|
||||||
"message": "Die Url zu der rules.hash Datei (Hash)",
|
"message": "Die Url zu der rules.hash Datei (Hash)",
|
||||||
"description": ""
|
"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": {
|
"setting_hash_url_label": {
|
||||||
"message": "The url to the rules.hash file (hash)",
|
"message": "The url to the rules.hash file (hash)",
|
||||||
"description": ""
|
"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(
|
browser.webRequest.onBeforeRequest.addListener(
|
||||||
promise,
|
promise,
|
||||||
{urls: ["<all_urls>"]},
|
{urls: ["<all_urls>"], types: getData("types")},
|
||||||
["blocking"]
|
["blocking"]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -724,6 +724,9 @@ function saveOnExit()
|
||||||
case "log":
|
case "log":
|
||||||
json[key] = JSON.stringify(value);
|
json[key] = JSON.stringify(value);
|
||||||
break;
|
break;
|
||||||
|
case "types":
|
||||||
|
json[key] = value.toString();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
json[key] = value;
|
json[key] = value;
|
||||||
}
|
}
|
||||||
|
@ -776,6 +779,9 @@ function setData(key, value)
|
||||||
case "ruleURL":
|
case "ruleURL":
|
||||||
storage[key] = replaceOldGithubURLs(value);
|
storage[key] = replaceOldGithubURLs(value);
|
||||||
break;
|
break;
|
||||||
|
case "types":
|
||||||
|
storage[key] = value.split(',');
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
storage[key] = value;
|
storage[key] = value;
|
||||||
}
|
}
|
||||||
|
@ -833,6 +839,7 @@ function initSettings()
|
||||||
storage.badged_color = "ffa500";
|
storage.badged_color = "ffa500";
|
||||||
storage.hashURL = "https://gitlab.com/KevinRoebert/ClearUrls/raw/master/data/rules.hash";
|
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.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()
|
function save()
|
||||||
{
|
{
|
||||||
|
|
||||||
core(function (ref){
|
core(function (ref){
|
||||||
ref.setData('badged_color', $('input[name=badged_color]').val());
|
ref.setData('badged_color', $('input[name=badged_color]').val());
|
||||||
ref.setBadgedStatus();
|
ref.setBadgedStatus();
|
||||||
ref.setData('ruleURL', $('input[name=rule_url]').val());
|
ref.setData('ruleURL', $('input[name=rule_url]').val());
|
||||||
ref.setData('hashURL', $('input[name=hash_url]').val());
|
ref.setData('hashURL', $('input[name=hash_url]').val());
|
||||||
|
ref.setData('types', $('input[name=types]').val());
|
||||||
ref.saveOnExit();
|
ref.saveOnExit();
|
||||||
ref.reload();
|
ref.reload();
|
||||||
});
|
});
|
||||||
|
@ -75,6 +75,7 @@ function getData()
|
||||||
settings.badged_color = ref.getData('badged_color');
|
settings.badged_color = ref.getData('badged_color');
|
||||||
settings.rule_url = ref.getData('ruleURL');
|
settings.rule_url = ref.getData('ruleURL');
|
||||||
settings.hash_url = ref.getData('hashURL');
|
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);
|
$('input[name=rule_url]').val(settings.rule_url);
|
||||||
$('#hash_url_label').text(translate('setting_hash_url_label'));
|
$('#hash_url_label').text(translate('setting_hash_url_label'));
|
||||||
$('input[name=hash_url]').val(settings.hash_url);
|
$('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').text(translate('settings_html_save_button'));
|
||||||
$('#save_settings_btn').prop('title', translate('settings_html_save_button_title'));
|
$('#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" />
|
<input type="url" id="hash_url" value="" name="hash_url" class="form-control" />
|
||||||
</p>
|
</p>
|
||||||
<br />
|
<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">
|
<p class="text-center">
|
||||||
<button type="button" id="save_settings_btn"
|
<button type="button" id="save_settings_btn"
|
||||||
class="btn btn-success" title="Save the settings"></button>
|
class="btn btn-success" title="Save the settings"></button>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "ClearURLs",
|
"name": "ClearURLs",
|
||||||
"version": "1.3.3.8",
|
"version": "1.3.3.9",
|
||||||
"author": "Kevin R.",
|
"author": "Kevin R.",
|
||||||
"description": "Remove tracking elements form URLs.",
|
"description": "Remove tracking elements form URLs.",
|
||||||
"homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls",
|
"homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls",
|
||||||
|
@ -46,6 +46,7 @@
|
||||||
},
|
},
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"*://*/*",
|
"*://*/*",
|
||||||
|
"<all_urls>",
|
||||||
"webRequest",
|
"webRequest",
|
||||||
"webRequestBlocking",
|
"webRequestBlocking",
|
||||||
"storage",
|
"storage",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user