Version 1.10.0

- Updated to Bootstrap 4.3.1
- Updated to jQuery 3.4.1
- Updated to DataTables 1.10.20
- Deleted unnecessary Bootstrap Dialog lib
- Replaced [pick-a-color](https://github.com/lauren/pick-a-color) with [bootstrap-colorpicker 3.2.0](https://github.com/itsjavi/bootstrap-colorpicker)
- Added [popper.js 1.16.0](https://github.com/popperjs/popper.js/tree/v1.16.0)
- Fixed [#333](https://gitlab.com/KevinRoebert/ClearUrls/issues/333)
- Fixed [#332](https://gitlab.com/KevinRoebert/ClearUrls/issues/332)
- Fixed [#307](https://gitlab.com/KevinRoebert/ClearUrls/issues/307)
- Maybe [#315](https://gitlab.com/KevinRoebert/ClearUrls/issues/315) fixed
This commit is contained in:
Kevin Röbert
2020-01-04 00:14:03 +00:00
parent d41ab7ff9d
commit b2ffb3293f
31 changed files with 399 additions and 397 deletions

View File

@@ -33,7 +33,6 @@ function resetGlobalLog(){
params: ['log', JSON.stringify(obj)]
});
getLog();
location.reload();
}
@@ -167,7 +166,7 @@ function setText()
$('#export_log_btn_text').text(translate('log_html_export_button'));
$('#export_log_btn').prop('title', translate('log_html_export_button_title'));
$('#import_log_btn_text').text(translate('log_html_import_button'));
$('#import_log_btn').prop('title', translate('log_html_import_button_title'));
$('#importLog').prop('title', translate('log_html_import_button_title'));
}
function handleError(error) {

View File

@@ -25,30 +25,13 @@ getData();
*/
$(document).ready(function(){
setText();
$(".pick-a-color").pickAColor();
$("#badged-color-picker").colorpicker({
format: "hex"
});
$('#reset_settings_btn').on("click", reset);
$('#export_settings_btn').on("click", exportSettings);
$('#importSettings').on("change", importSettings);
$('#save_settings_btn').on("click", save);
$("#badged_color input").on("change", function () {
settings.badged_color = $(this).val();
browser.runtime.sendMessage({
function: "setData",
params: ["badged_color", settings.badged_color]
}).then(handleResponse, handleError);
browser.runtime.sendMessage({
function: "setBadgedStatus",
params: []
}).then(handleResponse, handleError);
browser.runtime.sendMessage({
function: "saveOnExit",
params: []
}).then(handleResponse, handleError);
});
});
/**
@@ -199,7 +182,7 @@ function setText()
$('#export_settings_btn_text').text(translate('setting_html_export_button'));
$('#export_settings_btn').prop('title', translate('setting_html_export_button_title'));
$('#import_settings_btn_text').text(translate('setting_html_import_button'));
$('#import_settings_btn').prop('title', translate('setting_html_import_button_title'));
$('#importSettings').prop('title', translate('setting_html_import_button_title'));
injectText("referral_marketing_enabled", "referral_marketing_enabled");
injectText("domain_blocking_enabled", "domain_blocking_enabled");
}

View File

@@ -200,7 +200,7 @@ function initSettings() {
storage.loggingStatus = false;
storage.log = {"log": []};
storage.statisticsStatus = true;
storage.badged_color = "ffa500";
storage.badged_color = "#ffa500";
storage.hashURL = "https://kevinroebert.gitlab.io/ClearUrls/data/rules.minify.hash";
storage.ruleURL = "https://kevinroebert.gitlab.io/ClearUrls/data/data.minify.json";
storage.contextMenuEnabled = true;

View File

@@ -251,8 +251,11 @@ function changeIcon() {
function setBadgedStatus() {
checkOSAndroid().then((res) => {
if (!res && storage.badgedStatus) {
let color = storage.badged_color;
if(storage.badged_color.charAt(0) !== '#')
color = '#' + storage.badged_color;
browser.browserAction.setBadgeBackgroundColor({
'color': '#' + storage.badged_color
'color': color
});
}
});