mirror of
https://gitlab.com/KevinRoebert/ClearUrls
synced 2025-12-16 22:25:36 +07:00
Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db5bd659f0 | ||
|
|
6c775b9bba | ||
|
|
47dfe256eb | ||
|
|
3bac289758 | ||
|
|
53035f6bb2 | ||
|
|
86fb5c469a | ||
|
|
f1086f8889 | ||
|
|
bf27040864 | ||
|
|
ca7df33fa3 | ||
|
|
e017a8838e | ||
|
|
1987634095 | ||
|
|
6e2d082eea | ||
|
|
fa3a33962b | ||
|
|
abaa5fe2c6 | ||
|
|
992cd351af | ||
|
|
6992302e23 | ||
|
|
bc2e2510e8 | ||
|
|
1ec5838a98 | ||
|
|
c7b1f85672 | ||
|
|
ac2d5da41c | ||
|
|
27af2c8c49 | ||
|
|
01a911557b | ||
|
|
54210b71c5 | ||
|
|
da5fb0b3c0 | ||
|
|
08b62c0d94 | ||
|
|
879fcdae03 | ||
|
|
762d83e46c | ||
|
|
ae30c0eb53 | ||
|
|
0acd24d716 | ||
|
|
22e58ba0e6 |
3
.github/FUNDING.yml
vendored
Normal file
3
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
custom: ['https://www.paypal.me/KevinRoebert', 'https://www.buymeacoffee.com/KevinRoebert']# Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
@@ -3,12 +3,21 @@ image: debian:latest
|
||||
before_script:
|
||||
- export DEBIAN_FRONTEND= noninteractive
|
||||
- apt-get update -y
|
||||
- apt-get install -y zip unzip nodejs
|
||||
- apt-get install -y zip unzip nodejs jsonlint
|
||||
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
- deploy
|
||||
|
||||
test rules:
|
||||
stage: test
|
||||
script:
|
||||
- jsonlint-php data/data.min.json
|
||||
only:
|
||||
changes:
|
||||
- data/data.min.json
|
||||
|
||||
hash rules:
|
||||
stage: build
|
||||
script:
|
||||
@@ -21,16 +30,18 @@ hash rules:
|
||||
- data.minify.json
|
||||
- rules.minify.hash
|
||||
only:
|
||||
- master
|
||||
refs:
|
||||
- merge_requests
|
||||
- master
|
||||
changes:
|
||||
- data/data.min.json
|
||||
|
||||
bundle addon:
|
||||
stage: build
|
||||
script:
|
||||
- zip ClearUrls -r -FS clearurls.js browser-polyfill.js manifest.json img/* external_js/* html/* core_js/* css/* fonts/* _locales/*
|
||||
|
||||
only:
|
||||
- master
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- ClearUrls.zip
|
||||
@@ -50,4 +61,11 @@ pages:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
- master
|
||||
refs:
|
||||
- merge_requests
|
||||
- master
|
||||
changes:
|
||||
- GitLabPages/*
|
||||
- img/clearurls.svg
|
||||
- data/data.min.json
|
||||
- build_tools/minifyDataJSON.js
|
||||
44
CHANGELOG.md
44
CHANGELOG.md
@@ -4,6 +4,50 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.19.0] - 2020-07-22
|
||||
|
||||
### Compatibility note
|
||||
- Require Firefox >= 55
|
||||
- Require Chrome >= 37
|
||||
|
||||
### Changed
|
||||
- Changed url decoding to prevent endless loop
|
||||
|
||||
## [1.18.1] - 2020-06-07
|
||||
|
||||
### Compatibility note
|
||||
- Require Firefox >= 55
|
||||
- Require Chrome >= 37
|
||||
|
||||
### Changed
|
||||
- Hotfix for the endless loop on new log limit ([#545](https://gitlab.com/KevinRoebert/ClearUrls/issues/545), [#541](https://gitlab.com/KevinRoebert/ClearUrls/issues/541), [#539](https://gitlab.com/KevinRoebert/ClearUrls/issues/539))
|
||||
|
||||
## [1.18.0] - 2020-06-06
|
||||
|
||||
### Compatibility note
|
||||
- Require Firefox >= 55
|
||||
- Require Chrome >= 37
|
||||
|
||||
### Removed
|
||||
- sha256.jquery.plugin
|
||||
- Popper.js v1.16.0
|
||||
- Bootstrap Colorpicker v3.2.0
|
||||
- Removed `xbl` type from request types, because it throws since 78.0b3 exceptions (no longer supported)
|
||||
|
||||
### Added
|
||||
- Pickr v1.7.0
|
||||
|
||||
### Changed
|
||||
- Replaced sha256.jquery.plugin with native hashing
|
||||
- Replaced jQuery dependencies with native JavaScript in all core files (jQuery is only required for the log page)
|
||||
- Hopefully this fixes the performance problems that some users experience when using this addon in conjunction with other addons
|
||||
- [#256](https://gitlab.com/KevinRoebert/ClearUrls/issues/256)
|
||||
- [#535](https://gitlab.com/KevinRoebert/ClearUrls/issues/535)
|
||||
- Restricted the log limit to max. 5000 entries
|
||||
- Default value is now 100
|
||||
- Too many log entries have resulted in performance losses for users who have forgotten that they have turned on the log. This step should prevent this.
|
||||
|
||||
|
||||
## [1.17.0] - 2020-04-14
|
||||
|
||||
### Compatibility note
|
||||
|
||||
12
README.md
12
README.md
@@ -1,6 +1,6 @@
|
||||
<a href="https://www.buymeacoffee.com/KevinRoebert" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="60"></a>
|
||||
|
||||
[<img src="https://blog.mozilla.org/addons/files/2020/04/get-the-addon-fx-apr-2020.svg" alt="for Firefox" height="60px">](https://addons.mozilla.org/en-US/firefox/addon/clearurls/) [<img src="https://gitlab.com/KevinRoebert/ClearUrls/-/raw/master/promotion/MEA-button.png" alt="for Edge" height="60px">](https://microsoftedge.microsoft.com/addons/detail/mdkdmaickkfdekbjdoojfalpbkgaddei) [<img src="https://developer.chrome.com/webstore/images/ChromeWebStore_BadgeWBorder_v2_206x58.png" alt="for Chrome" height="60px">](https://chrome.google.com/webstore/detail/clearurls/lckanjgmijmafbedllaakclkaicjfmnk)
|
||||
[<img src="https://blog.mozilla.org/addons/files/2020/04/get-the-addon-fx-apr-2020.svg" alt="for Firefox" height="60px">](https://addons.mozilla.org/firefox/addon/clearurls/) [<img src="https://gitlab.com/KevinRoebert/ClearUrls/-/raw/master/promotion/MEA-button.png" alt="for Edge" height="60px">](https://microsoftedge.microsoft.com/addons/detail/mdkdmaickkfdekbjdoojfalpbkgaddei) [<img src="https://developer.chrome.com/webstore/images/ChromeWebStore_BadgeWBorder_v2_206x58.png" alt="for Chrome" height="60px">](https://chrome.google.com/webstore/detail/clearurls/lckanjgmijmafbedllaakclkaicjfmnk)
|
||||
|
||||
# <sub><img src="https://gitlab.com/KevinRoebert/ClearUrls/raw/master/img/clearurls.svg" width="64px" height="64px"></sub> ClearURLs
|
||||
|
||||
@@ -92,14 +92,8 @@ We use some third-party scripts in our add-on. The authors and licenses are list
|
||||
- [jQuery v3.4.1](https://github.com/jquery/jquery/tree/3.4.1) |
|
||||
Copyright JS Foundation and other contributors |
|
||||
[MIT](https://jquery.org/license/)
|
||||
- [sha256.jquery.plugin](https://github.com/orsozed/sha256.jquery.plugin) |
|
||||
Copyright 2003, Christoph Bichlmeier |
|
||||
[MIT](https://raw.github.com/orsozed/JQuery-Plugins/master/license/MIT-LICENSE.txt) |
|
||||
[GPLv2](https://raw.github.com/orsozed/JQuery-Plugins/master/license/GPL-LICENSE.txt)
|
||||
- [DataTables v1.10.20](https://github.com/DataTables/DataTables/tree/master) | Copyright (c) 2008-2015 SpryMedia Limited | [MIT](https://datatables.net/license/)
|
||||
- [Popper.js v1.16.0](https://github.com/popperjs/popper.js/tree/v1.16.0) | Copyright (c) 2016 Federico Zivolo and contributors |
|
||||
[MIT](https://github.com/popperjs/popper.js/blob/master/LICENSE.md)
|
||||
- [Bootstrap Colorpicker v3.2.0](https://github.com/itsjavi/bootstrap-colorpicker/tree/3.2.0) | Copyright (c) 2017 Javi Aguilar |
|
||||
[MIT](https://github.com/itsjavi/bootstrap-colorpicker/blob/master/LICENSE)
|
||||
- [Pickr v1.7.0](https://github.com/Simonwep/pickr/tree/1.7.0) | Copyright (c) 2018 - 2020 Simon Reinisch |
|
||||
[MIT](https://github.com/Simonwep/pickr/blob/master/LICENSE)
|
||||
- [Font Awesome v5.12.0](https://github.com/FortAwesome/Font-Awesome/tree/5.12.0) | Copyright (c) @fontawesome |
|
||||
[Font Awesome Free License](https://github.com/FortAwesome/Font-Awesome/blob/master/LICENSE.txt)
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
"description": "Diese Zeichenfolge wird als Titel für die Schaltfläche zum Importieren auf der Einstellungsseite verwendet."
|
||||
},
|
||||
"setting_log_limit_label": {
|
||||
"message": "Limitiert das Protokoll auf $LIMIT$ Einträge. (-1 := ∞)",
|
||||
"message": "Limitiert das Protokoll auf $LIMIT$ Einträge.",
|
||||
"description": "Diese Zeichenfolge wird als Name für das Protokolllimit verwendet.",
|
||||
"placeholders": {
|
||||
"limit": {
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
"description": "This string is used as title for the import button on the settings page."
|
||||
},
|
||||
"setting_log_limit_label": {
|
||||
"message": "Limit the log to $LIMIT$ entries. (-1 := ∞)",
|
||||
"message": "Limit the log to $LIMIT$ entries.",
|
||||
"description": "This string is used as name for the log limit label.",
|
||||
"placeholders": {
|
||||
"limit": {
|
||||
@@ -346,5 +346,33 @@
|
||||
"eTag_filtering_enabled_title": {
|
||||
"message": "Filters ETag headers. Hint: Cache must be cleared before first use.",
|
||||
"description": "This string is used as title for the ETag header filtering switch"
|
||||
},
|
||||
"popup_html_rules_status_head_title": {
|
||||
"message": "",
|
||||
"description": "not needed, only to prevent exceptions"
|
||||
},
|
||||
"popup_html_statistics_percentage_title": {
|
||||
"message": "",
|
||||
"description": "not needed, only to prevent exceptions"
|
||||
},
|
||||
"popup_html_statistics_blocked_title": {
|
||||
"message": "",
|
||||
"description": "not needed, only to prevent exceptions"
|
||||
},
|
||||
"popup_html_statistics_elements_title": {
|
||||
"message": "",
|
||||
"description": "not needed, only to prevent exceptions"
|
||||
},
|
||||
"popup_html_statistics_head_title": {
|
||||
"message": "",
|
||||
"description": "not needed, only to prevent exceptions"
|
||||
},
|
||||
"popup_html_configs_head_title": {
|
||||
"message": "",
|
||||
"description": "not needed, only to prevent exceptions"
|
||||
},
|
||||
"context_menu_enabled_title": {
|
||||
"message": "",
|
||||
"description": "not needed, only to prevent exceptions"
|
||||
}
|
||||
}
|
||||
@@ -272,7 +272,7 @@
|
||||
"description": "This string is used as title for the import button on the settings page."
|
||||
},
|
||||
"setting_log_limit_label": {
|
||||
"message": "Limitar el tamaño del registro a $LIMIT$ eventos. (-1 := ∞)",
|
||||
"message": "Limitar el tamaño del registro a $LIMIT$ eventos.",
|
||||
"description": "This string is used as name for the log limit label.",
|
||||
"placeholders": {
|
||||
"limit": {
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
"description": "Sert à afficher la signification de la fonction sur la page qui affiche les options."
|
||||
},
|
||||
"setting_log_limit_label": {
|
||||
"message": "Nombre d’éléments à enregistrer dans le journal, $LIMIT$ de -1 à l’infini (-1 := ∞)",
|
||||
"message": "Nombre d’éléments à enregistrer dans le journal, $LIMIT$ de -1 à l’infini",
|
||||
"description": "Sert à afficher la signification de la fonction sur la page qui affiche les options.",
|
||||
"placeholders": {
|
||||
"limit": {
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
"description": "This string is used as title for the import button on the settings page."
|
||||
},
|
||||
"setting_log_limit_label": {
|
||||
"message": "Limita le voci di log a $LIMIT$. (-1 := ∞)",
|
||||
"message": "Limita le voci di log a $LIMIT$.",
|
||||
"description": "This string is used as name for the log limit label.",
|
||||
"placeholders": {
|
||||
"limit": {
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"hash_status_code_1": {
|
||||
"message": "最新の",
|
||||
"description": "このステータスコードは、ClearURLs ルールの更新が利用できず、すべてが最新であることを示しています。"
|
||||
"message": "最新",
|
||||
"description": "このステータスコードは、ClearURLs ルールの更新が無く、すべてが最新であることを示しています。"
|
||||
},
|
||||
"hash_status_code_2": {
|
||||
"message": "更新する",
|
||||
"description": "このステータスコードは、ClearURLs ルールが正常に更新されたことを示しています。"
|
||||
},
|
||||
"hash_status_code_3": {
|
||||
"message": "利用可能な更新",
|
||||
"message": "更新が利用可能",
|
||||
"description": "このステータスコードは、ClearURLs ルールの更新が利用可能であることを示しています。"
|
||||
},
|
||||
"hash_status_code_4": {
|
||||
"message": "エラー",
|
||||
"description": "このステータスコードは、ClearURLs を正しく開始できなかったことを示しています。"
|
||||
"description": "このステータスコードは、ClearURLs が正しく開始できなかったことを示しています。"
|
||||
},
|
||||
"hash_status_code_5": {
|
||||
"message": "おっと!何かが間違っていた!",
|
||||
@@ -25,10 +25,10 @@
|
||||
},
|
||||
"log_domain_blocked": {
|
||||
"message": "このドメインはブロックされています",
|
||||
"description": "この文字列は、ClearURLs ログのブロックされたドメインで使用されます。"
|
||||
"description": "この文字列は、ClearURLs ログでブロックされたドメインで使用されます。"
|
||||
},
|
||||
"check_os_log": {
|
||||
"message": "[ClearURLs]:ログリスナーが追加されました。",
|
||||
"message": "[ClearURLs]:ログリスナーを追加しました。",
|
||||
"description": "この文字列は、ClearURLs ログの起動時に使用されます。"
|
||||
},
|
||||
"log_html_page_title": {
|
||||
@@ -36,7 +36,7 @@
|
||||
"description": "この文字列は、ログページのヘッダーとして使用されます。"
|
||||
},
|
||||
"log_html_table_head_1": {
|
||||
"message": "処理する前に",
|
||||
"message": "処理前",
|
||||
"description": "この文字列は、ログページのテーブルタイトルとして使用されます。"
|
||||
},
|
||||
"log_html_table_head_2": {
|
||||
@@ -44,7 +44,7 @@
|
||||
"description": "この文字列は、ログページのテーブルタイトルとして使用されます。"
|
||||
},
|
||||
"log_html_table_head_3": {
|
||||
"message": "規則",
|
||||
"message": "ルール",
|
||||
"description": "この文字列は、ログページのテーブルタイトルとして使用されます。"
|
||||
},
|
||||
"log_html_table_head_4": {
|
||||
@@ -120,7 +120,7 @@
|
||||
"description": "この文字列は、ポップアップページのログボタンの名前として使用されます。"
|
||||
},
|
||||
"popup_html_log_head_title": {
|
||||
"message": "記録を開く",
|
||||
"message": "ログを開く",
|
||||
"description": "この文字列は、ポップアップページのログボタンのタイトルとして使用されます。"
|
||||
},
|
||||
"popup_html_report_button": {
|
||||
@@ -148,7 +148,7 @@
|
||||
"description": "この文字列は、ポップアップページの統計情報切り替えボタンのタイトルとして使用されます。"
|
||||
},
|
||||
"settings_html_page_title": {
|
||||
"message": "ClearURLs からの設定",
|
||||
"message": "ClearURLs の設定",
|
||||
"description": "この文字列は、設定ページのタイトルとして使用されます。"
|
||||
},
|
||||
"badged_color_label": {
|
||||
@@ -200,7 +200,7 @@
|
||||
"description": "この文字列は、寄付ページを参照するために使用されます。"
|
||||
},
|
||||
"clipboard_copy_link": {
|
||||
"message": "クリーンリンクの Location(位置情報)のコピー",
|
||||
"message": "クリーンリンクをコピー",
|
||||
"description": "この文字列は、コンテキストメニューでクリーンリンクをコピーするために使用されます。"
|
||||
},
|
||||
"context_menu_enabled": {
|
||||
@@ -230,5 +230,121 @@
|
||||
"cleaning_tool_clean_urls_label": {
|
||||
"message": "ここで、クリーンアップされた URL を見つけることができます。",
|
||||
"description": "この文字列は、クリーン URL のクリーニングツールページのタイトルとして使用されます。"
|
||||
},
|
||||
"local_hosts_skipping": {
|
||||
"message": "ローカルホストの URL をスキップする (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10, 169.254.0.0/16, 127.0.0.1, localhost)",
|
||||
"description": "この文字列は、ローカルホストのスキップスイッチのラベルとして使用されます。"
|
||||
},
|
||||
"local_hosts_skipping_title": {
|
||||
"message": "ローカルホストの URL をスキップ",
|
||||
"description": "この文字列は、ローカルホストのスキップスイッチのタイトルとして使用されます。"
|
||||
},
|
||||
"log_html_export_button": {
|
||||
"message": "エクスポート",
|
||||
"description": "この文字列は、ログページのエクスポートボタンに使用されます。"
|
||||
},
|
||||
"log_html_export_button_title": {
|
||||
"message": "グローバルログをエクスポートする",
|
||||
"description": "この文字列は、ログページのエクスポートボタンのタイトルとして使用されます。"
|
||||
},
|
||||
"log_html_import_button": {
|
||||
"message": "インポート",
|
||||
"description": "この文字列は、ログページのインポートボタンに使用されます。\n"
|
||||
},
|
||||
"log_html_import_button_title": {
|
||||
"message": "グローバルログのインポート",
|
||||
"description": "この文字列は、ログページのインポートボタンのタイトルとして使用されます。"
|
||||
},
|
||||
"setting_html_export_button": {
|
||||
"message": "エクスポート",
|
||||
"description": "この文字列は、設定ページのエクスポートボタンの名前として使用されます。\n"
|
||||
},
|
||||
"setting_html_export_button_title": {
|
||||
"message": "すべてをエクスポートする",
|
||||
"description": "この文字列は、設定ページのエクスポートボタンのタイトルとして使用されます。"
|
||||
},
|
||||
"setting_html_import_button": {
|
||||
"message": "インポート",
|
||||
"description": "この文字列は、設定画面のリセットボタンの名前として使用されます。"
|
||||
},
|
||||
"setting_html_import_button_title": {
|
||||
"message": "すべてをインポートする",
|
||||
"description": "この文字列は、設定ページのインポートボタンのタイトルとして使用されます。"
|
||||
},
|
||||
"setting_log_limit_label": {
|
||||
"message": "ログのエントリを $LIMIT$ に制限します。",
|
||||
"description": "この文字列は、ログリミットラベルの名前として使用されます。",
|
||||
"placeholders": {
|
||||
"limit": {
|
||||
"content": "$1",
|
||||
"example": "100"
|
||||
}
|
||||
}
|
||||
},
|
||||
"blocked_html_title": {
|
||||
"message": "このサイトは <b>ClearURLs</b> よってブロックされました。",
|
||||
"description": "この文字列は、ブロックされたサイトのページのタイトルとして使用されます。"
|
||||
},
|
||||
"blocked_html_body": {
|
||||
"message": "このサイトは <b>ClearURLs</b> アドオンによってブロックされました。このサイトを訪問するには、アドオンを一時的に無効にするか、ClearURLs の設定でドメインブロックを無効にする必要があります。その対処後、下のボタンをクリックしてページを読み込むことができます。",
|
||||
"description": "この文字列は、ブロックされたサイトページの本文として使用されます。"
|
||||
},
|
||||
"blocked_html_button": {
|
||||
"message": "ページを見る",
|
||||
"description": "この文字列は、ブロックされたサイトのページのボタンとして使用されます。"
|
||||
},
|
||||
"referral_marketing_enabled": {
|
||||
"message": "Referral marketing(口コミなどの紹介商法)を許可する",
|
||||
"description": "この文字列は、Referral marketing(口コミなどの紹介商法)スイッチのラベルとして使用されます。"
|
||||
},
|
||||
"referral_marketing_enabled_title": {
|
||||
"message": "Referral marketing(口コミなどの紹介商法)を許可する",
|
||||
"description": "この文字列は、Referral marketing(口コミなどの紹介商法)スイッチのタイトルとして使用されます。"
|
||||
},
|
||||
"watchdog": {
|
||||
"message": "[ClearURLs]: システム監視ツールのウォッチドッグが問題を検出し、すでに $TIMES$ 回失敗しています。",
|
||||
"description": "この文字列は、システム監視ツール・ウォッチドッグのテキストとして使用されます。",
|
||||
"placeholders": {
|
||||
"times": {
|
||||
"content": "$1",
|
||||
"example": "3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain_blocking_enabled": {
|
||||
"message": "ドメインブロックを許可する(AdBlocker を許可していないページで問題が発生する可能性があります。",
|
||||
"description": "この文字列はドメインブロッキングスイッチのラベルとして使用されます。"
|
||||
},
|
||||
"domain_blocking_enabled_title": {
|
||||
"message": "ドメインブロックを許可する(AdBlockerを許可していないページで問題が発生する可能性があります。",
|
||||
"description": "この文字列は、ドメインブロッキングスイッチのタイトルとして使用されます。"
|
||||
},
|
||||
"log_ping_blocked": {
|
||||
"message": "このハイパーリンク監査はブロックされました",
|
||||
"description": "この文字列は、ClearURLs ログのハイパーリンク監査で使用されます。"
|
||||
},
|
||||
"ping_blocking_enabled": {
|
||||
"message": "ハイパーリンク監査をブロックする (<a href='https://html.spec.whatwg.org/multipage/links.html#hyperlink-auditing' target='_blank'>この記事</a>も参照してください)",
|
||||
"description": "この文字列は、ハイパーリンク監査ブロッキングスイッチのラベルとして使用されます。"
|
||||
},
|
||||
"ping_blocking_enabled_title": {
|
||||
"message": "ハイパーリンク監査をブロックする",
|
||||
"description": "この文字列は、ハイパーリンク監査ブロッキングスイッチのタイトルとして使用されます。"
|
||||
},
|
||||
"extension_description": {
|
||||
"message": "URL からトラッキング要素を削除します。",
|
||||
"description": "拡張機能の説明(最大 132 文字)"
|
||||
},
|
||||
"eTag_filtering_log": {
|
||||
"message": "このリクエストから ETag ヘッダが削除されました。",
|
||||
"description": "この文字列は、ClearURLs ログの ETag ヘッダフィルタリングで使用されます。"
|
||||
},
|
||||
"eTag_filtering_enabled": {
|
||||
"message": "リクエストから ETag ヘッダをフィルタリングします (<a href='https://en.wikipedia.org/wiki/HTTP_ETag#Tracking_using_ETags' target='_blank'> この記事 </a> も参照してください)",
|
||||
"description": "この文字列は、ETag ヘッダフィルタリングスイッチのラベルとして使用されます。"
|
||||
},
|
||||
"eTag_filtering_enabled_title": {
|
||||
"message": "ETag ヘッダをフィルタリングします。ヒント: 最初に使用する前にキャッシュをクリアしなければなりません。",
|
||||
"description": "この文字列は、ETag ヘッダフィルタリングスイッチのタイトルとして使用されます。"
|
||||
}
|
||||
}
|
||||
@@ -272,7 +272,7 @@
|
||||
"description": "This string is used as title for the import button on the settings page."
|
||||
},
|
||||
"setting_log_limit_label": {
|
||||
"message": "Ограничивать журнал до $LIMIT$ записей (-1 := ∞)",
|
||||
"message": "Ограничивать журнал до $LIMIT$ записей",
|
||||
"description": "This string is used as name for the log limit label.",
|
||||
"placeholders": {
|
||||
"limit": {
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
"description": "This string is used as title for the import button on the settings page."
|
||||
},
|
||||
"setting_log_limit_label": {
|
||||
"message": "Begränsa loggfilen till $LIMIT$ poster. (-1 := ∞)",
|
||||
"message": "Begränsa loggfilen till $LIMIT$ poster.",
|
||||
"description": "This string is used as name for the log limit label.",
|
||||
"placeholders": {
|
||||
"limit": {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
87
clearurls.js
87
clearurls.js
@@ -251,25 +251,32 @@ function start() {
|
||||
*/
|
||||
function getHash() {
|
||||
//Get the target hash from GitLab
|
||||
fetch(storage.hashURL)
|
||||
.then(function (response) {
|
||||
const responseTextHash = response.clone().text().then(function (responseTextHash) {
|
||||
if (response.ok && $.trim(responseTextHash)) {
|
||||
dataHash = responseTextHash;
|
||||
const response = fetch(storage.hashURL).then(async response => {
|
||||
return {
|
||||
hash: (await response.text()).trim(),
|
||||
status: response.status
|
||||
};
|
||||
});
|
||||
|
||||
if ($.trim(dataHash) !== $.trim(localDataHash)) {
|
||||
fetchFromURL();
|
||||
} else {
|
||||
toObject(storage.ClearURLsData);
|
||||
storeHashStatus(1);
|
||||
saveOnDisk(['hashStatus']);
|
||||
}
|
||||
} else {
|
||||
dataHash = false;
|
||||
deactivateOnFailure();
|
||||
}
|
||||
});
|
||||
});
|
||||
response.then(result => {
|
||||
if (result.status === 200 && result.hash) {
|
||||
dataHash = result.hash;
|
||||
|
||||
if (dataHash !== localDataHash.trim()) {
|
||||
fetchFromURL();
|
||||
} else {
|
||||
toObject(storage.ClearURLsData);
|
||||
storeHashStatus(1);
|
||||
saveOnDisk(['hashStatus']);
|
||||
}
|
||||
} else {
|
||||
throw "The status code was not okay or the given hash were empty.";
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error("[ClearURLs]: Could not download the rules hash from the given URL due to the following error: ", error);
|
||||
dataHash = false;
|
||||
deactivateOnFailure();
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -278,29 +285,33 @@ function start() {
|
||||
* ##################################################################
|
||||
*/
|
||||
function fetchFromURL() {
|
||||
fetch(storage.ruleURL)
|
||||
.then(checkResponse);
|
||||
const response = fetch(storage.ruleURL).then(async response => {
|
||||
return {
|
||||
data: (await response.clone().text()).trim(),
|
||||
hash: await sha256((await response.text()).trim()),
|
||||
status: response.status
|
||||
};
|
||||
})
|
||||
|
||||
function checkResponse(response) {
|
||||
const responseText = response.clone().text().then(function (responseText) {
|
||||
if (response.ok && $.trim(responseText)) {
|
||||
const downloadedFileHash = $.sha256(responseText);
|
||||
|
||||
if ($.trim(downloadedFileHash) === $.trim(dataHash)) {
|
||||
storage.ClearURLsData = responseText;
|
||||
storage.dataHash = downloadedFileHash;
|
||||
storeHashStatus(2);
|
||||
} else {
|
||||
storeHashStatus(3);
|
||||
}
|
||||
storage.ClearURLsData = JSON.parse(storage.ClearURLsData);
|
||||
toObject(storage.ClearURLsData);
|
||||
saveOnDisk(['ClearURLsData', 'dataHash', 'hashStatus']);
|
||||
response.then(result => {
|
||||
if (result.status === 200 && result.data) {
|
||||
if (result.hash === dataHash.trim()) {
|
||||
storage.ClearURLsData = result.data;
|
||||
storage.dataHash = result.hash;
|
||||
storeHashStatus(2);
|
||||
} else {
|
||||
deactivateOnFailure();
|
||||
storeHashStatus(3);
|
||||
}
|
||||
});
|
||||
}
|
||||
storage.ClearURLsData = JSON.parse(storage.ClearURLsData);
|
||||
toObject(storage.ClearURLsData);
|
||||
saveOnDisk(['ClearURLsData', 'dataHash', 'hashStatus']);
|
||||
} else {
|
||||
throw "The status code was not okay or the given rules were empty."
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error("[ClearURLs]: Could not download the rules from the given URL due to the following error: ", error);
|
||||
deactivateOnFailure();
|
||||
});
|
||||
}
|
||||
|
||||
// ##################################################################
|
||||
|
||||
@@ -24,18 +24,18 @@ var length = 0;
|
||||
/**
|
||||
* Load only when document is ready
|
||||
*/
|
||||
$(document).ready(function(){
|
||||
(function() {
|
||||
setText();
|
||||
$('#cleaning_tool_btn').on("click", cleanURLs);
|
||||
});
|
||||
document.getElementById('cleaning_tool_btn').onclick = cleanURLs;
|
||||
})();
|
||||
|
||||
/**
|
||||
* This function cleans all URLs line by line in the textarea.
|
||||
*/
|
||||
function cleanURLs() {
|
||||
const cleanTArea = $('#cleanURLs');
|
||||
const dirtyTArea = $('#dirtyURLs');
|
||||
const urls = dirtyTArea.val().split('\n');
|
||||
const cleanTArea = document.getElementById('cleanURLs');
|
||||
const dirtyTArea = document.getElementById('dirtyURLs');
|
||||
const urls = dirtyTArea.value.split('\n');
|
||||
cleanedURLs = [];
|
||||
length = urls.length;
|
||||
|
||||
@@ -46,7 +46,7 @@ function cleanURLs() {
|
||||
}).then((data) => {
|
||||
cleanedURLs.push(data.response);
|
||||
if(i >= length-1) {
|
||||
cleanTArea.val(cleanedURLs.join('\n'));
|
||||
cleanTArea.value= cleanedURLs.join('\n');
|
||||
}
|
||||
}, handleError);
|
||||
}
|
||||
@@ -68,11 +68,11 @@ function translate(string)
|
||||
function setText()
|
||||
{
|
||||
document.title = translate('cleaning_tool_page_title');
|
||||
$('#page_title').text(translate('cleaning_tool_page_title'));
|
||||
$('#cleaning_tool_description').text(translate('cleaning_tool_description'));
|
||||
$('#cleaning_tool_btn').text(translate('cleaning_tool_btn'));
|
||||
$('#cleaning_tool_dirty_urls_label').text(translate('cleaning_tool_dirty_urls_label'));
|
||||
$('#cleaning_tool_clean_urls_label').text(translate('cleaning_tool_clean_urls_label'));
|
||||
document.getElementById('page_title').textContent = translate('cleaning_tool_page_title');
|
||||
document.getElementById('cleaning_tool_description').textContent = translate('cleaning_tool_description');
|
||||
document.getElementById('cleaning_tool_btn').textContent = translate('cleaning_tool_btn');
|
||||
document.getElementById('cleaning_tool_dirty_urls_label').textContent = translate('cleaning_tool_dirty_urls_label');
|
||||
document.getElementById('cleaning_tool_clean_urls_label').textContent = translate('cleaning_tool_clean_urls_label');
|
||||
}
|
||||
|
||||
function handleError(error) {
|
||||
|
||||
@@ -52,21 +52,32 @@ function getLog()
|
||||
return b.timestamp - a.timestamp;
|
||||
});
|
||||
|
||||
const length = Object.keys(log.log).length;
|
||||
let row;
|
||||
if(length !== 0)
|
||||
{
|
||||
for(let i=0; i<length;i++)
|
||||
{
|
||||
row = "<tr>" +
|
||||
"<td>"+log.log[i].before+"</td>" +
|
||||
"<td>"+log.log[i].after+"</td>" +
|
||||
"<td>"+log.log[i].rule+"</td>" +
|
||||
"<td>"+toDate(log.log[i].timestamp)+"</td>";
|
||||
$('#tbody').append(row);
|
||||
}
|
||||
}
|
||||
$('#logTable').DataTable({
|
||||
"data": log.log,
|
||||
"columns": [
|
||||
{
|
||||
"data": "before",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"data": "after",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"data": "rule",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"data": "timestamp",
|
||||
"type": "date"
|
||||
}
|
||||
],
|
||||
"columnDefs": [
|
||||
{
|
||||
targets: 3,
|
||||
render: toDate
|
||||
}
|
||||
],
|
||||
"pageLength": 10,
|
||||
"language": {
|
||||
"url": getDataTableTranslation()
|
||||
@@ -132,13 +143,13 @@ function importGlobalLog(evt) {
|
||||
/**
|
||||
* Load only when document is ready
|
||||
*/
|
||||
$(document).ready(function(){
|
||||
(function () {
|
||||
setText();
|
||||
getLog();
|
||||
$('#reset_log_btn').on("click", resetGlobalLog);
|
||||
$('#export_log_btn').on("click", exportGlobalLog);
|
||||
$('#importLog').on("change", importGlobalLog);
|
||||
});
|
||||
document.getElementById('reset_log_btn').onclick = resetGlobalLog;
|
||||
document.getElementById('export_log_btn').onclick = exportGlobalLog;
|
||||
document.getElementById('importLog').onchange = importGlobalLog;
|
||||
})();
|
||||
|
||||
/**
|
||||
* Translate a string with the i18n API.
|
||||
@@ -156,17 +167,17 @@ function translate(string)
|
||||
function setText()
|
||||
{
|
||||
document.title = translate('log_html_page_title');
|
||||
$('#page_title').text(translate('log_html_page_title'));
|
||||
$('#reset_log_btn').text(translate('log_html_reset_button'))
|
||||
.prop('title', translate('log_html_reset_button_title'));
|
||||
$('#head_1').text(translate('log_html_table_head_1'));
|
||||
$('#head_2').text(translate('log_html_table_head_2'));
|
||||
$('#head_3').text(translate('log_html_table_head_3'));
|
||||
$('#head_4').text(translate('log_html_table_head_4'));
|
||||
$('#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'));
|
||||
$('#importLog').prop('title', translate('log_html_import_button_title'));
|
||||
document.getElementById('page_title').textContent = translate('log_html_page_title');
|
||||
document.getElementById('reset_log_btn').textContent = translate('log_html_reset_button');
|
||||
document.getElementById('reset_log_btn').setAttribute('title', translate('log_html_reset_button_title'));
|
||||
document.getElementById('head_1').textContent = translate('log_html_table_head_1');
|
||||
document.getElementById('head_2').textContent = translate('log_html_table_head_2');
|
||||
document.getElementById('head_3').textContent = translate('log_html_table_head_3');
|
||||
document.getElementById('head_4').textContent = translate('log_html_table_head_4');
|
||||
document.getElementById('export_log_btn_text').textContent = translate('log_html_export_button');
|
||||
document.getElementById('export_log_btn').setAttribute('title', translate('log_html_export_button_title'));
|
||||
document.getElementById('import_log_btn_text').textContent = translate('log_html_import_button');
|
||||
document.getElementById('importLog').setAttribute('title', translate('log_html_import_button_title'));
|
||||
}
|
||||
|
||||
function handleError(error) {
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
*/
|
||||
|
||||
/*jshint esversion: 6 */
|
||||
var element = $("#statistics_value");
|
||||
var elGlobalPercentage = $("#statistics_value_global_percentage");
|
||||
var elProgressbar_blocked = $('#progress_blocked');
|
||||
var elProgressbar_non_blocked = $('#progress_non_blocked');
|
||||
var elTotal = $('#statistics_total_elements');
|
||||
var element = document.getElementById('statistics_value');
|
||||
var elGlobalPercentage = document.getElementById('statistics_value_global_percentage');
|
||||
var elProgressbar_blocked = document.getElementById('progress_blocked');
|
||||
var elProgressbar_non_blocked = document.getElementById('progress_non_blocked');
|
||||
var elTotal = document.getElementById('statistics_total_elements');
|
||||
var globalPercentage = 0;
|
||||
var globalCounter;
|
||||
var globalurlcounter;
|
||||
@@ -55,11 +55,11 @@ function changeStatistics()
|
||||
|
||||
if(isNaN(Number(globalPercentage))) globalPercentage = 0;
|
||||
|
||||
element.text(globalCounter.toLocaleString());
|
||||
elGlobalPercentage.text(globalPercentage+"%");
|
||||
elProgressbar_blocked.css('width', globalPercentage+'%');
|
||||
elProgressbar_non_blocked.css('width', (100-globalPercentage)+'%');
|
||||
elTotal.text(globalurlcounter.toLocaleString());
|
||||
element.textContent = globalCounter.toLocaleString();
|
||||
elGlobalPercentage.textContent = globalPercentage+"%";
|
||||
elProgressbar_blocked.style.width = globalPercentage+'%';
|
||||
elProgressbar_non_blocked.style.width = (100-globalPercentage)+'%';
|
||||
elTotal.textContent = globalurlcounter.toLocaleString();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -67,14 +67,14 @@ function changeStatistics()
|
||||
*/
|
||||
function setHashStatus()
|
||||
{
|
||||
let element = $('#hashStatus');
|
||||
let element = document.getElementById('hashStatus');
|
||||
|
||||
if(hashStatus)
|
||||
{
|
||||
element.text(translate(hashStatus));
|
||||
element.textContent = translate(hashStatus);
|
||||
}
|
||||
else {
|
||||
element.text(translate('hash_status_code_5'));
|
||||
element.textContent = translate('hash_status_code_5');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -86,14 +86,14 @@ function setHashStatus()
|
||||
*/
|
||||
function changeSwitchButton(id, storageID)
|
||||
{
|
||||
let element = $('#'+id);
|
||||
let element = document.getElementById(id);
|
||||
|
||||
changeVisibility(id, storageID);
|
||||
|
||||
element.on('change', function(){
|
||||
element.onchange = function(){
|
||||
browser.runtime.sendMessage({
|
||||
function: "setData",
|
||||
params: [storageID, element.is(':checked')]
|
||||
params: [storageID, element.checked]
|
||||
}).then((data) => {
|
||||
if(storageID === "globalStatus"){
|
||||
browser.runtime.sendMessage({
|
||||
@@ -108,7 +108,7 @@ function changeSwitchButton(id, storageID)
|
||||
params: []
|
||||
}).catch(handleError);
|
||||
}).catch(handleError);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -121,10 +121,10 @@ function changeVisibility(id, storageID)
|
||||
switch(storageID)
|
||||
{
|
||||
case "loggingStatus":
|
||||
element = $('#log_section');
|
||||
element = document.getElementById('log_section');
|
||||
break;
|
||||
case "statisticsStatus":
|
||||
element = $('#statistic_section');
|
||||
element = document.getElementById('statistic_section');
|
||||
break;
|
||||
default:
|
||||
element = "undefine";
|
||||
@@ -132,14 +132,14 @@ function changeVisibility(id, storageID)
|
||||
|
||||
if(element !== "undefine")
|
||||
{
|
||||
if($('#'+id).is(':checked'))
|
||||
if(document.getElementById(id).checked)
|
||||
{
|
||||
element.css('display', '');
|
||||
element.css('display', '');
|
||||
element.style.display = '';
|
||||
element.style.display = '';
|
||||
}
|
||||
else {
|
||||
element.css('display', 'none');
|
||||
element.css('display', 'none');
|
||||
element.style.display = 'none';
|
||||
element.style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -151,8 +151,8 @@ function changeVisibility(id, storageID)
|
||||
*/
|
||||
function setSwitchButton(id, varname)
|
||||
{
|
||||
let element = $('#'+id);
|
||||
element.prop('checked', this[varname]);
|
||||
const element = document.getElementById(id);
|
||||
element.checked = this[varname];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -180,7 +180,7 @@ function resetGlobalCounter(){
|
||||
changeStatistics();
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
(function() {
|
||||
loadData("globalCounter")
|
||||
.then(() => loadData("globalurlcounter"))
|
||||
.then(() => loadData("globalStatus"))
|
||||
@@ -191,17 +191,17 @@ $(document).ready(function(){
|
||||
.then(() => loadData("getCurrentURL", "currentURL"))
|
||||
.then(() => {
|
||||
init();
|
||||
$('#reset_counter_btn').on("click", resetGlobalCounter);
|
||||
document.getElementById('reset_counter_btn').onclick = resetGlobalCounter;
|
||||
changeSwitchButton("globalStatus", "globalStatus");
|
||||
changeSwitchButton("tabcounter", "badgedStatus");
|
||||
changeSwitchButton("logging", "loggingStatus");
|
||||
changeSwitchButton("statistics", "statisticsStatus");
|
||||
$('#loggingPage').attr('href', browser.extension.getURL('./html/log.html'));
|
||||
$('#settings').attr('href', browser.extension.getURL('./html/settings.html'));
|
||||
$('#cleaning_tools').attr('href', browser.extension.getURL('./html/cleaningTool.html'));
|
||||
document.getElementById('loggingPage').href = browser.extension.getURL('./html/log.html');
|
||||
document.getElementById('settings').href = browser.extension.getURL('./html/settings.html');
|
||||
document.getElementById('cleaning_tools').href = browser.extension.getURL('./html/cleaningTool.html');
|
||||
setText();
|
||||
});
|
||||
});
|
||||
})();
|
||||
|
||||
/**
|
||||
* Set the text for the UI.
|
||||
@@ -220,7 +220,7 @@ function setText()
|
||||
injectText('configs_switch_filter','popup_html_configs_switch_filter');
|
||||
injectText('configs_head','popup_html_configs_head');
|
||||
injectText('configs_switch_statistics','configs_switch_statistics');
|
||||
$('#donate').prop('title', translate('donate_button'));
|
||||
document.getElementById('donate').title = translate('donate_button');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -232,8 +232,8 @@ function setText()
|
||||
*/
|
||||
function injectText(id, attribute, tooltip = "")
|
||||
{
|
||||
let object = $('#'+id);
|
||||
object.text(translate(attribute));
|
||||
const object = document.getElementById(id);
|
||||
object.textContent = translate(attribute);
|
||||
|
||||
/*
|
||||
This function will throw an error if no translation
|
||||
@@ -243,7 +243,7 @@ function injectText(id, attribute, tooltip = "")
|
||||
|
||||
if(tooltip !== "")
|
||||
{
|
||||
object.prop('title', tooltip);
|
||||
object.setAttribute('title', tooltip);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,28 +18,47 @@
|
||||
|
||||
var settings = [];
|
||||
|
||||
getData();
|
||||
|
||||
/**
|
||||
* Load only when document is ready
|
||||
*/
|
||||
$(document).ready(function(){
|
||||
setText();
|
||||
$("#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);
|
||||
const pickr = Pickr.create({
|
||||
el: '#badged-color-picker',
|
||||
theme: 'nano',
|
||||
components: {
|
||||
preview: true,
|
||||
opacity: true,
|
||||
hue: true,
|
||||
default: '#FFA500',
|
||||
comparison: false,
|
||||
interaction: {
|
||||
hex: true,
|
||||
rgba: false,
|
||||
hsla: false,
|
||||
hsva: false,
|
||||
cmyk: false,
|
||||
input: true,
|
||||
clear: false,
|
||||
save: true
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Reset everything.
|
||||
* Set everthing to the default values.
|
||||
*/
|
||||
function reset()
|
||||
{
|
||||
* Load only when document is ready
|
||||
*/
|
||||
(function () {
|
||||
pickr.on('init', () => {
|
||||
getData();
|
||||
setText();
|
||||
document.getElementById('reset_settings_btn').onclick = reset;
|
||||
document.getElementById('export_settings_btn').onclick = exportSettings;
|
||||
document.getElementById('importSettings').onchange = importSettings;
|
||||
document.getElementById('save_settings_btn').onclick = save;
|
||||
});
|
||||
})();
|
||||
|
||||
/**
|
||||
* Reset everything.
|
||||
* Set everthing to the default values.
|
||||
*/
|
||||
function reset() {
|
||||
browser.runtime.sendMessage({
|
||||
function: "initSettings",
|
||||
params: []
|
||||
@@ -57,15 +76,14 @@ function reset()
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the settings.
|
||||
*/
|
||||
function save()
|
||||
{
|
||||
saveData("badged_color", $('input[name=badged_color]').val())
|
||||
.then(() => saveData("ruleURL", $('input[name=ruleURL]').val()))
|
||||
.then(() => saveData("hashURL", $('input[name=hashURL]').val()))
|
||||
.then(() => saveData("types", $('input[name=types]').val()))
|
||||
.then(() => saveData("logLimit", $('input[name=logLimit]').val()))
|
||||
* Saves the settings.
|
||||
*/
|
||||
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("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({
|
||||
function: "setBadgedStatus",
|
||||
params: []
|
||||
@@ -85,27 +103,32 @@ function save()
|
||||
*
|
||||
* @param {string} string Name of the attribute used for localization
|
||||
* @param {string[]} placeholders Array of placeholders
|
||||
*/
|
||||
function translate(string, ...placeholders)
|
||||
{
|
||||
*/
|
||||
function translate(string, ...placeholders) {
|
||||
return browser.i18n.getMessage(string, placeholders);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the data.
|
||||
*/
|
||||
function getData()
|
||||
{
|
||||
loadData("badged_color")
|
||||
.then(() => loadData("ruleURL"))
|
||||
* Get the data.
|
||||
*/
|
||||
function getData() {
|
||||
browser.runtime.sendMessage({
|
||||
function: "getData",
|
||||
params: ["badged_color"]
|
||||
}).then(data => {
|
||||
settings["badged_color"] = data.response;
|
||||
pickr.setColor(data.response, false);
|
||||
}).catch(handleError);
|
||||
|
||||
loadData("ruleURL")
|
||||
.then(() => loadData("hashURL"))
|
||||
.then(() => loadData("types"))
|
||||
.then(() => loadData("logLimit"))
|
||||
.then(logData => {
|
||||
if(logData.response === undefined || logData.response === -1) {
|
||||
$('#logLimit_label').text(translate('setting_log_limit_label', "∞"));
|
||||
if (logData.response === undefined) {
|
||||
document.getElementById('logLimit_label').textContent = translate('setting_log_limit_label', "0");
|
||||
} else {
|
||||
$('#logLimit_label').text(translate('setting_log_limit_label', logData.response));
|
||||
document.getElementById('logLimit_label').textContent = translate('setting_log_limit_label', logData.response);
|
||||
}
|
||||
}).catch(handleError);
|
||||
|
||||
@@ -140,7 +163,10 @@ async function loadData(name) {
|
||||
params: [name]
|
||||
}).then(data => {
|
||||
settings[name] = data.response;
|
||||
$('input[name='+name+']').val(data.response);
|
||||
if (document.querySelector('input[id=' + name + ']') == null) {
|
||||
console.debug(name)
|
||||
}
|
||||
document.querySelector('input[id=' + name + ']').value = data.response;
|
||||
resolve(data);
|
||||
}, handleError);
|
||||
});
|
||||
@@ -166,33 +192,32 @@ async function saveData(key, data) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the text for the UI.
|
||||
*/
|
||||
function setText()
|
||||
{
|
||||
* Set the text for the UI.
|
||||
*/
|
||||
function setText() {
|
||||
document.title = translate('settings_html_page_title');
|
||||
$('#page_title').text(translate('settings_html_page_title'));
|
||||
$('#badged_color_label').text(translate('badged_color_label'));
|
||||
$('#reset_settings_btn').text(translate('setting_html_reset_button'))
|
||||
.prop('title', translate('setting_html_reset_button_title'));
|
||||
$('#rule_url_label').text(translate('setting_rule_url_label'));
|
||||
$('#hash_url_label').text(translate('setting_hash_url_label'));
|
||||
$('#types_label').html(translate('setting_types_label'));
|
||||
$('#save_settings_btn').text(translate('settings_html_save_button'))
|
||||
.prop('title', translate('settings_html_save_button_title'));
|
||||
document.getElementById('page_title').textContent = translate('settings_html_page_title');
|
||||
document.getElementById('badged_color_label').textContent = translate('badged_color_label');
|
||||
document.getElementById('reset_settings_btn').textContent = translate('setting_html_reset_button');
|
||||
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('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'));
|
||||
injectText("context_menu_enabled", "context_menu_enabled");
|
||||
$('#history_listener_enabled').html(translate('history_listener_enabled'));
|
||||
document.getElementById('history_listener_enabled').innerHTML = translate('history_listener_enabled');
|
||||
injectText("local_hosts_skipping", "local_hosts_skipping");
|
||||
$('#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'));
|
||||
$('#importSettings').prop('title', translate('setting_html_import_button_title'));
|
||||
document.getElementById('export_settings_btn_text').textContent = translate('setting_html_export_button');
|
||||
document.getElementById('export_settings_btn').setAttribute('title', translate('setting_html_export_button_title'));
|
||||
document.getElementById('import_settings_btn_text').textContent = translate('setting_html_import_button');
|
||||
document.getElementById('importSettings').setAttribute('title', translate('setting_html_import_button_title'));
|
||||
injectText("referral_marketing_enabled", "referral_marketing_enabled");
|
||||
injectText("domain_blocking_enabled", "domain_blocking_enabled");
|
||||
$('#ping_blocking_enabled').html(translate('ping_blocking_enabled'))
|
||||
.prop('title', translate('ping_blocking_enabled_title'));
|
||||
$('#eTag_filtering_enabled').html(translate('eTag_filtering_enabled'))
|
||||
.prop('title', translate('eTag_filtering_enabled_title'))
|
||||
document.getElementById('ping_blocking_enabled').innerHTML = translate('ping_blocking_enabled');
|
||||
document.getElementById('ping_blocking_enabled').setAttribute('title', translate('ping_blocking_enabled_title'));
|
||||
document.getElementById('eTag_filtering_enabled').innerHTML = translate('eTag_filtering_enabled');
|
||||
document.getElementById('eTag_filtering_enabled').setAttribute('title', translate('eTag_filtering_enabled_title'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -220,10 +245,10 @@ function importSettings(evt) {
|
||||
let file = evt.target.files[0];
|
||||
let fileReader = new FileReader();
|
||||
|
||||
fileReader.onload = function(e) {
|
||||
fileReader.onload = function (e) {
|
||||
let data = JSON.parse(e.target.result);
|
||||
const length = Object.keys(data).length;
|
||||
let i=0;
|
||||
let i = 0;
|
||||
|
||||
Object.entries(data).forEach(([key, value]) => {
|
||||
browser.runtime.sendMessage({
|
||||
@@ -231,7 +256,7 @@ function importSettings(evt) {
|
||||
params: [key, value]
|
||||
}).then(() => {
|
||||
i++;
|
||||
if(i === length) {
|
||||
if (i === length) {
|
||||
location.reload();
|
||||
}
|
||||
}, handleError);
|
||||
@@ -249,20 +274,19 @@ function handleError(error) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the value of a switch button.
|
||||
* @param {string} id HTML id
|
||||
* @param {string} storageID storage internal id
|
||||
*/
|
||||
function changeSwitchButton(id, storageID)
|
||||
{
|
||||
let element = $('#'+id);
|
||||
* Change the value of a switch button.
|
||||
* @param {string} id HTML id
|
||||
* @param {string} storageID storage internal id
|
||||
*/
|
||||
function changeSwitchButton(id, storageID) {
|
||||
let element = document.getElementById(id);
|
||||
|
||||
element.on('change', function(){
|
||||
element.onchange = function () {
|
||||
browser.runtime.sendMessage({
|
||||
function: "setData",
|
||||
params: [storageID, element.is(':checked')]
|
||||
}).then((data) => {
|
||||
if(storageID === "globalStatus"){
|
||||
params: [storageID, element.checked]
|
||||
}).then(() => {
|
||||
if (storageID === "globalStatus") {
|
||||
browser.runtime.sendMessage({
|
||||
function: "changeIcon",
|
||||
params: []
|
||||
@@ -274,41 +298,38 @@ function changeSwitchButton(id, storageID)
|
||||
params: []
|
||||
}).catch(handleError);
|
||||
}).catch(handleError);
|
||||
});
|
||||
};
|
||||
setSwitchButton(id, storageID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to inject the translated text and tooltip.
|
||||
*
|
||||
* @param {string} id ID of the HTML element
|
||||
* @param {string} attribute Name of the attribute used for localization
|
||||
* @param {string} tooltip
|
||||
*/
|
||||
function injectText(id, attribute, tooltip = "")
|
||||
{
|
||||
let object = $('#'+id);
|
||||
object.text(translate(attribute));
|
||||
* Helper function to inject the translated text and tooltip.
|
||||
*
|
||||
* @param {string} id ID of the HTML element
|
||||
* @param {string} attribute Name of the attribute used for localization
|
||||
* @param {string} tooltip
|
||||
*/
|
||||
function injectText(id, attribute, tooltip = "") {
|
||||
let object = document.getElementById(id);
|
||||
object.textContent = translate(attribute);
|
||||
|
||||
/*
|
||||
This function will throw an error if no translation
|
||||
is found for the tooltip. This is a planned error.
|
||||
*/
|
||||
tooltip = translate(attribute+"_title");
|
||||
tooltip = translate(attribute + "_title");
|
||||
|
||||
if(tooltip !== "")
|
||||
{
|
||||
object.prop('title', tooltip);
|
||||
if (tooltip !== "") {
|
||||
object.setAttribute('title', tooltip);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of a switch button.
|
||||
* @param {string} id HTML id
|
||||
* @param {string} varname js internal variable name
|
||||
*/
|
||||
function setSwitchButton(id, varname)
|
||||
{
|
||||
let element = $('#'+id);
|
||||
element.prop('checked', settings[varname]);
|
||||
* Set the value of a switch button.
|
||||
* @param {string} id HTML id
|
||||
* @param {string} varname js internal variable name
|
||||
*/
|
||||
function setSwitchButton(id, varname) {
|
||||
let element = document.getElementById(id);
|
||||
element.checked = settings[varname];
|
||||
}
|
||||
|
||||
@@ -27,18 +27,18 @@
|
||||
function setText()
|
||||
{
|
||||
document.title = translate('blocked_html_title');
|
||||
$('#title').html(translate('blocked_html_title'));
|
||||
$('#body').html(translate('blocked_html_body'));
|
||||
$('#page').text(translate('blocked_html_button'));
|
||||
document.getElementById('title').innerHTML = translate('blocked_html_title');
|
||||
document.getElementById('body').innerHTML = translate('blocked_html_body');
|
||||
document.getElementById('page').textContent = translate('blocked_html_button');
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
(function() {
|
||||
setText();
|
||||
|
||||
let source = new URLSearchParams(window.location.search).get("source");
|
||||
$('#page').attr('href', decodeURIComponent(source));
|
||||
});
|
||||
const source = new URLSearchParams(window.location.search).get("source");
|
||||
document.getElementById('page').href = decodeURIComponent(source);
|
||||
})();
|
||||
|
||||
/**
|
||||
* Translate a string with the i18n API.
|
||||
|
||||
@@ -157,7 +157,7 @@ function setData(key, value) {
|
||||
storage[key] = value.split(',');
|
||||
break;
|
||||
case "logLimit":
|
||||
storage[key] = Number(value);
|
||||
storage[key] = Math.max(0, Number(value));
|
||||
break;
|
||||
default:
|
||||
storage[key] = value;
|
||||
@@ -206,7 +206,7 @@ function initSettings() {
|
||||
storage.watchDogErrorCount = 0;
|
||||
|
||||
if (getBrowser() === "Firefox") {
|
||||
storage.types = ["font", "image", "imageset", "main_frame", "media", "object", "object_subrequest", "other", "script", "stylesheet", "sub_frame", "websocket", "xbl", "xml_dtd", "xmlhttprequest", "xslt"];
|
||||
storage.types = ["font", "image", "imageset", "main_frame", "media", "object", "object_subrequest", "other", "script", "stylesheet", "sub_frame", "websocket", "xml_dtd", "xmlhttprequest", "xslt"];
|
||||
storage.pingRequestTypes = ["ping", "beacon"];
|
||||
} else if (getBrowser() === "Chrome") {
|
||||
storage.types = ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "csp_report", "media", "websocket", "other"];
|
||||
|
||||
@@ -21,6 +21,12 @@
|
||||
* This script is responsible for some tools.
|
||||
*/
|
||||
|
||||
// Needed by the sha256 method
|
||||
const enc = new TextEncoder();
|
||||
|
||||
// Max amount of log entries to prevent performance issues
|
||||
const logThreshold = 5000;
|
||||
|
||||
/*
|
||||
* To support Waterfox.
|
||||
*/
|
||||
@@ -95,6 +101,10 @@ function extractHost(url) {
|
||||
function checkLocalURL(url) {
|
||||
let host = extractHost(url);
|
||||
|
||||
if(!host.match(/^\d/) && host !== 'localhost') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ipRangeCheck(host, ["10.0.0.0/8", "172.16.0.0/12",
|
||||
"192.168.0.0/16", "100.64.0.0/10",
|
||||
"169.254.0.0/16", "127.0.0.1"]) ||
|
||||
@@ -265,17 +275,29 @@ function getBrowser() {
|
||||
|
||||
/**
|
||||
* Decodes an URL, also one that is encoded multiple times.
|
||||
*
|
||||
* @see https://stackoverflow.com/a/38265168
|
||||
*
|
||||
* @param url the url, that should be decoded
|
||||
*/
|
||||
function decodeURL(url) {
|
||||
const rtn = decodeURIComponent(url);
|
||||
if (rtn.indexOf("http://") === -1 && rtn.indexOf("https://") === -1) {
|
||||
return decodeURL(rtn);
|
||||
let rtn = decodeURIComponent(url);
|
||||
|
||||
while(isEncodedURI(rtn)) {
|
||||
rtn = decodeURIComponent(rtn);
|
||||
}
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true, iff the given URI is encoded
|
||||
* @see https://stackoverflow.com/a/38265168
|
||||
*/
|
||||
function isEncodedURI(uri) {
|
||||
return uri !== decodeURIComponent(uri || '')
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of at `key` an object. If the resolved value is `undefined`, the `defaultValue` is returned in its place.
|
||||
*
|
||||
@@ -287,26 +309,23 @@ Object.prototype.getOrDefault = function (key, defaultValue) {
|
||||
};
|
||||
|
||||
function handleError(error) {
|
||||
console.log("[ClearURLs ERROR]:" + error);
|
||||
console.error("[ClearURLs ERROR]:" + error);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to log all activities from ClearUrls.
|
||||
* Only logging when activated.
|
||||
* The log is only temporary saved in the cache and will
|
||||
* permanently saved with the saveLogOnClose function.
|
||||
*
|
||||
* @param beforeProcessing the url before the clear process
|
||||
* @param afterProcessing the url after the clear process
|
||||
* @param rule the rule that triggered the process
|
||||
*/
|
||||
function pushToLog(beforeProcessing, afterProcessing, rule) {
|
||||
const limit = storage.logLimit;
|
||||
if (storage.loggingStatus && limit !== 0) {
|
||||
if (limit > 0 && !isNaN(limit)) {
|
||||
while (storage.log.log.length >= limit) {
|
||||
storage.log.log.shift();
|
||||
}
|
||||
const limit = Math.max(0, storage.logLimit);
|
||||
if (storage.loggingStatus && limit !== 0 && !isNaN(limit)) {
|
||||
while (storage.log.log.length >= limit
|
||||
|| storage.log.log.length >= logThreshold) {
|
||||
storage.log.log.shift();
|
||||
}
|
||||
|
||||
storage.log.log.push(
|
||||
@@ -326,4 +345,21 @@ function pushToLog(beforeProcessing, afterProcessing, rule) {
|
||||
*/
|
||||
function isStorageAvailable() {
|
||||
return storage.ClearURLsData.length !== 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method calculates the SHA-256 hash as HEX string of the given message.
|
||||
* This method uses the native hashing implementations of the SubtleCrypto interface which is supported by all browsers
|
||||
* that implement the Web Cryptography API specification and is based on:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
|
||||
*
|
||||
* @param message message for which the hash should be calculated
|
||||
* @returns {Promise<string>} SHA-256 of the given message
|
||||
*/
|
||||
async function sha256(message) {
|
||||
const msgUint8 = enc.encode(message);
|
||||
const hashBuffer = await crypto.subtle.digest('SHA-256', msgUint8);
|
||||
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
||||
|
||||
return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');
|
||||
}
|
||||
@@ -21,4 +21,4 @@
|
||||
* @return version
|
||||
*/
|
||||
const version = browser.runtime.getManifest().version;
|
||||
$('#version').text(version);
|
||||
document.getElementById('version').textContent = version;
|
||||
|
||||
10
css/bootstrap-colorpicker.min.css
vendored
10
css/bootstrap-colorpicker.min.css
vendored
File diff suppressed because one or more lines are too long
1
css/pickr.nano.min.css
vendored
Normal file
1
css/pickr.nano.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -151,8 +151,7 @@
|
||||
"sourceid",
|
||||
"sxsrf",
|
||||
"rlz",
|
||||
"i-would-rather-use-firefox",
|
||||
"stick"
|
||||
"i-would-rather-use-firefox"
|
||||
],
|
||||
"referralMarketing": [
|
||||
"referrer"
|
||||
@@ -177,7 +176,8 @@
|
||||
"redirections": [
|
||||
".*google\\..*\\/.*url\\?.*url=((https|http)[^&]+)",
|
||||
".*google\\..*\\/.*url\\?.*q=((https|http)[^&]+)",
|
||||
".*google\\..*\\/.*adurl=([^&]+)"
|
||||
".*google\\..*\\/.*adurl=([^&]+)",
|
||||
".*google\\..*\\/amp\\/s\\/([^&]*)"
|
||||
],
|
||||
"forceRedirection": true
|
||||
},
|
||||
@@ -250,6 +250,7 @@
|
||||
"(%3F)?hmb_medium",
|
||||
"(%3F)?hmb_source",
|
||||
"(%3F)?[\\?&]?ref[\\_]?",
|
||||
"(%3F)?referrer",
|
||||
"(%3F)?gclid",
|
||||
"(%3F)?otm_[a-zA-Z_]*",
|
||||
"(%3F)?cmpid",
|
||||
@@ -263,7 +264,7 @@
|
||||
"Echobox",
|
||||
"(%3F)?spm",
|
||||
"(%3F)?vn(_[a-zA-Z]*)+",
|
||||
"(%3F)?cid"
|
||||
"(%3F)?tracking_source"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
@@ -307,7 +308,8 @@
|
||||
".*agenciatributaria.gob.es.*",
|
||||
".*login\\.ingbank\\.pl.*",
|
||||
"wss?:\\/\\/.*zoom\\.us.*",
|
||||
".*api\\.bilibili\\.com.*"
|
||||
".*api\\.bilibili\\.com.*",
|
||||
".*onet\\.pl.*\\?.*utm_campaign=.*"
|
||||
],
|
||||
"redirections": [],
|
||||
"forceRedirection": false
|
||||
@@ -420,9 +422,7 @@
|
||||
"pageid",
|
||||
"padding",
|
||||
"ls_ref",
|
||||
"action_history",
|
||||
"fbid",
|
||||
"comment_id"
|
||||
"action_history"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
@@ -472,9 +472,12 @@
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"exceptions": [
|
||||
"reddit\\.app\\.link"
|
||||
],
|
||||
"redirections": [
|
||||
".*out\\.reddit\\.\\w{2,}\\/.*url=([^&]*)"
|
||||
".*out\\.reddit\\.\\w{2,}\\/.*url=([^&]*)",
|
||||
".*reddit\\.app\\.link.*\\$original_url=([^&]*)"
|
||||
],
|
||||
"forceRedirection": false
|
||||
},
|
||||
@@ -877,8 +880,8 @@
|
||||
],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"aliexpress.com": {
|
||||
"urlPattern": "https?:\\/\\/([a-zA-Z0-9-.]*\\.)?(aliexpress\\.com).*",
|
||||
"aliexpress": {
|
||||
"urlPattern": "https?:\\/\\/([a-zA-Z0-9-.]*\\.)?(aliexpress)(\\.[a-zA-Z]{2,}).*",
|
||||
"completeProvider": false,
|
||||
"rules": [
|
||||
"ws_ab_test",
|
||||
@@ -887,7 +890,13 @@
|
||||
"algo_pvid",
|
||||
"gps-id",
|
||||
"scm[_a-zA-Z\\-]*",
|
||||
"pvid"
|
||||
"cv",
|
||||
"af",
|
||||
"mall_affr",
|
||||
"sk",
|
||||
"dp",
|
||||
"terminal_id",
|
||||
"aff_request_id"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
@@ -1076,6 +1085,18 @@
|
||||
"redirections": [],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"LinkedIn Learning": {
|
||||
"urlPattern": "https?:\\/\\/([a-zA-Z0-9-.]*\\.)?(linkedin\\.com)\//learning.*",
|
||||
"completeProvider": false,
|
||||
"rules": [
|
||||
"u"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"redirections": [],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"smartredirect.de": {
|
||||
"urlPattern": "https?:\\/\\/([a-zA-Z0-9-.]*\\.)?(smartredirect\\.de).*",
|
||||
"completeProvider": false,
|
||||
@@ -1612,7 +1633,6 @@
|
||||
"pos",
|
||||
"abtest",
|
||||
"trackInfo",
|
||||
"user_number_id",
|
||||
"utkn",
|
||||
"scene",
|
||||
"mytmenu",
|
||||
@@ -1620,7 +1640,8 @@
|
||||
"lygClk",
|
||||
"impid",
|
||||
"bftTag",
|
||||
"bftRwd"
|
||||
"bftRwd",
|
||||
"spm"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
@@ -1714,7 +1735,8 @@
|
||||
"lien",
|
||||
"aComposeInputSearch",
|
||||
"type_recherche_forum",
|
||||
"add_mots"
|
||||
"add_mots",
|
||||
"countview"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
@@ -1733,7 +1755,8 @@
|
||||
"RewriteLast",
|
||||
"lien",
|
||||
"aComposeInputSearch",
|
||||
"type_recherche_forum"
|
||||
"type_recherche_forum",
|
||||
"countview"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
@@ -1776,7 +1799,6 @@
|
||||
"rules": [
|
||||
"u_code",
|
||||
"preview_pb",
|
||||
"language",
|
||||
"_d",
|
||||
"timestamp",
|
||||
"user_id",
|
||||
@@ -1947,6 +1969,185 @@
|
||||
"exceptions": [],
|
||||
"redirections": [],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"epicgames.com": {
|
||||
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(epicgames)(\\.com).*",
|
||||
"completeProvider": false,
|
||||
"rules": [
|
||||
"epic_affiliate",
|
||||
"epic_gameId"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"redirections": [],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"onet.pl": {
|
||||
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(onet)(\\.pl).*",
|
||||
"completeProvider": false,
|
||||
"rules": [
|
||||
"srcc",
|
||||
"utm_v",
|
||||
"utm_medium",
|
||||
"utm_source"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"redirections": [],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"allrecipes.com": {
|
||||
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(allrecipes)(\\.com).*",
|
||||
"completeProvider": false,
|
||||
"rules": [
|
||||
"internalSource",
|
||||
"referringId",
|
||||
"referringContentType",
|
||||
"clickId"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"redirections": [],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"europe1.fr": {
|
||||
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(europe1)(\\.fr).*",
|
||||
"completeProvider": false,
|
||||
"rules": [
|
||||
"xtor"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"redirections": [],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"effiliation.com": {
|
||||
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(effiliation)(\\.com).*",
|
||||
"completeProvider": false,
|
||||
"rules": [],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"redirections": [
|
||||
".*url=([^&]*)"
|
||||
],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"argos.co.uk": {
|
||||
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(argos)(\\.co\\.uk).*",
|
||||
"completeProvider": false,
|
||||
"rules": [
|
||||
"istCompanyId",
|
||||
"istFeedId",
|
||||
"istItemId",
|
||||
"istBid",
|
||||
"clickOrigin"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"redirections": [],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"hlserve.com": {
|
||||
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(hlserve)(\\.com).*",
|
||||
"completeProvider": false,
|
||||
"rules": [],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"redirections": [
|
||||
".*dest=([^&]*)"
|
||||
],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"thunderbird.net": {
|
||||
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(thunderbird)(\\.net).*",
|
||||
"completeProvider": false,
|
||||
"rules": [
|
||||
"src"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"redirections": [],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"cnbc.com": {
|
||||
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(cnbc)(\\.com).*",
|
||||
"completeProvider": false,
|
||||
"rules": [
|
||||
"__source"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"redirections": [],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"roblox.com": {
|
||||
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(roblox)(\\.com).*",
|
||||
"completeProvider": false,
|
||||
"rules": [
|
||||
"refPageId"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"redirections": [],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"cell.com": {
|
||||
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(cell)(\\.com).*",
|
||||
"completeProvider": false,
|
||||
"rules": [
|
||||
"_returnURL"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"redirections": [],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"academic.oup.com": {
|
||||
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(academic\\.)(oup)(\\.com).*",
|
||||
"completeProvider": false,
|
||||
"rules": [
|
||||
"redirectedFrom"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"redirections": [],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"flexlinkspro.com": {
|
||||
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(flexlinkspro)(\\.com).*",
|
||||
"completeProvider": false,
|
||||
"rules": [],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"redirections": [
|
||||
".*url=([^&]*)"
|
||||
],
|
||||
"forceRedirection": false
|
||||
},
|
||||
"agata88.com": {
|
||||
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(flexlinkspro)(\\.com).*",
|
||||
"completeProvider": false,
|
||||
"rules": [
|
||||
"source"
|
||||
],
|
||||
"referralMarketing": [],
|
||||
"rawRules": [],
|
||||
"exceptions": [],
|
||||
"redirections": [],
|
||||
"forceRedirection": false
|
||||
}
|
||||
}
|
||||
}
|
||||
3
external_js/pickr.min.js
vendored
Normal file
3
external_js/pickr.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
external_js/popper.min.js
vendored
5
external_js/popper.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,247 +0,0 @@
|
||||
/*
|
||||
* A JavaScript implementation of the SHA256 hash function.
|
||||
*
|
||||
* FILE: sha256.jquery.debug.js
|
||||
* VERSION: 1.0
|
||||
*
|
||||
* MODIFICATION BY: Jacob Bair <orso.zed@gmail.com>
|
||||
* ORIGINAL AUTHOR: Christoph Bichlmeier <informatik@zombiearena.de>
|
||||
*
|
||||
* NOTE: This version is not tested thoroughly!
|
||||
*
|
||||
* Copyright (c) 2003, Christoph Bichlmeier
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holder nor the names of contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* ======================================================================
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
(function($) {
|
||||
$.sha256 = function(data) {
|
||||
var ihash, count, buffer;
|
||||
var hex_digits = "0123456789abcdef";
|
||||
|
||||
/* Hash constant words K: */
|
||||
var K256 = new Array(
|
||||
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
|
||||
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
|
||||
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
|
||||
0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
|
||||
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
|
||||
0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
|
||||
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
|
||||
0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
|
||||
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
|
||||
0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
|
||||
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
|
||||
0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
|
||||
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
|
||||
0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
|
||||
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
|
||||
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
|
||||
);
|
||||
|
||||
var rotateRight = function(n, x) {
|
||||
return ((x >>> n) | (x << (32 - n)));
|
||||
};
|
||||
|
||||
var choice = function(x, y, z) {
|
||||
return ((x & y) ^ (~x & z));
|
||||
};
|
||||
|
||||
var majority = function(x, y, z) {
|
||||
return ((x & y) ^ (x & z) ^ (y & z));
|
||||
};
|
||||
|
||||
var Sigma0 = function(x) {
|
||||
return (rotateRight(2, x) ^ rotateRight(13, x) ^ rotateRight(22, x));
|
||||
};
|
||||
|
||||
var Sigma1 = function(x) {
|
||||
return (rotateRight(6, x) ^ rotateRight(11, x) ^ rotateRight(25, x));
|
||||
};
|
||||
|
||||
var sigma0 = function(x) {
|
||||
return (rotateRight(7, x) ^ rotateRight(18, x) ^ (x >>> 3));
|
||||
};
|
||||
|
||||
var sigma1 = function(x) {
|
||||
return (rotateRight(17, x) ^ rotateRight(19, x) ^ (x >>> 10));
|
||||
};
|
||||
|
||||
var expand = function(W, j) {
|
||||
return (W[j & 0x0f] += sigma1(W[(j + 14) & 0x0f]) + W[(j + 9) & 0x0f] + sigma0(W[(j + 1) & 0x0f]));
|
||||
};
|
||||
|
||||
var safe_add = function (x, y) {
|
||||
var lsw = (x & 0xffff) + (y & 0xffff);
|
||||
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
||||
return (msw << 16) | (lsw & 0xffff);
|
||||
};
|
||||
|
||||
var init = function() {
|
||||
ihash = new Array(8);
|
||||
count = new Array(2);
|
||||
buffer = new Array(64);
|
||||
count[0] = count[1] = 0;
|
||||
ihash[0] = 0x6a09e667;
|
||||
ihash[1] = 0xbb67ae85;
|
||||
ihash[2] = 0x3c6ef372;
|
||||
ihash[3] = 0xa54ff53a;
|
||||
ihash[4] = 0x510e527f;
|
||||
ihash[5] = 0x9b05688c;
|
||||
ihash[6] = 0x1f83d9ab;
|
||||
ihash[7] = 0x5be0cd19;
|
||||
};
|
||||
|
||||
var update = function(data, length) {
|
||||
var index, curpos = 0;
|
||||
|
||||
/* Compute number of bytes mod 64 */
|
||||
index = ((count[0] >> 3) & 0x3f);
|
||||
var remainder = (length & 0x3f);
|
||||
|
||||
/* Update number of bits */
|
||||
if ((count[0] += (length << 3)) < (length << 3)) {
|
||||
count[1]++;
|
||||
}
|
||||
count[1] += (length >> 29);
|
||||
|
||||
/* Transform as many times as possible */
|
||||
for (var i = 0; i + 63 < length; i += 64) {
|
||||
for (var j = index; j < 64; j++) {
|
||||
buffer[j] = data.charCodeAt(curpos++);
|
||||
}
|
||||
transform();
|
||||
index = 0;
|
||||
}
|
||||
|
||||
/* Buffer remaining input */
|
||||
for (var k = 0; k < remainder; k++) {
|
||||
buffer[k] = data.charCodeAt(curpos++);
|
||||
}
|
||||
};
|
||||
|
||||
var transform = function() {
|
||||
var a, b, c, d, e, f, g, h, T1, T2;
|
||||
var W = new Array(16);
|
||||
|
||||
/* Initialize registers with the previous intermediate value */
|
||||
a = ihash[0];
|
||||
b = ihash[1];
|
||||
c = ihash[2];
|
||||
d = ihash[3];
|
||||
e = ihash[4];
|
||||
f = ihash[5];
|
||||
g = ihash[6];
|
||||
h = ihash[7];
|
||||
|
||||
/* make 32-bit words */
|
||||
for (var i = 0; i < 16; i++) {
|
||||
W[i] = ((buffer[(i << 2) + 3]) | (buffer[(i << 2) + 2] << 8) | (buffer[(i << 2) + 1] << 16) | (buffer[i << 2] << 24));
|
||||
}
|
||||
|
||||
for (var j = 0; j < 64; j++) {
|
||||
T1 = h + Sigma1(e) + choice(e, f, g) + K256[j];
|
||||
if (j < 16) {
|
||||
T1 += W[j];
|
||||
} else {
|
||||
T1 += expand(W, j);
|
||||
}
|
||||
T2 = Sigma0(a) + majority(a, b, c);
|
||||
h = g;
|
||||
g = f;
|
||||
f = e;
|
||||
e = safe_add(d, T1);
|
||||
d = c;
|
||||
c = b;
|
||||
b = a;
|
||||
a = safe_add(T1, T2);
|
||||
}
|
||||
|
||||
/* Compute the current intermediate hash value */
|
||||
ihash[0] += a;
|
||||
ihash[1] += b;
|
||||
ihash[2] += c;
|
||||
ihash[3] += d;
|
||||
ihash[4] += e;
|
||||
ihash[5] += f;
|
||||
ihash[6] += g;
|
||||
ihash[7] += h;
|
||||
};
|
||||
|
||||
var final = function() {
|
||||
var index = ((count[0] >> 3) & 0x3f);
|
||||
buffer[index++] = 0x80;
|
||||
|
||||
if (index <= 56) {
|
||||
for (var i = index; i < 56; i++) {
|
||||
buffer[i] = 0;
|
||||
}
|
||||
} else {
|
||||
for (var i = index; i < 64; i++) {
|
||||
buffer[i] = 0;
|
||||
}
|
||||
|
||||
transform();
|
||||
|
||||
for (var i = 0; i < 56; i++) {
|
||||
buffer[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
buffer[56] = (count[1] >>> 24) & 0xff;
|
||||
buffer[57] = (count[1] >>> 16) & 0xff;
|
||||
buffer[58] = (count[1] >>> 8) & 0xff;
|
||||
buffer[59] = count[1] & 0xff;
|
||||
buffer[60] = (count[0] >>> 24) & 0xff;
|
||||
buffer[61] = (count[0] >>> 16) & 0xff;
|
||||
buffer[62] = (count[0] >>> 8) & 0xff;
|
||||
buffer[63] = count[0] & 0xff;
|
||||
|
||||
transform();
|
||||
};
|
||||
|
||||
var encode = function() {
|
||||
var output = "";
|
||||
for (var i = 0; i < 8; i++) {
|
||||
for (var j = 28; j >= 0; j -= 4) {
|
||||
output += hex_digits.charAt((ihash[i] >>> j) & 0x0f);
|
||||
}
|
||||
}
|
||||
return output;
|
||||
};
|
||||
|
||||
if ($.isPlainObject(data) || $.isArray(data)) {
|
||||
data = JSON.stringify(data);
|
||||
}
|
||||
|
||||
init();
|
||||
update(data, data.length);
|
||||
final();
|
||||
|
||||
return encode();
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="../css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../css/dataTables.bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="../css/core.css">
|
||||
<style>
|
||||
td {
|
||||
@@ -77,8 +76,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<!-- Optional JavaScript -->
|
||||
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
||||
<script src="../browser-polyfill.js"></script>
|
||||
<script src="../external_js/jquery-3.4.1.min.js"></script>
|
||||
<script src="../external_js/bootstrap.min.js"></script>
|
||||
<script src="../core_js/cleaning_tool.js"></script>
|
||||
<script src="../core_js/write_version.js"></script>
|
||||
</body>
|
||||
|
||||
@@ -113,9 +113,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
||||
<script src="../browser-polyfill.js"></script>
|
||||
<script src="../external_js/jquery-3.4.1.min.js"></script>
|
||||
<script src="../external_js/bootstrap.min.js"></script>
|
||||
<script src="../external_js/datatables.min.js"></script>
|
||||
<script src="../external_js/fontawesome/all.min.js"></script>
|
||||
<script src="../core_js/log.js"></script>
|
||||
<script src="../core_js/write_version.js"></script>
|
||||
</body>
|
||||
|
||||
@@ -158,8 +158,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<!-- Optional JavaScript -->
|
||||
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
||||
<script type="application/javascript" src="../browser-polyfill.js"></script>
|
||||
<script src="../external_js/jquery-3.4.1.min.js"></script>
|
||||
<script src="../external_js/bootstrap.min.js"></script>
|
||||
<script src="../external_js/fontawesome/all.min.js"></script>
|
||||
<script src="../core_js/popup.js"></script>
|
||||
<script src="../core_js/write_version.js"></script>
|
||||
|
||||
@@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<link rel="stylesheet" href="../css/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="../css/switchButtons.css">
|
||||
<link rel="stylesheet" type="text/css" href="../css/core.css">
|
||||
<link rel="stylesheet" href="../css/bootstrap-colorpicker.min.css">
|
||||
<link rel="stylesheet" href="../css/pickr.nano.min.css">
|
||||
<style>
|
||||
td {
|
||||
word-wrap: break-word;
|
||||
@@ -92,10 +92,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<br />
|
||||
<label id="badged_color_label"></label><br />
|
||||
<div id="badged-color-picker" class="input-group">
|
||||
<input type="text" class="form-control input-lg" value="" name="badged_color" id="badged_color">
|
||||
<span class="input-group-append">
|
||||
<span class="input-group-text colorpicker-input-addon"><i></i></span>
|
||||
</span>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
@@ -116,7 +112,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<br />
|
||||
<p>
|
||||
<label id="logLimit_label"></label><br />
|
||||
<input type="number" id="logLimit" value="" name="logLimit" class="form-control" min="-1">
|
||||
<input type="number" id="logLimit" value="" name="logLimit" class="form-control" min="0" max="5000">
|
||||
</p>
|
||||
<br />
|
||||
<p>
|
||||
@@ -178,11 +174,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
<!-- Optional JavaScript -->
|
||||
<script src="../browser-polyfill.js"></script>
|
||||
<script src="../external_js/jquery-3.4.1.min.js"></script>
|
||||
<script src="../external_js/popper.min.js"></script>
|
||||
<script src="../external_js/bootstrap.min.js"></script>
|
||||
<script src="../external_js/bootstrap-colorpicker.min.js"></script>
|
||||
<script src="../external_js/fontawesome/all.min.js"></script>
|
||||
<script src="../external_js/pickr.min.js"></script>
|
||||
<script src="../core_js/settings.js"></script>
|
||||
<script src="../core_js/write_version.js"></script>
|
||||
</body>
|
||||
|
||||
@@ -69,8 +69,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<!-- Optional JavaScript -->
|
||||
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
||||
<script src="../browser-polyfill.js"></script>
|
||||
<script src="../external_js/jquery-3.4.1.min.js"></script>
|
||||
<script src="../external_js/bootstrap.min.js"></script>
|
||||
<script src="../core_js/siteBlockedAlert.js"></script>
|
||||
<script src="../core_js/write_version.js"></script>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "ClearURLs",
|
||||
"version": "1.17.0",
|
||||
"version": "1.19.0",
|
||||
"author": "Kevin Röbert",
|
||||
"description": "__MSG_extension_description__",
|
||||
"homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls",
|
||||
@@ -52,8 +52,6 @@
|
||||
"background": {
|
||||
"scripts": [
|
||||
"browser-polyfill.js",
|
||||
"external_js/jquery-3.4.1.min.js",
|
||||
"external_js/sha256.jquery.js",
|
||||
"core_js/message_handler.js",
|
||||
"external_js/ip-range-check.js",
|
||||
"core_js/tools.js",
|
||||
|
||||
9473
package-lock.json
generated
9473
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
41
package.json
41
package.json
@@ -1,41 +0,0 @@
|
||||
{
|
||||
"name": "ClearURLs",
|
||||
"description": "ClearURLs is an add-on based on the new WebExtensions technology and is optimized for Firefox. This add-on will remove the tracking fields form all URLs which are visited by the browser and use a rule file, namely data.json. This add-on protects your privacy and block the request from advertising services like doubleclick.net.",
|
||||
"version": "1.2.1.4",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Kevin R.",
|
||||
"email": "clearurls_1@kevinroebert.de",
|
||||
"web": "https://gitlab.com/KevinRoebert"
|
||||
},
|
||||
{
|
||||
"name": "Arne",
|
||||
"email": "clearurls_1@kevinroebert.de",
|
||||
"web": "https://gitlab.com/astaar"
|
||||
}
|
||||
],
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Kevin R.",
|
||||
"email": "clearurls_1@kevinroebert.de",
|
||||
"web": "https://gitlab.com/KevinRoebert"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"DataTables/DataTables": "1.10.16",
|
||||
"ip-range-check": "^0.2.0",
|
||||
"jquery/jquery": "3.2.1",
|
||||
"lauren/pick-a-color": "1.2.3",
|
||||
"orsozed/sha256.jquery.plugin": "1.0",
|
||||
"twbs/bootstrap": "3.3.7"
|
||||
},
|
||||
"bugs": {
|
||||
"web": "https://gitlab.com/KevinRoebert/ClearUrls/issues/new"
|
||||
},
|
||||
"licenses": [
|
||||
{
|
||||
"name": "QaPL v0.2",
|
||||
"url": "https://gitlab.com/KevinRoebert/ClearUrls/blob/master/LICENSE.md"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* ClearURLs
|
||||
* Copyright (c) 2017-2020 Kevin Röbert
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
$servername = "...";
|
||||
$username = "...";
|
||||
$password = "...";
|
||||
$dbname = "...";
|
||||
|
||||
if(isset($_GET['url'])) $url = urldecode($_GET['url']);
|
||||
else http_response_code(404);
|
||||
|
||||
if(!empty($url) && filter_var($url, FILTER_VALIDATE_URL))
|
||||
{
|
||||
$hash = md5($url);
|
||||
|
||||
// Create connection
|
||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||
// Check connection
|
||||
if ($conn->connect_error) {
|
||||
http_response_code(505);
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO reports (hash, url) VALUES ('$hash', '$url')";
|
||||
|
||||
if ($conn->query($sql) === TRUE) {
|
||||
http_response_code(200);
|
||||
} else {
|
||||
http_response_code(500);
|
||||
}
|
||||
|
||||
$conn->close();
|
||||
}
|
||||
else {
|
||||
http_response_code(505);
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user