mirror of
https://gitlab.com/KevinRoebert/ClearUrls
synced 2025-12-15 21:55:36 +07:00
Preparations for costume rules
+ Preparations for costume rules - Feature "Report URLs" + Auto hash rules + Minimize rules length + Add start and end delimiters to rules
This commit is contained in:
@@ -13,7 +13,6 @@ var hashStatus;
|
||||
var loggingStatus;
|
||||
var statisticsStatus;
|
||||
var currentURL;
|
||||
var reportServer;
|
||||
|
||||
async function getData()
|
||||
{
|
||||
@@ -29,7 +28,6 @@ async function getData()
|
||||
hashStatus = data.hashStatus;
|
||||
loggingStatus = data.loggingStatus;
|
||||
statisticsStatus = data.statisticsStatus;
|
||||
reportServer = data.reportServer;
|
||||
|
||||
browser.runtime.sendMessage({
|
||||
function: "getCurrentURL",
|
||||
@@ -201,7 +199,6 @@ $(document).ready(function(){
|
||||
changeSwitchButton("statistics", "statisticsStatus");
|
||||
$('#loggingPage').attr('href', browser.extension.getURL('./html/log.html'));
|
||||
$('#settings').attr('href', browser.extension.getURL('./html/settings.html'));
|
||||
$('#reportButton').on("click", reportURL);
|
||||
setText();
|
||||
});
|
||||
|
||||
@@ -262,26 +259,6 @@ function translate(string)
|
||||
return browser.i18n.getMessage(string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the url to the DB on clearurls.röb.it to checked for tracking fields.
|
||||
*/
|
||||
function reportURL()
|
||||
{
|
||||
$.ajax({
|
||||
url: reportServer+'/report_url.php?url='+encodeURI(currentURL),
|
||||
success: function(result) {
|
||||
BootstrapDialog.show({
|
||||
message: translate('success_report_url')
|
||||
});
|
||||
},
|
||||
error: function(result) {
|
||||
BootstrapDialog.show({
|
||||
message: translate('error_report_url')
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleError(error) {
|
||||
console.log(`Error: ${error}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user