92 Commits

Author SHA1 Message Date
Kevin R
27af2c8c49 Merge branch 'jquery-removal' into 'master'
Removed jQuery from core scripts

See merge request KevinRoebert/ClearUrls!62
2020-06-05 22:24:04 +00:00
Kevin Röbert
01a911557b Version 1.18.0 2020-06-06 00:23:04 +02:00
Kevin Röbert
54210b71c5 Cleanup 2020-06-06 00:05:50 +02:00
Kevin Röbert
da5fb0b3c0 Removed even more jQuery dependencies 2020-06-06 00:02:03 +02:00
Kevin Röbert
08b62c0d94 Merge branch 'master' into jquery-removal 2020-06-05 21:51:52 +02:00
Kevin R
879fcdae03 Merge branch '475-too-many-protocol-entries-cut-off-the-internet-connection' into 'master'
Resolve "Too many protocol entries cut off the internet connection"

Closes #475

See merge request KevinRoebert/ClearUrls!63
2020-06-05 19:50:56 +00:00
Kevin Röbert
762d83e46c Hard limit for the log of 5000 entries 2020-06-05 21:50:03 +02:00
Kevin Röbert
ae30c0eb53 Removed jQuery from core scripts 2020-06-05 20:13:21 +02:00
Kevin R
0acd24d716 Update data.min.json 2020-05-26 18:28:07 +00:00
Kevin R
22e58ba0e6 Temporarily removed until a whitelist feature is available.
#527
#526
#520
#519
#514
#512
#505
2020-05-26 17:47:41 +00:00
Kevin Röbert
3ade08f344 Merge branch 'master' of https://gitlab.com/KevinRoebert/ClearUrls 2020-05-19 17:37:37 +02:00
Kevin Röbert
ea256a8081 Exception for api.bilibili.com 2020-05-19 17:37:30 +02:00
Kevin
90ab42a510 Merge branch 'add-privacytools-recommendation' into 'master'
Add PrivacyTools recommendation

See merge request KevinRoebert/ClearUrls!60
2020-05-19 15:34:54 +00:00
Kevin Röbert
c60e33d327 Added exception for zoom.us websocket
#513
2020-05-19 17:26:30 +02:00
Luca Trevisani
9f47a35318 Add PrivacyTools recommendation 2020-05-16 17:25:40 +00:00
Kevin Röbert
e931674dfe Added rules & exceptions
#501
#499
#493
#492
#491
#487
#486
#485
#484
#482
#479
#477
#473
2020-05-15 15:54:14 +02:00
Kevin
ed87f72c75 Merge branch 'patch-1' into 'master'
added some fields for marketscreener.com...

Closes #448

See merge request KevinRoebert/ClearUrls!59
2020-05-15 12:03:31 +00:00
DJCrashdummy
ee2e544223 added some fields for marketscreener.com (https://gitlab.com/KevinRoebert/ClearUrls/-/issues/448#note_343173596) 2020-05-15 09:48:40 +00:00
Kevin
9aaf4718f3 Update README.md 2020-04-28 22:50:21 +00:00
Kevin Röbert
bdca5d8659 Merge branch 'master' of https://gitlab.com/KevinRoebert/ClearUrls 2020-04-27 23:57:37 +02:00
Kevin Röbert
caca49b712 Change default logLimit to 100
#475
2020-04-27 23:57:35 +02:00
Röbert
4a1fad9a90 removed overlapping permissions 2020-04-25 15:05:23 +02:00
Kevin Röbert
9fbf5a839a Update rules
#463
#468
#469
#470
2020-04-24 01:19:44 +02:00
Kevin Röbert
8b815c5f50 Revert "Updated rules"
This reverts commit 201f3a9edb.
2020-04-24 01:19:06 +02:00
Kevin Röbert
4370912baa Merge branch 'master' of https://gitlab.com/KevinRoebert/ClearUrls 2020-04-24 01:18:46 +02:00
Kevin Röbert
201f3a9edb Updated rules
#463
#468
#469
#470
2020-04-24 01:17:58 +02:00
Kevin
349c0a79ce Update Bug.md
#478
2020-04-23 22:41:47 +00:00
Kevin Röbert
d74d53c40d Added exception
#471
2020-04-20 22:46:06 +02:00
Kevin Röbert
4030d9325b Update lockdown.yml 2020-04-15 09:05:34 +00:00
Kevin Röbert
fbac0bd1a9 Update lockdown.yml 2020-04-15 09:03:34 +00:00
Kevin Röbert
85ca03fdc0 Merge branch 'KevinRoebert-master-patch-74614' into 'master'
Update .github/lockdown.yml

See merge request KevinRoebert/ClearUrls!58
2020-04-14 23:28:09 +00:00
Kevin Röbert
0fc822a302 Update .github/lockdown.yml 2020-04-14 23:27:57 +00:00
Kevin Röbert
6cc57eae1a Merge branch 'KevinRoebert-master-patch-74450' into 'master'
Update lockdown.yml

See merge request KevinRoebert/ClearUrls!57
2020-04-14 23:26:58 +00:00
Kevin Röbert
694cc4613a Update lockdown.yml 2020-04-14 23:26:16 +00:00
Kevin Röbert
c81dbee1c7 Update data.min.json 2020-04-14 23:12:45 +00:00
Kevin Röbert
3f707bfd3a Version 1.17.0
#457
#462
#445
2020-04-15 00:53:01 +02:00
Kevin Röbert
9d62ddf1b0 Update messages.json (POEditor.com) 2020-04-14 21:26:24 +00:00
Kevin Röbert
1344fd8636 Update messages.json (POEditor.com) 2020-04-14 21:26:23 +00:00
Kevin Röbert
54915cf0de Update messages.json (POEditor.com) 2020-04-14 21:19:19 +00:00
Kevin Röbert
ab325759cd Update messages.json (POEditor.com) 2020-04-14 21:18:17 +00:00
Kevin Röbert
12f63e7f71 Update messages.json (POEditor.com) 2020-04-14 21:16:58 +00:00
Kevin Röbert
7bc3891072 Update messages.json (POEditor.com) 2020-04-14 21:15:14 +00:00
Kevin Röbert
9ff50c965d Update messages.json (POEditor.com) 2020-04-14 21:13:24 +00:00
Kevin Röbert
4014195da8 Update messages.json (POEditor.com) 2020-04-14 21:10:59 +00:00
Kevin Röbert
50aa5e5a73 Update messages.json (POEditor.com) 2020-04-14 21:10:57 +00:00
Kevin Röbert
4a571794dc Update messages.json (POEditor.com) 2020-04-14 21:10:56 +00:00
Kevin Röbert
23d13b0710 Update messages.json (POEditor.com) 2020-04-14 21:10:55 +00:00
Kevin Röbert
d060acae08 Update messages.json (POEditor.com) 2020-04-14 21:10:53 +00:00
Kevin Röbert
28dfe00ff7 Update messages.json (POEditor.com) 2020-04-14 21:10:51 +00:00
Kevin Röbert
5ee667eb92 Update messages.json (POEditor.com) 2020-04-14 21:10:50 +00:00
Kevin Röbert
fda7da7f13 Update messages.json (POEditor.com) 2020-04-14 21:10:48 +00:00
Kevin Röbert
578d4bc48d Update messages.json (POEditor.com) 2020-04-14 21:10:47 +00:00
Kevin Röbert
c7a1c40f9d Update messages.json (POEditor.com) 2020-04-14 21:10:45 +00:00
Kevin Röbert
57e6ed704f Update messages.json (POEditor.com) 2020-04-14 21:10:43 +00:00
Kevin Röbert
9ee55e6536 Update messages.json (POEditor.com) 2020-04-14 21:10:42 +00:00
Kevin Röbert
755db29738 Update messages.json (POEditor.com) 2020-04-14 21:10:40 +00:00
Kevin Röbert
66671aec68 Update messages.json (POEditor.com) 2020-04-14 21:10:38 +00:00
Kevin Röbert
c2f500e060 Update messages.json (POEditor.com) 2020-04-14 21:10:37 +00:00
Kevin Röbert
cfad3d2b23 Update messages.json (POEditor.com) 2020-04-14 21:09:26 +00:00
Kevin Röbert
6d27c8a906 Update messages.json (POEditor.com) 2020-04-14 21:01:06 +00:00
Kevin Röbert
ab19cfd714 Merge branch 'revert-2878af17' into 'master'
Revert "Update messages.json (POEditor.com)"

See merge request KevinRoebert/ClearUrls!56
2020-04-14 20:55:32 +00:00
Kevin Röbert
c64cfbfe86 Revert "Update messages.json (POEditor.com)"
This reverts commit 2878af17b6
2020-04-14 20:55:06 +00:00
Kevin Röbert
b70e0d4912 Update messages.json (POEditor.com) 2020-04-14 20:12:11 +00:00
Kevin Röbert
badc78a954 Added rules and exceptions
#459
#441
#457
#448
#452
2020-04-08 21:20:26 +02:00
Kevin Röbert
c0b7ad9b06 Update README.md 2020-04-02 23:21:38 +00:00
Kevin Röbert
d984b512c0 Update messages.json (POEditor.com) 2020-04-02 22:55:11 +00:00
Kevin Röbert
d4ca4b0362 Update messages.json (POEditor.com) 2020-04-02 22:55:08 +00:00
Kevin Röbert
2878af17b6 Update messages.json (POEditor.com) 2020-04-02 22:55:07 +00:00
Kevin Röbert
86ef50ce91 Update messages.json (POEditor.com) 2020-04-02 22:55:05 +00:00
Kevin Röbert
9afb4fa167 Updated French translation
Special thanks again to Lucifer for the translation into French.
2020-03-23 23:23:06 +01:00
Kevin Röbert
6ee6591019 source fix 2020-03-20 13:20:28 +01:00
Kevin Röbert
eb45b51bcb Updated description 2020-03-20 01:57:46 +01:00
Kevin Röbert
0298792aa1 Version 1.16.0
#362
#440
#429
#428
#431
2020-03-20 01:50:22 +01:00
Kevin Röbert
b1a5b5fcb0 Update README.md 2020-03-19 11:34:27 +00:00
Kevin Röbert
6ae8dd7d22 Add button for MEA 2020-03-19 12:31:00 +01:00
Kevin Röbert
afdf172716 Added rule
#434
#404
2020-03-18 16:12:32 +01:00
Kevin Röbert
31d63fa777 Added rules and exception
#433
#434
#432
#437
#438
2020-03-18 14:52:49 +01:00
Kevin Röbert
59707d7918 Added exception
#427
2020-03-10 20:33:42 +01:00
Kevin Röbert
f0bfe4c8dd Added rules and exception
#409
#411
#414
#418
#419
#420
#421
#424
2020-03-09 22:13:59 +01:00
Kevin Röbert
975ce2fea5 Added new rules 2020-02-27 17:57:32 +01:00
Kevin R
0d5fd4b452 Added new rule
#395
2020-02-27 17:12:09 +01:00
Kevin R
02a26d3231 Added new rules and exceptions
#390 #388 #408
2020-02-27 16:55:31 +01:00
Kevin R
88890b853a Fixed spm rule
Added missing question mark
2020-02-27 16:06:06 +01:00
Kevin R
53fb25f43d Added new rules
#402
#405
2020-02-25 21:13:31 +01:00
Kevin Röbert
3370985ee2 Update data.min.json 2020-02-22 21:49:54 +01:00
Kevin Röbert
95fe7eb17d Added new rules
#398
#393
2020-02-22 21:49:23 +01:00
Kevin Röbert
f7949e89f6 Added catch statements 2020-02-20 14:12:06 +01:00
Kevin Röbert
a44e13645c Updated localized extension description 2020-02-20 13:11:19 +01:00
Kevin Röbert
21cf8ec613 Added localized extension description 2020-02-19 18:55:50 +01:00
Kevin Röbert
a8d50a102c Create PRIVACY.md 2020-02-18 16:43:16 +01:00
Kevin Röbert
e79039d210 MS Store promotion 2020-02-17 17:20:55 +01:00
Kevin Röbert
019c2e64a3 Added rules and exception
#385
#387
2020-02-16 17:10:41 +01:00
64 changed files with 1968 additions and 10338 deletions

39
.github/lockdown.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
# Configuration for Repo Lockdown - https://github.com/dessant/repo-lockdown
# Skip issues and pull requests created before a given timestamp. Timestamp must
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
#skipCreatedBefore: false
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
#exemptLabels: []
# Comment to post before closing or locking. Set to `false` to disable
#comment: true
# Label to add before closing or locking. Set to `false` to disable
#label: true
# Close issues and pull requests
#close: true
# Lock issues and pull requests
#lock: true
# Limit to only `issues` or `pulls`
#only: pulls
# Optionally, specify configuration settings just for `issues` or `pulls`
issues:
comment: >
This repository is only a mirror of https://gitlab.com/KevinRoebert/ClearUrls. Issues are readed here, but not directly addressed. If possible, please use the GitLab repo or this support mail address: clearurls_1 (at) kevinroebert.de.
lock: false
close: true
pulls:
comment: >
This repository is just a mirror of https://gitlab.com/KevinRoebert/ClearUrls. Only there pull requests accepted.
lock: false
close: true
# Repository to extend settings from
# _extends: repo

View File

@@ -3,7 +3,7 @@ image: debian:latest
before_script: before_script:
- export DEBIAN_FRONTEND= noninteractive - export DEBIAN_FRONTEND= noninteractive
- apt-get update -y - apt-get update -y
- apt-get install -y zip unzip jq nodejs - apt-get install -y zip unzip nodejs
stages: stages:
- build - build
@@ -23,30 +23,17 @@ hash rules:
only: only:
- master - master
build firefox: bundle addon:
stage: build stage: build
script: script:
- zip ClearUrls_firefox -r -FS clearurls.js browser-polyfill.js manifest.json img/* external_js/* html/* core_js/* css/* fonts/* _locales/* - zip ClearUrls -r -FS clearurls.js browser-polyfill.js manifest.json img/* external_js/* html/* core_js/* css/* fonts/* _locales/*
only: only:
- master - master
artifacts: artifacts:
paths: paths:
- ClearUrls_firefox.zip - ClearUrls.zip
build chrome:
stage: build
script:
- jq 'del(.applications) | .description=""' manifest.json > manifest.json.tmp && mv manifest.json.tmp manifest.json
- zip ClearUrls_chrome -r -FS clearurls.js browser-polyfill.js manifest.json img/* external_js/* html/* core_js/* css/* fonts/* _locales/*
only:
- master
artifacts:
paths:
- ClearUrls_chrome.zip
pages: pages:
stage: deploy stage: deploy

View File

@@ -36,7 +36,7 @@ You do not have to reinstall Firefox or disable all addons. You can just create
* **Version**: [compulsory. you must provide your version] * **Version**: [compulsory. you must provide your version]
* **Platform**: [either `uname -a` output, or if Windows, version and 32-bit or * **Platform**: [either `uname -a` output, or if Windows, version and 32-bit or
64-bit] 64-bit]
* **Country**: [The country from which you called the page. You can found your country here: http://ip-api.com/json/?fields=country] * **Country**: [The country from which you called the page. You can found your country here: https://ipapi.co//country_capital]
### Log ### Log
<!-- Please enable the log functionality of ClearURLs and attach the exported log to this bug report. --> <!-- Please enable the log functionality of ClearURLs and attach the exported log to this bug report. -->

View File

@@ -4,6 +4,84 @@ 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/), 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). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [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
- Require Firefox >= 55
- Require Chrome >= 22
### Changed
- Updated some strings of Spanish translation
- Updated some strings of French translation
- Updated some strings of Italian translation
- Updated some strings of Russian translation
- Updated some strings of Swedish translation
- Updated some strings of Turkish translation
- Updated some strings of Ukrainian translation
- Updated some strings of Chinese Simple translation
### Fixed
- Fixed a typo in the path to the Datatables JavaScript file
- Fixed [#445](https://gitlab.com/KevinRoebert/ClearUrls/issues/445)
- Fixed [#462](https://gitlab.com/KevinRoebert/ClearUrls/issues/462)
### Added
- Added check for setBadgeTextColor function (only supported in Firefox)
### Removed
- Removed browser-polyfill content script import (seems no longer needed)
- Removed old `applications` value
## [1.16.0] - 2020-03-20
### Compatibility note
- Require Firefox >= 55
- Require Chrome >= 22
### Added
- Added ETag header filtering [#362](https://gitlab.com/KevinRoebert/ClearUrls/issues/362), [#440](https://gitlab.com/KevinRoebert/ClearUrls/issues/440). Hint: Cache must be cleared before first use, to delete the already existing ETags.
### Fixed
- Fixed spontaneous disappearance of the badged
- Fixed wrong counting of blocked elements (too little was ;D)
### Changed
- Updated all translation
- Changed badged font color to #FFFFFF
- Changed watchdog behavior as follows [#428](https://gitlab.com/KevinRoebert/ClearUrls/issues/428), [#431](https://gitlab.com/KevinRoebert/ClearUrls/issues/431), [#429](https://gitlab.com/KevinRoebert/ClearUrls/issues/429):
- Increased watchdog interval to 60 seconds
- Executed watchdog only if ClearURLs is also active
- Watchdog restarts ClearURLs at most 3 times and only if ClearURLs has rules
- Changed behavior of downloading rules [#428](https://gitlab.com/KevinRoebert/ClearUrls/issues/428), [#431](https://gitlab.com/KevinRoebert/ClearUrls/issues/431), [#429](https://gitlab.com/KevinRoebert/ClearUrls/issues/429):
- If download of hash file fails and no local rules are available, then ClearURLs displays `hash_status_code_5` and deactivates itself
- If download of rules file fails and no local rules are available, then ClearURLs displays `hash_status_code_5` and deactivates itself
## [1.15.0] - 2020-02-16 ## [1.15.0] - 2020-02-16
### Compatibility note ### Compatibility note

6
PRIVACY.md Normal file
View File

@@ -0,0 +1,6 @@
ClearURLs protects and respects your privacy.
We do not collect any of your usage data. Furthermore ClearURLs has no home server nor embed any kind of analytic hooks in its code.
The only time ClearURLs connects to a remote server (gitlab.io) is to update the rules file and the associated hash file. You can replace the default update address with your own address at any time in the settings.
The project and the rule file is currently hosted on gitlab.com, which is owned by GitLab Inc. and thus is unrelated to ClearURLs.

View File

@@ -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="51" width="217"></a> <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://addons.cdn.mozilla.net/static/img/addons-buttons/AMO-button_1.png" alt="for Firefox">](https://addons.mozilla.org/en-US/firefox/addon/clearurls/) [<img src="https://developer.chrome.com/webstore/images/ChromeWebStore_BadgeWBorder_v2_206x58.png" alt="for Chrome">](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/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)
# <sub><img src="https://gitlab.com/KevinRoebert/ClearUrls/raw/master/img/clearurls.svg" width="64px" height="64px"></sub> ClearURLs # <sub><img src="https://gitlab.com/KevinRoebert/ClearUrls/raw/master/img/clearurls.svg" width="64px" height="64px"></sub> ClearURLs
@@ -29,6 +29,7 @@ Indeed most of the above URL is tracking code. Once ClearURLs has cleaned the ad
* Supports redirection to the destination, without tracking services as middleman * Supports redirection to the destination, without tracking services as middleman
* Adds an entry to the context menu so that links can be copied quickly and cleanly * Adds an entry to the context menu so that links can be copied quickly and cleanly
* Blocks hyperlink auditing, also known as *ping tracking* (see also [this article](https://html.spec.whatwg.org/multipage/links.html#hyperlink-auditing)) * Blocks hyperlink auditing, also known as *ping tracking* (see also [this article](https://html.spec.whatwg.org/multipage/links.html#hyperlink-auditing))
* Prevents ETag tracking
* Prevents tracking injection over history API (see also: [The replaceState() method](https://developer.mozilla.org/en-US/docs/Web/API/History_API#The_replaceState()_method)) * Prevents tracking injection over history API (see also: [The replaceState() method](https://developer.mozilla.org/en-US/docs/Web/API/History_API#The_replaceState()_method))
* Prevents Google from rewriting the search results (to include tracking elements) * Prevents Google from rewriting the search results (to include tracking elements)
* Prevents Yandex from rewriting the search results (to include tracking elements) * Prevents Yandex from rewriting the search results (to include tracking elements)
@@ -42,12 +43,10 @@ Reasoning for needed permissions can be found under [here](https://gitlab.com/Ke
## CI/CD Artifacts Download (for Firefox- and Chrome-Dev only) ## CI/CD Artifacts Download (for Firefox- and Chrome-Dev only)
Here you can download the packed files for the Firefox- and Chrome-Dev: Here you can download the packed files for the Firefox- and Chrome-Dev:
[Firefox](https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/ClearUrls_firefox.zip?job=build%20firefox) [<img src="promotion/download-128.png"/>](https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/ClearUrls.zip?job=bundle%20addon)
[Chrome](https://gitlab.com/KevinRoebert/ClearUrls/-/jobs/artifacts/master/raw/ClearUrls_chrome.zip?job=build%20chrome)
## Test ## Test
If you want to test whether ClearURLs works correctly on your system, you can go to this test page: [https://clearurls.roebert.eu/](https://clearurls.roebert.eu/) If you want to test whether ClearURLs works correctly on your system, you can go to this test page: [https://kevinroebert.gitlab.io/ClearUrls/](https://kevinroebert.gitlab.io/ClearUrls/)
## Contribute ## Contribute
If you have any suggestions or complaints, please [create an issue.](https://gitlab.com/KevinRoebert/ClearUrls/issues/new) If you have any suggestions or complaints, please [create an issue.](https://gitlab.com/KevinRoebert/ClearUrls/issues/new)
@@ -71,10 +70,12 @@ Please push your translation into the folder `_locales/{country code}/messages.j
## Projects that use parts of ClearURLs ## Projects that use parts of ClearURLs
* [Uroute](https://github.com/walterl/uroute) used ClearURLs to filter/clean URL before launching browser * [Uroute](https://github.com/walterl/uroute) used ClearURLs to filter/clean URL before launching browser
* [Scrub](https://gitlab.com/CrunchBangDev/cbd-cogs/-/tree/master/Scrub) used ClearURLs to filter/clean URLs as cog for the Red Discord bot
## Recommended by... ## Recommended by...
* [ghacks-user.js](https://github.com/ghacksuserjs/ghacks-user.js/wiki/4.1-Extensions) * [ghacks-user.js](https://github.com/ghacksuserjs/ghacks-user.js/wiki/4.1-Extensions)
* [Awesome Humane Tech List](https://github.com/humanetech-community/awesome-humane-tech#tracking) * [Awesome Humane Tech List](https://github.com/humanetech-community/awesome-humane-tech#tracking)
* [PrivacyTools](https://www.privacytools.io/browsers/#addons)
* ClearURLs is part of Mozilla's recommended extensions program * ClearURLs is part of Mozilla's recommended extensions program
## Permissions ## Permissions
@@ -91,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) | - [jQuery v3.4.1](https://github.com/jquery/jquery/tree/3.4.1) |
Copyright JS Foundation and other contributors | Copyright JS Foundation and other contributors |
[MIT](https://jquery.org/license/) [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/) - [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 | - [Pickr v1.7.0](https://github.com/Simonwep/pickr/tree/1.7.0) | Copyright (c) 2018 - 2020 Simon Reinisch |
[MIT](https://github.com/popperjs/popper.js/blob/master/LICENSE.md) [MIT](https://github.com/Simonwep/pickr/blob/master/LICENSE)
- [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)
- [Font Awesome v5.12.0](https://github.com/FortAwesome/Font-Awesome/tree/5.12.0) | Copyright (c) @fontawesome | - [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) [Font Awesome Free License](https://github.com/FortAwesome/Font-Awesome/blob/master/LICENSE.txt)

View File

@@ -272,7 +272,7 @@
"description": "Diese Zeichenfolge wird als Titel für die Schaltfläche zum Importieren auf der Einstellungsseite verwendet." "description": "Diese Zeichenfolge wird als Titel für die Schaltfläche zum Importieren auf der Einstellungsseite verwendet."
}, },
"setting_log_limit_label": { "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.", "description": "Diese Zeichenfolge wird als Name für das Protokolllimit verwendet.",
"placeholders": { "placeholders": {
"limit": { "limit": {
@@ -302,8 +302,14 @@
"description": "Diese Zeichenkette wird als Titel für das Referral-Marketing verwendet." "description": "Diese Zeichenkette wird als Titel für das Referral-Marketing verwendet."
}, },
"watchdog": { "watchdog": {
"message": "[ClearURLs]: Der Watchdog hat ein Problem festgestellt. ClearURLs wird neugestartet.", "message": "[ClearURLs]: Der Watchdog hat ein Problem festgestellt und ist bereits das $TIMES$-te mal gescheitert.",
"description": "Diese Zeichenkette wird als Text für den Watchdog verwendet." "description": "Diese Zeichenkette wird als Text für den Watchdog verwendet.",
"placeholders": {
"times": {
"content": "$1",
"example": "3"
}
}
}, },
"domain_blocking_enabled": { "domain_blocking_enabled": {
"message": "Erlaube Domain-Blocking (Kann zu Problemen auf Seiten führen, die AdBlocker nicht erlauben)", "message": "Erlaube Domain-Blocking (Kann zu Problemen auf Seiten führen, die AdBlocker nicht erlauben)",
@@ -324,5 +330,21 @@
"ping_blocking_enabled_title": { "ping_blocking_enabled_title": {
"message": "Blockiere Hyperlink Auditing Anfragen", "message": "Blockiere Hyperlink Auditing Anfragen",
"description": "Diese Zeichenkette wird als Titel für das Hyperlink Auditing-Blocking verwendet." "description": "Diese Zeichenkette wird als Titel für das Hyperlink Auditing-Blocking verwendet."
},
"extension_description": {
"message": "Entfernt Tracking-Elemente von URLs.",
"description": "Erweiterungsbeschreibung (max. 132 Zeichen)"
},
"eTag_filtering_log": {
"message": "ETag-Header wurde aus dieser Anfrage entfernt",
"description": "Diese Zeichenkette wird für das Filtern von ETag-Headern im ClearURL-Protokoll verwendet."
},
"eTag_filtering_enabled": {
"message": "Filtert die ETag-Header aus den Anfragen (Siehe auch <a href='https://en.wikipedia.org/wiki/HTTP_ETag#Tracking_using_ETags' target='_blank'>diesen Artikel</a>)",
"description": "Diese Zeichenkette wird als Beschreibung für das Filtern von ETag-Headern verwendet."
},
"eTag_filtering_enabled_title": {
"message": "Filtert ETag-Header. Info: Cache muss vor der ersten Benutzung geleert werden.",
"description": "Diese Zeichenkette wird als Titel für das Filtern von ETag-Headern verwendet."
} }
} }

View File

@@ -272,7 +272,7 @@
"description": "This string is used as title for the import button on the settings page." "description": "This string is used as title for the import button on the settings page."
}, },
"setting_log_limit_label": { "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.", "description": "This string is used as name for the log limit label.",
"placeholders": { "placeholders": {
"limit": { "limit": {
@@ -302,8 +302,14 @@
"description": "This string is used as title for the referral marketing switch" "description": "This string is used as title for the referral marketing switch"
}, },
"watchdog": { "watchdog": {
"message": "[ClearURLs]: The watchdog has detected a problem. ClearURLs is restarting.", "message": "[ClearURLs]: The watchdog has detected a problem and has already failed $TIMES$ times.",
"description": "This string is used as text for the watchdog" "description": "This string is used as text for the watchdog",
"placeholders": {
"times": {
"content": "$1",
"example": "3"
}
}
}, },
"domain_blocking_enabled": { "domain_blocking_enabled": {
"message": "Allow domain blocking (Can lead to problems on pages that do not allow AdBlockers)", "message": "Allow domain blocking (Can lead to problems on pages that do not allow AdBlockers)",
@@ -324,5 +330,49 @@
"ping_blocking_enabled_title": { "ping_blocking_enabled_title": {
"message": "Block hyperlink auditing", "message": "Block hyperlink auditing",
"description": "This string is used as title for the hyperlink auditing blocking switch" "description": "This string is used as title for the hyperlink auditing blocking switch"
},
"extension_description": {
"message": "Remove tracking elements from URLs.",
"description": "Extension description (max. 132 characters)"
},
"eTag_filtering_log": {
"message": "ETag header was removed from this request",
"description": "This string is used on ETag header filtering in the ClearURLs log."
},
"eTag_filtering_enabled": {
"message": "Filters ETag headers from requests (See also <a href='https://en.wikipedia.org/wiki/HTTP_ETag#Tracking_using_ETags' target='_blank'>this article</a>)",
"description": "This string is used as label for the ETag header filtering switch"
},
"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"
} }
} }

View File

@@ -272,7 +272,7 @@
"description": "This string is used as title for the import button on the settings page." "description": "This string is used as title for the import button on the settings page."
}, },
"setting_log_limit_label": { "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.", "description": "This string is used as name for the log limit label.",
"placeholders": { "placeholders": {
"limit": { "limit": {

View File

@@ -272,7 +272,7 @@
"description": "Sert à afficher la signification de la fonction sur la page qui affiche les options." "description": "Sert à afficher la signification de la fonction sur la page qui affiche les options."
}, },
"setting_log_limit_label": { "setting_log_limit_label": {
"message": "Nombre déléments à enregistrer dans le journal, $LIMIT$ de -1 à linfini (-1 := ∞)", "message": "Nombre déléments à enregistrer dans le journal, $LIMIT$ de -1 à linfini",
"description": "Sert à afficher la signification de la fonction sur la page qui affiche les options.", "description": "Sert à afficher la signification de la fonction sur la page qui affiche les options.",
"placeholders": { "placeholders": {
"limit": { "limit": {
@@ -299,11 +299,17 @@
}, },
"referral_marketing_enabled_title": { "referral_marketing_enabled_title": {
"message": "Permettre certaines actions commerciales", "message": "Permettre certaines actions commerciales",
"description": "Sert à afficher la signification de la fonction sur la page qui affiche les options." "description": "Sert à afficher la signification de la fonction sur la switch"
}, },
"watchdog": { "watchdog": {
"message": "[ClearURLs]: Temps ou délais dexécution imparti dépassé. ClearURLs doit redémarrer.", "message": "[ClearURLs]: Watchdog, très petit programme qui surveille les attaques de la mémoire vive, a détecté $TIMES$ problème(s)",
"description": "Sert à afficher la signification de la fonction sur la page qui affiche les options." "description": "Utilisé pour un texte explicatif du Watchdog",
"placeholders": {
"times": {
"content": "$1",
"example": "3"
}
}
}, },
"domain_blocking_enabled": { "domain_blocking_enabled": {
"message": "Bloquer les atteintes à la vie privée. Cependant, des sites décèlent la technique de protection et dysfonctionnent délibérément ou affichent des avertissements", "message": "Bloquer les atteintes à la vie privée. Cependant, des sites décèlent la technique de protection et dysfonctionnent délibérément ou affichent des avertissements",
@@ -322,7 +328,23 @@
"description": "Utilisé pour le bouton activer/désactiver l'audit (espionnages) des liens hypertextes" "description": "Utilisé pour le bouton activer/désactiver l'audit (espionnages) des liens hypertextes"
}, },
"ping_blocking_enabled_title": { "ping_blocking_enabled_title": {
"message": "Bloquer lespionnage des clics souris sur les liens hypertextes", "message": "Bloquer lespionnage auditing",
"description": "Utilisé pour le bouton activer/désactiver de l'audit (espionnages) des liens hypertextes" "description": "Utilisé comme titre pour le bouton, commutateur, de laudit des liens hypertextes"
},
"extension_description": {
"message": "Retirer les espions dans les adresses Internet.",
"description": "Description des fonctions ; utilisez au maximum 132 caractères."
},
"eTag_filtering_log": {
"message": "Lidentification ETag a été supprimée",
"description": "Utilisé pour le journal de ClearUrls et indiquer ce qui a été nettoyé"
},
"eTag_filtering_enabled": {
"message": "Filtrer ETag ; les sites mettent dans le cache du Navigateur, ou Système dExploitation, un identifiant pour vous pister",
"description": "Titre pour le bouton de filtrage ETag"
},
"eTag_filtering_enabled_title": {
"message": "Filtre les identifications ETag, mais pour la première utilisation, veuillez vider le cache",
"description": "Titre pour le bouton de filtrage ETag"
} }
} }

View File

@@ -272,7 +272,7 @@
"description": "This string is used as title for the import button on the settings page." "description": "This string is used as title for the import button on the settings page."
}, },
"setting_log_limit_label": { "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.", "description": "This string is used as name for the log limit label.",
"placeholders": { "placeholders": {
"limit": { "limit": {

View File

@@ -272,7 +272,7 @@
"description": "This string is used as title for the import button on the settings page." "description": "This string is used as title for the import button on the settings page."
}, },
"setting_log_limit_label": { "setting_log_limit_label": {
"message": "Ограничивать журнал до $LIMIT$ записей (-1 := ∞)", "message": "Ограничивать журнал до $LIMIT$ записей",
"description": "This string is used as name for the log limit label.", "description": "This string is used as name for the log limit label.",
"placeholders": { "placeholders": {
"limit": { "limit": {
@@ -303,7 +303,13 @@
}, },
"watchdog": { "watchdog": {
"message": "[ClearURLs]: сторожевой таймер обнаружил проблему. ClearURLs будет перезапущен.", "message": "[ClearURLs]: сторожевой таймер обнаружил проблему. ClearURLs будет перезапущен.",
"description": "This string is used as text for the watchdog" "description": "This string is used as text for the watchdog",
"placeholders": {
"times": {
"content": "$1",
"example": "3"
}
}
}, },
"domain_blocking_enabled": { "domain_blocking_enabled": {
"message": "Разрешить блокировку домена (может вызвать проблемы на сайтах, которые запрещают AdBlocker)", "message": "Разрешить блокировку домена (может вызвать проблемы на сайтах, которые запрещают AdBlocker)",
@@ -324,5 +330,21 @@
"ping_blocking_enabled_title": { "ping_blocking_enabled_title": {
"message": "Блокировка аудита гиперссылок", "message": "Блокировка аудита гиперссылок",
"description": "This string is used as title for the hyperlink auditing blocking switch" "description": "This string is used as title for the hyperlink auditing blocking switch"
},
"extension_description": {
"message": "Удаление элементов слежения из URL-адресов.",
"description": "Описание расширения"
},
"eTag_filtering_log": {
"message": "Заголовок ETag был удален из этого запроса",
"description": "This string is used on ETag header filtering in the ClearURLs log."
},
"eTag_filtering_enabled": {
"message": "Фильтровать заголовки ETag из запросов (см. <a href='https://en.wikipedia.org/wiki/HTTP_ETag#Tracking_using_ETags' target='_blank'>эту статью</a>)",
"description": "This string is used as label for the ETag header filtering switch"
},
"eTag_filtering_enabled_title": {
"message": "Фильтрация заголовков ETag. Примечание: очистите кэш перед первым использованием.",
"description": "This string is used as title for the ETag header filtering switch"
} }
} }

View File

@@ -272,7 +272,7 @@
"description": "This string is used as title for the import button on the settings page." "description": "This string is used as title for the import button on the settings page."
}, },
"setting_log_limit_label": { "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.", "description": "This string is used as name for the log limit label.",
"placeholders": { "placeholders": {
"limit": { "limit": {

View File

@@ -303,7 +303,13 @@
}, },
"watchdog": { "watchdog": {
"message": "[ClearURL'ler]: Güvenlik Zamanlayıcısı bir sorun tespit etti. ClearURL'ler yeniden başlatıldı.", "message": "[ClearURL'ler]: Güvenlik Zamanlayıcısı bir sorun tespit etti. ClearURL'ler yeniden başlatıldı.",
"description": "Bu dize güvenlik zamanlayıcısı için metin olarak kullanılır." "description": "Bu dize güvenlik zamanlayıcısı için metin olarak kullanılır.",
"placeholders": {
"times": {
"content": "$1",
"example": "3"
}
}
}, },
"domain_blocking_enabled": { "domain_blocking_enabled": {
"message": "Alan adı engellemeye izin ver (Reklam Engelleyicilere izin vermeyen sayfalarda sorunlara neden olabilir)", "message": "Alan adı engellemeye izin ver (Reklam Engelleyicilere izin vermeyen sayfalarda sorunlara neden olabilir)",
@@ -324,5 +330,21 @@
"ping_blocking_enabled_title": { "ping_blocking_enabled_title": {
"message": "Köprü denetimini engelle", "message": "Köprü denetimini engelle",
"description": "Bu dize köprü denetim engelleme anahtarının başlığı olarak kullanılır" "description": "Bu dize köprü denetim engelleme anahtarının başlığı olarak kullanılır"
},
"extension_description": {
"message": "İzleme öğelerini URL'lerden kaldırın.",
"description": "Uzantııklaması."
},
"eTag_filtering_log": {
"message": "ETag başlığı bu istekten kaldırıldı",
"description": "Bu dize, ClearURLs günlüğünde ETag üstbilgisi filtrelemesinde kullanılır."
},
"eTag_filtering_enabled": {
"message": "ETag başlıklarını isteklerden filtreler (Ayrıca bkz. <a href='https://en.wikipedia.org/wiki/HTTP_ETag#Tracking_using_ETags' target='_blank'>Bu makaleye</a>)",
"description": "Bu dize, ETag başlık filtreleme anahtarı için etiket olarak kullanılır"
},
"eTag_filtering_enabled_title": {
"message": "ETag başlıklarını filtreler. İpucu: İlk kullanımdan önce önbellek temizlenmelidir.",
"description": "Bu dize, ETag başlık filtreleme anahtarının başlığı olarak kullanılır"
} }
} }

View File

@@ -72,7 +72,7 @@
"description": "This string is used as title for the filter switch button on the popup page." "description": "This string is used as title for the filter switch button on the popup page."
}, },
"popup_html_configs_switch_log": { "popup_html_configs_switch_log": {
"message": "Журнал", "message": "Логування",
"description": "This string is used as name for the logging switch button on the popup page." "description": "This string is used as name for the logging switch button on the popup page."
}, },
"popup_html_configs_switch_log_title": { "popup_html_configs_switch_log_title": {
@@ -198,5 +198,153 @@
"donate_button": { "donate_button": {
"message": "Внесок для розробників ClearURLs.", "message": "Внесок для розробників ClearURLs.",
"description": "This string is used to refer to a donation page." "description": "This string is used to refer to a donation page."
},
"clipboard_copy_link": {
"message": "Скопіювати \"чисте\" посилання",
"description": "This string is used in the context menu to copy clean links."
},
"context_menu_enabled": {
"message": "Відобразити контекстне меню",
"description": "This string is used toggle the context menu entry to copy clean links."
},
"history_listener_enabled": {
"message": "Запобігти трекінг через API історії браузеру (див. також: <a href='https://developer.mozilla.org/en-US/docs/Web/API/History_API#The_replaceState()_method' target='_blank'>Метод replaceState()</a>)",
"description": "This string is used as name for the history API listener label."
},
"cleaning_tool_page_title": {
"message": "ClearURLs є утилітою очищення посилань",
"description": "This string is used as title on the cleaning tool page."
},
"cleaning_tool_description": {
"message": "За допомогою цієї утиліти ви можете вставити URL-адреси для ії \"очищення\" після натискання на зелену кнопку. Ви можете вставити відразу кілька URL-адрес, але кожна URL-адреса повинна бути на окремому рядку.",
"description": "This string is used as description of the cleaning tool."
},
"cleaning_tool_btn": {
"message": "\"Чисті\" посилання",
"description": "This string is used as name for the clean url button."
},
"cleaning_tool_dirty_urls_label": {
"message": "Тут ви можете вставити \"брудні\" посилання:",
"description": "This string is used as title on the cleaning tool page for the dirty URLs."
},
"cleaning_tool_clean_urls_label": {
"message": "Тут ви можете знайти \"чисті\" посилання:",
"description": "This string is used as title on the cleaning tool page for the clean URLs."
},
"local_hosts_skipping": {
"message": "Не фільтрувати посилання на локальних адресах (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": "This string is used as label for the local host skipping switch"
},
"local_hosts_skipping_title": {
"message": "Не фільтрує посилання на локальних адресах",
"description": "This string is used as title for the local host skipping switch"
},
"log_html_export_button": {
"message": "Експорт",
"description": "This string is used for the export button on the log page."
},
"log_html_export_button_title": {
"message": "Експортувати глобальний лог",
"description": "This string is used as title for the export button on the log page."
},
"log_html_import_button": {
"message": "Імпорт",
"description": "This string is used for the import button on the log page."
},
"log_html_import_button_title": {
"message": "Імпортувати глобальний лог",
"description": "This string is used as title for the import button on the log page."
},
"setting_html_export_button": {
"message": "Експрот",
"description": "This string is used as name for the export button on the settings page."
},
"setting_html_export_button_title": {
"message": "Експортує все",
"description": "This string is used as title for the export button on the settings page."
},
"setting_html_import_button": {
"message": "Імпорт",
"description": "This string is used as name for the reset button on the settings page."
},
"setting_html_import_button_title": {
"message": "Імпортує все",
"description": "This string is used as title for the import button on the settings page."
},
"setting_log_limit_label": {
"message": "Обмежити логування $LIMIT$ записів.",
"description": "This string is used as name for the log limit label.",
"placeholders": {
"limit": {
"content": "$1",
"example": "100"
}
}
},
"blocked_html_title": {
"message": "Цей сайт було заблоковано додатком <b>ClearURLs</b>",
"description": "This string is used as title on the blocked site page."
},
"blocked_html_body": {
"message": "Цей сайт було заблоковано додатком <b>ClearURLs</b>, оскільки ми ідентифікували його як рекламний і/або трекінговий сервіс.\nДля того, щоб відвідати цей сайт, ви повинні тимчасово відключати додаток або виключати блокування доменів в налаштуваннях ClearURLs.\nПісля цього ви зможете натитснути кнопку нижче, щоб завантажити сторінку.",
"description": "This string is used as body on the blocked site page."
},
"blocked_html_button": {
"message": "Відвідати сторінку",
"description": "This string is used as button on the blocked site page."
},
"referral_marketing_enabled": {
"message": "Дозволити реферальний маркетинг",
"description": "This string is used as label for the referral marketing switch"
},
"referral_marketing_enabled_title": {
"message": "Дозволяє реферальний маркетинг",
"description": "This string is used as title for the referral marketing switch"
},
"watchdog": {
"message": "[ClearURLs]: \"Сторожовий пес\" помітив проблему та вилетів $TIMES$ разів.\n",
"description": "This string is used as text for the watchdog",
"placeholders": {
"times": {
"content": "$1",
"example": "3"
}
}
},
"domain_blocking_enabled": {
"message": "Дозволити блокування домену (Може привести до проблем на сайтах, які блокують AdBlocker'и)",
"description": "This string is used as label for the domain blocking switch"
},
"domain_blocking_enabled_title": {
"message": "Дозволити блокування домену (Може привести до проблем на сайтах, які блокують AdBlocker'и)",
"description": "This string is used as title for the domain blocking switch"
},
"log_ping_blocked": {
"message": "Цей аудит гіперпосилань було заблоковано",
"description": "This string is used on hyperlink auditing in the ClearURLs log."
},
"ping_blocking_enabled": {
"message": "Відключити аудит гіперпосилань (див. також <a href='https://html.spec.whatwg.org/multipage/links.html#hyperlink-auditing' target='_blank'>цю статтю</a>)",
"description": "This string is used as label for the hyperlink auditing blocking switch"
},
"ping_blocking_enabled_title": {
"message": "Блокувати аудит гіперпосилань",
"description": "This string is used as title for the hyperlink auditing blocking switch"
},
"extension_description": {
"message": "Видалити елементи трекінгу з посилань",
"description": "Опис додатку (максимум 132 символи)"
},
"eTag_filtering_log": {
"message": "ETag був видалений з цього запиту",
"description": "Ця стрічка використовується для фільтрації заголовків ETag у журналі ClearURL."
},
"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. \nПідказка: Кеш повинен бути скинутим перед першим використанням.",
"description": "Цей рядок використовується, як заголовок для перемикача фільтра заголовка ETag"
} }
} }

View File

@@ -207,10 +207,6 @@
"message": "显示右键选单条目", "message": "显示右键选单条目",
"description": "This string is used toggle the context menu entry to copy clean links." "description": "This string is used toggle the context menu entry to copy clean links."
}, },
"history_listener_enabled": {
"message": "Prevent tracking injection over history API (详见: <a href='https://developer.mozilla.org/en-US/docs/Web/API/History_API#The_replaceState()_method' target='_blank'>The replaceState() method</a>)",
"description": "This string is used as name for the history API listener label."
},
"cleaning_tool_page_title": { "cleaning_tool_page_title": {
"message": "ClearURLs的网址清理工具", "message": "ClearURLs的网址清理工具",
"description": "This string is used as title on the cleaning tool page." "description": "This string is used as title on the cleaning tool page."
@@ -230,5 +226,9 @@
"cleaning_tool_clean_urls_label": { "cleaning_tool_clean_urls_label": {
"message": "清理后的网址:", "message": "清理后的网址:",
"description": "This string is used as title on the cleaning tool page for the clean URLs." "description": "This string is used as title on the cleaning tool page for the clean URLs."
},
"local_hosts_skipping": {
"message": "跳过本地主机链接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": "This string is used as label for the local host skipping switch"
} }
} }

View File

@@ -207,10 +207,6 @@
"message": "顯示右鍵選單項目", "message": "顯示右鍵選單項目",
"description": "This string is used toggle the context menu entry to copy clean links." "description": "This string is used toggle the context menu entry to copy clean links."
}, },
"history_listener_enabled": {
"message": "Prevent tracking injection over history API (詳見: <a href='https://developer.mozilla.org/en-US/docs/Web/API/History_API#The_replaceState()_method' target='_blank'>The replaceState() method</a>)",
"description": "This string is used as name for the history API listener label."
},
"cleaning_tool_page_title": { "cleaning_tool_page_title": {
"message": "ClearURLs的網址清理工具", "message": "ClearURLs的網址清理工具",
"description": "This string is used as title on the cleaning tool page." "description": "This string is used as title on the cleaning tool page."

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -22,13 +22,10 @@
*/ */
var providers = []; var providers = [];
var prvKeys = []; var prvKeys = [];
var badges = [];
var tabid = 0;
var siteBlockedAlert = 'javascript:void(0)'; var siteBlockedAlert = 'javascript:void(0)';
var dataHash; var dataHash;
var localDataHash; var localDataHash;
var os; var os;
var currentURL;
/** /**
* Helper function which remove the tracking fields * Helper function which remove the tracking fields
@@ -37,9 +34,10 @@ var currentURL;
* @param {Provider} provider Provider-Object * @param {Provider} provider Provider-Object
* @param pureUrl URL as String * @param pureUrl URL as String
* @param {boolean} quiet if the action should be displayed in log and statistics * @param {boolean} quiet if the action should be displayed in log and statistics
* @param {requestDetails} request the request details
* @return {Array} Array with changes and url fields * @return {Array} Array with changes and url fields
*/ */
function removeFieldsFormURL(provider, pureUrl, quiet = false) { function removeFieldsFormURL(provider, pureUrl, quiet = false, request = null) {
let url = pureUrl; let url = pureUrl;
let domain = ""; let domain = "";
let fragments = ""; let fragments = "";
@@ -70,7 +68,7 @@ function removeFieldsFormURL(provider, pureUrl, quiet = false) {
pushToLog(beforeReplace, url, rawRule); pushToLog(beforeReplace, url, rawRule);
} }
increaseBadged(quiet); increaseBadged(quiet, request);
changes = true; changes = true;
} }
}); });
@@ -91,7 +89,11 @@ function removeFieldsFormURL(provider, pureUrl, quiet = false) {
url = decodeURL(re); url = decodeURL(re);
//Log the action //Log the action
if (!quiet) pushToLog(pureUrl, url, translate('log_redirect')); if (!quiet) {
pushToLog(pureUrl, url, translate('log_redirect'));
increaseGlobalURLCounter(1);
increaseBadged(false, request)
};
return { return {
"redirect": true, "redirect": true,
@@ -131,7 +133,7 @@ function removeFieldsFormURL(provider, pureUrl, quiet = false) {
if (!quiet) pushToLog(tempBeforeURL, tempURL, rule); if (!quiet) pushToLog(tempBeforeURL, tempURL, rule);
} }
increaseBadged(quiet); increaseBadged(quiet, request);
changes = true; changes = true;
} }
}); });
@@ -146,7 +148,8 @@ function removeFieldsFormURL(provider, pureUrl, quiet = false) {
if (provider.isCaneling() && storage.domainBlocking) { if (provider.isCaneling() && storage.domainBlocking) {
if (!quiet) pushToLog(pureUrl, pureUrl, translate('log_domain_blocked')); if (!quiet) pushToLog(pureUrl, pureUrl, translate('log_domain_blocked'));
increaseBadged(quiet); increaseGlobalURLCounter(1);
increaseBadged(quiet, request);
cancel = true; cancel = true;
} }
@@ -228,20 +231,38 @@ function start() {
} }
/** /**
* Get the hash for the rule file on github. * Deactivates ClearURLs, if no rules can be downloaded and also no old rules in storage
*/
function deactivateOnFailure() {
if(storage.ClearURLsData.length === 0) {
storage.globalStatus = false;
storage.dataHash = "";
changeIcon();
storeHashStatus(5);
saveOnExit();
}
}
/**
* Get the hash for the rule file on GitLab.
* Check the hash with the hash form the local file. * Check the hash with the hash form the local file.
* If the hash has changed, then download the new rule file. * If the hash has changed, then download the new rule file.
* Else do nothing. * Else do nothing.
*/ */
function getHash() { function getHash() {
//Get the target hash from github //Get the target hash from GitLab
fetch(storage.hashURL) const response = fetch(storage.hashURL).then(async response => {
.then(function (response) { return {
const responseTextHash = response.clone().text().then(function (responseTextHash) { hash: (await response.text()).trim(),
if (response.ok && $.trim(responseTextHash)) { status: response.status
dataHash = responseTextHash; };
});
if ($.trim(dataHash) !== $.trim(localDataHash)) { response.then(result => {
if (result.status === 200 && result.hash) {
dataHash = result.hash;
if (dataHash !== localDataHash.trim()) {
fetchFromURL(); fetchFromURL();
} else { } else {
toObject(storage.ClearURLsData); toObject(storage.ClearURLsData);
@@ -249,9 +270,12 @@ function start() {
saveOnDisk(['hashStatus']); saveOnDisk(['hashStatus']);
} }
} else { } else {
dataHash = false; 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();
}); });
} }
@@ -261,17 +285,19 @@ function start() {
* ################################################################## * ##################################################################
*/ */
function fetchFromURL() { function fetchFromURL() {
fetch(storage.ruleURL) const response = fetch(storage.ruleURL).then(async response => {
.then(checkResponse); return {
data: (await response.clone().text()).trim(),
hash: await sha256((await response.text()).trim()),
status: response.status
};
})
function checkResponse(response) { response.then(result => {
const responseText = response.clone().text().then(function (responseText) { if (result.status === 200 && result.data) {
if (response.ok && $.trim(responseText)) { if (result.hash === dataHash.trim()) {
const downloadedFileHash = $.sha256(responseText); storage.ClearURLsData = result.data;
storage.dataHash = result.hash;
if ($.trim(downloadedFileHash) === $.trim(dataHash)) {
storage.ClearURLsData = responseText;
storage.dataHash = downloadedFileHash;
storeHashStatus(2); storeHashStatus(2);
} else { } else {
storeHashStatus(3); storeHashStatus(3);
@@ -279,10 +305,14 @@ function start() {
storage.ClearURLsData = JSON.parse(storage.ClearURLsData); storage.ClearURLsData = JSON.parse(storage.ClearURLsData);
toObject(storage.ClearURLsData); toObject(storage.ClearURLsData);
saveOnDisk(['ClearURLsData', 'dataHash', 'hashStatus']); 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();
}); });
} }
}
// ################################################################## // ##################################################################
@@ -559,7 +589,8 @@ function start() {
if (storage.pingBlocking && storage.pingRequestTypes.includes(request.type)) { if (storage.pingBlocking && storage.pingRequestTypes.includes(request.type)) {
pushToLog(request.url, request.url, translate('log_ping_blocked')); pushToLog(request.url, request.url, translate('log_ping_blocked'));
increaseBadged(); increaseBadged(false, request);
increaseGlobalURLCounter(1);
return {cancel: true}; return {cancel: true};
} }
@@ -567,9 +598,8 @@ function start() {
* Call for every provider the removeFieldsFormURL method. * Call for every provider the removeFieldsFormURL method.
*/ */
for (let i = 0; i < providers.length; i++) { for (let i = 0; i < providers.length; i++) {
if (providers[i].matchURL(request.url)) { if (providers[i].matchURL(request.url)) {
result = removeFieldsFormURL(providers[i], request.url); result = removeFieldsFormURL(providers[i], request.url, false, request);
} }
/* /*
@@ -579,7 +609,7 @@ function start() {
if (result.redirect) { if (result.redirect) {
if (providers[i].shouldForceRedirect() && if (providers[i].shouldForceRedirect() &&
request.type === 'main_frame') { request.type === 'main_frame') {
browser.tabs.update(request.tabId, {url: result.url}); browser.tabs.update(request.tabId, {url: result.url}).catch(handleError);
return {cancel: true}; return {cancel: true};
} }
@@ -595,7 +625,7 @@ function start() {
if (result.cancel) { if (result.cancel) {
if (request.type === 'main_frame') { if (request.type === 'main_frame') {
const blockingPage = browser.extension.getURL("html/siteBlockedAlert.html?source=" + encodeURIComponent(request.url)); const blockingPage = browser.extension.getURL("html/siteBlockedAlert.html?source=" + encodeURIComponent(request.url));
browser.tabs.update(request.tabId, {url: blockingPage}); browser.tabs.update(request.tabId, {url: blockingPage}).catch(handleError);
return {cancel: true}; return {cancel: true};
} else { } else {
@@ -629,39 +659,6 @@ function start() {
getHash(); getHash();
setBadgedStatus(); setBadgedStatus();
/**
* Call by each tab is updated.
* And if url has changed.
*/
function handleUpdated(tabId, changeInfo, tabInfo) {
if (changeInfo.url) {
delete badges[tabId];
}
currentURL = tabInfo.url;
}
/**
* Call by each tab is updated.
*/
browser.tabs.onUpdated.addListener(handleUpdated);
/**
* Call by each tab change to set the actual tab id
*/
function handleActivated(activeInfo) {
tabid = activeInfo.tabId;
browser.tabs.get(tabid).then(function (tab) {
if (!browser.runtime.lastError) { // https://gitlab.com/KevinRoebert/ClearUrls/issues/346
currentURL = tab.url;
}
});
}
/**
* Call by each tab change.
*/
browser.tabs.onActivated.addListener(handleActivated);
/** /**
* Check the request. * Check the request.
*/ */
@@ -697,53 +694,3 @@ function start() {
["blocking"] ["blocking"]
); );
} }
/**
* 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();
}
}
storage.log.log.push(
{
"before": beforeProcessing,
"after": afterProcessing,
"rule": rule,
"timestamp": Date.now()
}
);
deferSaveOnDisk('log');
}
}
/**
* Increases the badged by one.
*/
function increaseBadged(quiet = false) {
if (badges[tabid] == null) badges[tabid] = 0;
if (!quiet) increaseURLCounter();
checkOSAndroid().then((res) => {
if (!res) {
if (storage.badgedStatus && !quiet) {
browser.browserAction.setBadgeText({text: (++badges[tabid]).toString(), tabId: tabid});
} else {
browser.browserAction.setBadgeText({text: "", tabId: tabid});
}
}
});
}

77
core_js/badgedHandler.js Normal file
View File

@@ -0,0 +1,77 @@
/*
* 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/>.
*/
/*jshint esversion: 6 */
/*
* This script is responsible for setting the badged.
*/
let badges = {};
/**
* Increases the badged by one.
*/
function increaseBadged(quiet = false, request) {
if (!quiet) increaseURLCounter();
if(request === null) return;
const tabId = request.tabId;
const url = request.url;
if(tabId === -1) return;
if (badges[tabId] == null) {
badges[tabId] = {
counter: 1,
lastURL: url
};
} else {
badges[tabId].counter += 1;
}
checkOSAndroid().then((res) => {
if (!res) {
if (storage.badgedStatus && !quiet) {
browser.browserAction.setBadgeText({text: (badges[tabId]).counter.toString(), tabId: tabId}).catch(handleError);
} else {
browser.browserAction.setBadgeText({text: "", tabId: tabId}).catch(handleError);
}
}
});
}
/**
* Call by each tab is updated.
* And if url has changed.
*/
function handleUpdated(tabId, changeInfo, tabInfo) {
if(!badges[tabId] || !changeInfo.url) return;
if (badges[tabId].lastURL !== changeInfo.url) {
badges[tabId] = {
counter: 0,
lastURL: tabInfo.url
};
}
}
/**
* Call by each tab is updated.
*/
browser.tabs.onUpdated.addListener(handleUpdated);

View File

@@ -24,18 +24,18 @@ var length = 0;
/** /**
* Load only when document is ready * Load only when document is ready
*/ */
$(document).ready(function(){ (function() {
setText(); 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. * This function cleans all URLs line by line in the textarea.
*/ */
function cleanURLs() { function cleanURLs() {
const cleanTArea = $('#cleanURLs'); const cleanTArea = document.getElementById('cleanURLs');
const dirtyTArea = $('#dirtyURLs'); const dirtyTArea = document.getElementById('dirtyURLs');
const urls = dirtyTArea.val().split('\n'); const urls = dirtyTArea.value.split('\n');
cleanedURLs = []; cleanedURLs = [];
length = urls.length; length = urls.length;
@@ -46,7 +46,7 @@ function cleanURLs() {
}).then((data) => { }).then((data) => {
cleanedURLs.push(data.response); cleanedURLs.push(data.response);
if(i >= length-1) { if(i >= length-1) {
cleanTArea.val(cleanedURLs.join('\n')); cleanTArea.value= cleanedURLs.join('\n');
} }
}, handleError); }, handleError);
} }
@@ -68,11 +68,11 @@ function translate(string)
function setText() function setText()
{ {
document.title = translate('cleaning_tool_page_title'); document.title = translate('cleaning_tool_page_title');
$('#page_title').text(translate('cleaning_tool_page_title')); document.getElementById('page_title').textContent = translate('cleaning_tool_page_title');
$('#cleaning_tool_description').text(translate('cleaning_tool_description')); document.getElementById('cleaning_tool_description').textContent = translate('cleaning_tool_description');
$('#cleaning_tool_btn').text(translate('cleaning_tool_btn')); document.getElementById('cleaning_tool_btn').textContent = translate('cleaning_tool_btn');
$('#cleaning_tool_dirty_urls_label').text(translate('cleaning_tool_dirty_urls_label')); document.getElementById('cleaning_tool_dirty_urls_label').textContent = translate('cleaning_tool_dirty_urls_label');
$('#cleaning_tool_clean_urls_label').text(translate('cleaning_tool_clean_urls_label')); document.getElementById('cleaning_tool_clean_urls_label').textContent = translate('cleaning_tool_clean_urls_label');
} }
function handleError(error) { function handleError(error) {

View File

@@ -42,7 +42,7 @@ function contextMenuStart() {
if (!results || results[0] !== true) { if (!results || results[0] !== true) {
return browser.tabs.executeScript(tab.id, { return browser.tabs.executeScript(tab.id, {
file: "/external_js/clipboard-helper.js", file: "/external_js/clipboard-helper.js",
}); }).catch(handleError);
} }
}).then(() => { }).then(() => {
return browser.tabs.executeScript(tab.id, { return browser.tabs.executeScript(tab.id, {

46
core_js/eTagFilter.js Normal file
View File

@@ -0,0 +1,46 @@
/*
* 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/>.
*/
/*jshint esversion: 6 */
/**
* Filters eTag headers from web requests.
*/
function eTagFilter(requestDetails) {
if(!requestDetails.responseHeaders || !storage.eTagFiltering
|| storage.localHostsSkipping && checkLocalURL(requestDetails.url)) return {};
const responseHeaders = requestDetails.responseHeaders;
const filteredHeaders = responseHeaders.filter(header => {
return header.name.toLowerCase() !== "etag";
});
if(filteredHeaders.length < responseHeaders.length) {
pushToLog(requestDetails.url, requestDetails.url, translate("eTag_filtering_log"));
increaseBadged(false, requestDetails);
increaseGlobalURLCounter(1);
return {responseHeaders: filteredHeaders};
}
}
browser.webRequest.onHeadersReceived.addListener(
eTagFilter,
{urls: ["<all_urls>"]},
["blocking", "responseHeaders"]
);

View File

@@ -30,7 +30,7 @@
ele.type = 'text/javascript'; ele.type = 'text/javascript';
ele.textContent = "Object.defineProperty(window, 'rwt', {" + ele.textContent = "Object.defineProperty(window, 'rwt', {" +
" value: function() { return false; }," + " value: function() { return true; }," +
" writable: false," + " writable: false," +
" configurable: false" + " configurable: false" +
"});"; "});";

View File

@@ -31,7 +31,7 @@ function resetGlobalLog(){
browser.runtime.sendMessage({ browser.runtime.sendMessage({
function: "setData", function: "setData",
params: ['log', JSON.stringify(obj)] params: ['log', JSON.stringify(obj)]
}); }).catch(handleError);
location.reload(); location.reload();
} }
@@ -52,27 +52,38 @@ function getLog()
return b.timestamp - a.timestamp; 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({ $('#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, "pageLength": 10,
"language": { "language": {
"url": getDataTableTranslation() "url": getDataTableTranslation()
} }
} ).order([3, 'desc']).draw(); } ).order([3, 'desc']).draw();
}); }).catch(handleError);
} }
/** /**
@@ -107,8 +118,8 @@ function exportGlobalLog() {
'url': URL.createObjectURL(blob), 'url': URL.createObjectURL(blob),
'filename': 'ClearURLsLogExport.json', 'filename': 'ClearURLsLogExport.json',
'saveAs': true 'saveAs': true
}); }).catch(handleError);
}); }).catch(handleError);
} }
/** /**
@@ -132,13 +143,13 @@ function importGlobalLog(evt) {
/** /**
* Load only when document is ready * Load only when document is ready
*/ */
$(document).ready(function(){ (function () {
setText(); setText();
getLog(); getLog();
$('#reset_log_btn').on("click", resetGlobalLog); document.getElementById('reset_log_btn').onclick = resetGlobalLog;
$('#export_log_btn').on("click", exportGlobalLog); document.getElementById('export_log_btn').onclick = exportGlobalLog;
$('#importLog').on("change", importGlobalLog); document.getElementById('importLog').onchange = importGlobalLog;
}); })();
/** /**
* Translate a string with the i18n API. * Translate a string with the i18n API.
@@ -156,17 +167,17 @@ function translate(string)
function setText() function setText()
{ {
document.title = translate('log_html_page_title'); document.title = translate('log_html_page_title');
$('#page_title').text(translate('log_html_page_title')); document.getElementById('page_title').textContent = translate('log_html_page_title');
$('#reset_log_btn').text(translate('log_html_reset_button')) document.getElementById('reset_log_btn').textContent = translate('log_html_reset_button');
.prop('title', translate('log_html_reset_button_title')); document.getElementById('reset_log_btn').setAttribute('title', translate('log_html_reset_button_title'));
$('#head_1').text(translate('log_html_table_head_1')); document.getElementById('head_1').textContent = translate('log_html_table_head_1');
$('#head_2').text(translate('log_html_table_head_2')); document.getElementById('head_2').textContent = translate('log_html_table_head_2');
$('#head_3').text(translate('log_html_table_head_3')); document.getElementById('head_3').textContent = translate('log_html_table_head_3');
$('#head_4').text(translate('log_html_table_head_4')); document.getElementById('head_4').textContent = translate('log_html_table_head_4');
$('#export_log_btn_text').text(translate('log_html_export_button')); document.getElementById('export_log_btn_text').textContent = translate('log_html_export_button');
$('#export_log_btn').prop('title', translate('log_html_export_button_title')); document.getElementById('export_log_btn').setAttribute('title', translate('log_html_export_button_title'));
$('#import_log_btn_text').text(translate('log_html_import_button')); document.getElementById('import_log_btn_text').textContent = translate('log_html_import_button');
$('#importLog').prop('title', translate('log_html_import_button_title')); document.getElementById('importLog').setAttribute('title', translate('log_html_import_button_title'));
} }
function handleError(error) { function handleError(error) {

View File

@@ -17,11 +17,11 @@
*/ */
/*jshint esversion: 6 */ /*jshint esversion: 6 */
var element = $("#statistics_value"); var element = document.getElementById('statistics_value');
var elGlobalPercentage = $("#statistics_value_global_percentage"); var elGlobalPercentage = document.getElementById('statistics_value_global_percentage');
var elProgressbar_blocked = $('#progress_blocked'); var elProgressbar_blocked = document.getElementById('progress_blocked');
var elProgressbar_non_blocked = $('#progress_non_blocked'); var elProgressbar_non_blocked = document.getElementById('progress_non_blocked');
var elTotal = $('#statistics_total_elements'); var elTotal = document.getElementById('statistics_total_elements');
var globalPercentage = 0; var globalPercentage = 0;
var globalCounter; var globalCounter;
var globalurlcounter; var globalurlcounter;
@@ -55,11 +55,11 @@ function changeStatistics()
if(isNaN(Number(globalPercentage))) globalPercentage = 0; if(isNaN(Number(globalPercentage))) globalPercentage = 0;
element.text(globalCounter.toLocaleString()); element.textContent = globalCounter.toLocaleString();
elGlobalPercentage.text(globalPercentage+"%"); elGlobalPercentage.textContent = globalPercentage+"%";
elProgressbar_blocked.css('width', globalPercentage+'%'); elProgressbar_blocked.style.width = globalPercentage+'%';
elProgressbar_non_blocked.css('width', (100-globalPercentage)+'%'); elProgressbar_non_blocked.style.width = (100-globalPercentage)+'%';
elTotal.text(globalurlcounter.toLocaleString()); elTotal.textContent = globalurlcounter.toLocaleString();
} }
/** /**
@@ -67,14 +67,14 @@ function changeStatistics()
*/ */
function setHashStatus() function setHashStatus()
{ {
let element = $('#hashStatus'); let element = document.getElementById('hashStatus');
if(hashStatus) if(hashStatus)
{ {
element.text(translate(hashStatus)); element.textContent = translate(hashStatus);
} }
else { else {
element.text(translate('hash_status_code_5')); element.textContent = translate('hash_status_code_5');
} }
} }
@@ -86,29 +86,29 @@ function setHashStatus()
*/ */
function changeSwitchButton(id, storageID) function changeSwitchButton(id, storageID)
{ {
let element = $('#'+id); let element = document.getElementById(id);
changeVisibility(id, storageID); changeVisibility(id, storageID);
element.on('change', function(){ element.onchange = function(){
browser.runtime.sendMessage({ browser.runtime.sendMessage({
function: "setData", function: "setData",
params: [storageID, element.is(':checked')] params: [storageID, element.checked]
}).then((data) => { }).then((data) => {
if(storageID === "globalStatus"){ if(storageID === "globalStatus"){
browser.runtime.sendMessage({ browser.runtime.sendMessage({
function: "changeIcon", function: "changeIcon",
params: [] params: []
}); }).catch(handleError);
} }
changeVisibility(id, storageID); changeVisibility(id, storageID);
browser.runtime.sendMessage({ browser.runtime.sendMessage({
function: "saveOnExit", function: "saveOnExit",
params: [] params: []
}); }).catch(handleError);
}); }).catch(handleError);
}); };
} }
/** /**
@@ -121,10 +121,10 @@ function changeVisibility(id, storageID)
switch(storageID) switch(storageID)
{ {
case "loggingStatus": case "loggingStatus":
element = $('#log_section'); element = document.getElementById('log_section');
break; break;
case "statisticsStatus": case "statisticsStatus":
element = $('#statistic_section'); element = document.getElementById('statistic_section');
break; break;
default: default:
element = "undefine"; element = "undefine";
@@ -132,14 +132,14 @@ function changeVisibility(id, storageID)
if(element !== "undefine") if(element !== "undefine")
{ {
if($('#'+id).is(':checked')) if(document.getElementById(id).checked)
{ {
element.css('display', ''); element.style.display = '';
element.css('display', ''); element.style.display = '';
} }
else { else {
element.css('display', 'none'); element.style.display = 'none';
element.css('display', 'none'); element.style.display = 'none';
} }
} }
} }
@@ -151,8 +151,8 @@ function changeVisibility(id, storageID)
*/ */
function setSwitchButton(id, varname) function setSwitchButton(id, varname)
{ {
let element = $('#'+id); const element = document.getElementById(id);
element.prop('checked', this[varname]); element.checked = this[varname];
} }
/** /**
@@ -162,17 +162,17 @@ function resetGlobalCounter(){
browser.runtime.sendMessage({ browser.runtime.sendMessage({
function: "setData", function: "setData",
params: ['globalCounter', 0] params: ['globalCounter', 0]
}); }).catch(handleError);
browser.runtime.sendMessage({ browser.runtime.sendMessage({
function: "setData", function: "setData",
params: ['globalurlcounter', 0] params: ['globalurlcounter', 0]
}); }).catch(handleError);
browser.runtime.sendMessage({ browser.runtime.sendMessage({
function: "saveOnExit", function: "saveOnExit",
params: [] params: []
}); }).catch(handleError);
globalCounter = 0; globalCounter = 0;
globalurlcounter = 0; globalurlcounter = 0;
@@ -180,7 +180,7 @@ function resetGlobalCounter(){
changeStatistics(); changeStatistics();
} }
$(document).ready(function(){ (function() {
loadData("globalCounter") loadData("globalCounter")
.then(() => loadData("globalurlcounter")) .then(() => loadData("globalurlcounter"))
.then(() => loadData("globalStatus")) .then(() => loadData("globalStatus"))
@@ -191,17 +191,17 @@ $(document).ready(function(){
.then(() => loadData("getCurrentURL", "currentURL")) .then(() => loadData("getCurrentURL", "currentURL"))
.then(() => { .then(() => {
init(); init();
$('#reset_counter_btn').on("click", resetGlobalCounter); document.getElementById('reset_counter_btn').onclick = resetGlobalCounter;
changeSwitchButton("globalStatus", "globalStatus"); changeSwitchButton("globalStatus", "globalStatus");
changeSwitchButton("tabcounter", "badgedStatus"); changeSwitchButton("tabcounter", "badgedStatus");
changeSwitchButton("logging", "loggingStatus"); changeSwitchButton("logging", "loggingStatus");
changeSwitchButton("statistics", "statisticsStatus"); changeSwitchButton("statistics", "statisticsStatus");
$('#loggingPage').attr('href', browser.extension.getURL('./html/log.html')); document.getElementById('loggingPage').href = browser.extension.getURL('./html/log.html');
$('#settings').attr('href', browser.extension.getURL('./html/settings.html')); document.getElementById('settings').href = browser.extension.getURL('./html/settings.html');
$('#cleaning_tools').attr('href', browser.extension.getURL('./html/cleaningTool.html')); document.getElementById('cleaning_tools').href = browser.extension.getURL('./html/cleaningTool.html');
setText(); setText();
}); });
}); })();
/** /**
* Set the text for the UI. * Set the text for the UI.
@@ -220,7 +220,7 @@ function setText()
injectText('configs_switch_filter','popup_html_configs_switch_filter'); injectText('configs_switch_filter','popup_html_configs_switch_filter');
injectText('configs_head','popup_html_configs_head'); injectText('configs_head','popup_html_configs_head');
injectText('configs_switch_statistics','configs_switch_statistics'); 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 = "") function injectText(id, attribute, tooltip = "")
{ {
let object = $('#'+id); const object = document.getElementById(id);
object.text(translate(attribute)); object.textContent = translate(attribute);
/* /*
This function will throw an error if no translation This function will throw an error if no translation
@@ -243,7 +243,7 @@ function injectText(id, attribute, tooltip = "")
if(tooltip !== "") if(tooltip !== "")
{ {
object.prop('title', tooltip); object.setAttribute('title', tooltip);
} }
} }

View File

@@ -18,28 +18,47 @@
var settings = []; var settings = [];
getData(); const pickr = Pickr.create({
el: '#badged-color-picker',
/** theme: 'nano',
* Load only when document is ready components: {
*/ preview: true,
$(document).ready(function(){ opacity: true,
setText(); hue: true,
$("#badged-color-picker").colorpicker({ default: '#FFA500',
format: "hex" comparison: false,
}); interaction: {
$('#reset_settings_btn').on("click", reset); hex: true,
$('#export_settings_btn').on("click", exportSettings); rgba: false,
$('#importSettings').on("change", importSettings); hsla: false,
$('#save_settings_btn').on("click", save); hsva: false,
cmyk: false,
input: true,
clear: false,
save: true
}
}
}); });
/** /**
* Reset everything. * Load only when document is ready
* Set everthing to the default values. */
*/ (function () {
function reset() 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({ browser.runtime.sendMessage({
function: "initSettings", function: "initSettings",
params: [] params: []
@@ -57,15 +76,14 @@ function reset()
} }
/** /**
* Saves the settings. * Saves the settings.
*/ */
function save() function save() {
{ saveData("badged_color", pickr.getColor().toHEXA().toString())
saveData("badged_color", $('input[name=badged_color]').val()) .then(() => saveData("ruleURL", document.querySelector('input[name=ruleURL]').value))
.then(() => saveData("ruleURL", $('input[name=ruleURL]').val())) .then(() => saveData("hashURL", document.querySelector('input[name=hashURL]').value))
.then(() => saveData("hashURL", $('input[name=hashURL]').val())) .then(() => saveData("types", document.querySelector('input[name=types]').value))
.then(() => saveData("types", $('input[name=types]').val())) .then(() => saveData("logLimit", Math.max(0, Math.min(5000, document.querySelector('input[name=logLimit]').value))))
.then(() => saveData("logLimit", $('input[name=logLimit]').val()))
.then(() => browser.runtime.sendMessage({ .then(() => browser.runtime.sendMessage({
function: "setBadgedStatus", function: "setBadgedStatus",
params: [] params: []
@@ -85,29 +103,34 @@ function save()
* *
* @param {string} string Name of the attribute used for localization * @param {string} string Name of the attribute used for localization
* @param {string[]} placeholders Array of placeholders * @param {string[]} placeholders Array of placeholders
*/ */
function translate(string, ...placeholders) function translate(string, ...placeholders) {
{
return browser.i18n.getMessage(string, placeholders); return browser.i18n.getMessage(string, placeholders);
} }
/** /**
* Get the data. * Get the data.
*/ */
function getData() function getData() {
{ browser.runtime.sendMessage({
loadData("badged_color") function: "getData",
.then(() => loadData("ruleURL")) params: ["badged_color"]
}).then(data => {
settings["badged_color"] = data.response;
pickr.setColor(data.response, false);
}).catch(handleError);
loadData("ruleURL")
.then(() => loadData("hashURL")) .then(() => loadData("hashURL"))
.then(() => loadData("types")) .then(() => loadData("types"))
.then(() => loadData("logLimit")) .then(() => loadData("logLimit"))
.then(logData => { .then(logData => {
if(logData.response === undefined || logData.response === -1) { if (logData.response === undefined) {
$('#logLimit_label').text(translate('setting_log_limit_label', "∞")); document.getElementById('logLimit_label').textContent = translate('setting_log_limit_label', "0");
} else { } 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);
loadData("contextMenuEnabled") loadData("contextMenuEnabled")
.then(() => loadData("historyListenerEnabled")) .then(() => loadData("historyListenerEnabled"))
@@ -115,6 +138,7 @@ function getData()
.then(() => loadData("referralMarketing")) .then(() => loadData("referralMarketing"))
.then(() => loadData("domainBlocking")) .then(() => loadData("domainBlocking"))
.then(() => loadData("pingBlocking")) .then(() => loadData("pingBlocking"))
.then(() => loadData("eTagFiltering"))
.then(() => { .then(() => {
changeSwitchButton("localHostsSkipping", "localHostsSkipping"); changeSwitchButton("localHostsSkipping", "localHostsSkipping");
changeSwitchButton("historyListenerEnabled", "historyListenerEnabled"); changeSwitchButton("historyListenerEnabled", "historyListenerEnabled");
@@ -122,7 +146,8 @@ function getData()
changeSwitchButton("referralMarketing", "referralMarketing"); changeSwitchButton("referralMarketing", "referralMarketing");
changeSwitchButton("domainBlocking", "domainBlocking"); changeSwitchButton("domainBlocking", "domainBlocking");
changeSwitchButton("pingBlocking", "pingBlocking"); changeSwitchButton("pingBlocking", "pingBlocking");
}); changeSwitchButton("eTagFiltering", "eTagFiltering");
}).catch(handleError);
} }
/** /**
@@ -138,7 +163,10 @@ async function loadData(name) {
params: [name] params: [name]
}).then(data => { }).then(data => {
settings[name] = data.response; 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); resolve(data);
}, handleError); }, handleError);
}); });
@@ -164,31 +192,32 @@ async function saveData(key, data) {
} }
/** /**
* Set the text for the UI. * Set the text for the UI.
*/ */
function setText() function setText() {
{
document.title = translate('settings_html_page_title'); document.title = translate('settings_html_page_title');
$('#page_title').text(translate('settings_html_page_title')); document.getElementById('page_title').textContent = translate('settings_html_page_title');
$('#badged_color_label').text(translate('badged_color_label')); document.getElementById('badged_color_label').textContent = translate('badged_color_label');
$('#reset_settings_btn').text(translate('setting_html_reset_button')) document.getElementById('reset_settings_btn').textContent = translate('setting_html_reset_button');
.prop('title', translate('setting_html_reset_button_title')); document.getElementById('reset_settings_btn').setAttribute('title', translate('setting_html_reset_button_title'));
$('#rule_url_label').text(translate('setting_rule_url_label')); document.getElementById('rule_url_label').textContent = translate('setting_rule_url_label');
$('#hash_url_label').text(translate('setting_hash_url_label')); document.getElementById('hash_url_label').textContent = translate('setting_hash_url_label');
$('#types_label').html(translate('setting_types_label')); document.getElementById('types_label').innerHTML = translate('setting_types_label');
$('#save_settings_btn').text(translate('settings_html_save_button')) document.getElementById('save_settings_btn').textContent = translate('settings_html_save_button');
.prop('title', translate('settings_html_save_button_title')); document.getElementById('save_settings_btn').setAttribute('title', translate('settings_html_save_button_title'));
injectText("context_menu_enabled", "context_menu_enabled"); 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"); injectText("local_hosts_skipping", "local_hosts_skipping");
$('#export_settings_btn_text').text(translate('setting_html_export_button')); document.getElementById('export_settings_btn_text').textContent = translate('setting_html_export_button');
$('#export_settings_btn').prop('title', translate('setting_html_export_button_title')); document.getElementById('export_settings_btn').setAttribute('title', translate('setting_html_export_button_title'));
$('#import_settings_btn_text').text(translate('setting_html_import_button')); document.getElementById('import_settings_btn_text').textContent = translate('setting_html_import_button');
$('#importSettings').prop('title', translate('setting_html_import_button_title')); document.getElementById('importSettings').setAttribute('title', translate('setting_html_import_button_title'));
injectText("referral_marketing_enabled", "referral_marketing_enabled"); injectText("referral_marketing_enabled", "referral_marketing_enabled");
injectText("domain_blocking_enabled", "domain_blocking_enabled"); injectText("domain_blocking_enabled", "domain_blocking_enabled");
$('#ping_blocking_enabled').html(translate('ping_blocking_enabled')) document.getElementById('ping_blocking_enabled').innerHTML = translate('ping_blocking_enabled');
.prop('title', translate('ping_blocking_enabled_title')); 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'));
} }
/** /**
@@ -205,8 +234,8 @@ function exportSettings() {
'url': URL.createObjectURL(blob), 'url': URL.createObjectURL(blob),
'filename': 'ClearURLs.conf', 'filename': 'ClearURLs.conf',
'saveAs': true 'saveAs': true
}); }).catch(handleError);
}); }).catch(handleError);
} }
/** /**
@@ -216,10 +245,10 @@ function importSettings(evt) {
let file = evt.target.files[0]; let file = evt.target.files[0];
let fileReader = new FileReader(); let fileReader = new FileReader();
fileReader.onload = function(e) { fileReader.onload = function (e) {
let data = JSON.parse(e.target.result); let data = JSON.parse(e.target.result);
const length = Object.keys(data).length; const length = Object.keys(data).length;
let i=0; let i = 0;
Object.entries(data).forEach(([key, value]) => { Object.entries(data).forEach(([key, value]) => {
browser.runtime.sendMessage({ browser.runtime.sendMessage({
@@ -227,7 +256,7 @@ function importSettings(evt) {
params: [key, value] params: [key, value]
}).then(() => { }).then(() => {
i++; i++;
if(i === length) { if (i === length) {
location.reload(); location.reload();
} }
}, handleError); }, handleError);
@@ -245,66 +274,62 @@ function handleError(error) {
} }
/** /**
* Change the value of a switch button. * Change the value of a switch button.
* @param {string} id HTML id * @param {string} id HTML id
* @param {string} storageID storage internal id * @param {string} storageID storage internal id
*/ */
function changeSwitchButton(id, storageID) function changeSwitchButton(id, storageID) {
{ let element = document.getElementById(id);
let element = $('#'+id);
element.on('change', function(){ element.onchange = function () {
browser.runtime.sendMessage({ browser.runtime.sendMessage({
function: "setData", function: "setData",
params: [storageID, element.is(':checked')] params: [storageID, element.checked]
}).then((data) => { }).then(() => {
if(storageID === "globalStatus"){ if (storageID === "globalStatus") {
browser.runtime.sendMessage({ browser.runtime.sendMessage({
function: "changeIcon", function: "changeIcon",
params: [] params: []
}); }).catch(handleError);
} }
browser.runtime.sendMessage({ browser.runtime.sendMessage({
function: "saveOnExit", function: "saveOnExit",
params: [] params: []
}); }).catch(handleError);
}); }).catch(handleError);
}); };
setSwitchButton(id, storageID); setSwitchButton(id, storageID);
} }
/** /**
* Helper function to inject the translated text and tooltip. * Helper function to inject the translated text and tooltip.
* *
* @param {string} id ID of the HTML element * @param {string} id ID of the HTML element
* @param {string} attribute Name of the attribute used for localization * @param {string} attribute Name of the attribute used for localization
* @param {boolean} tooltip * @param {string} tooltip
*/ */
function injectText(id, attribute, tooltip = "") function injectText(id, attribute, tooltip = "") {
{ let object = document.getElementById(id);
let object = $('#'+id); object.textContent = translate(attribute);
object.text(translate(attribute));
/* /*
This function will throw an error if no translation This function will throw an error if no translation
is found for the tooltip. This is a planned error. is found for the tooltip. This is a planned error.
*/ */
tooltip = translate(attribute+"_title"); tooltip = translate(attribute + "_title");
if(tooltip !== "") if (tooltip !== "") {
{ object.setAttribute('title', tooltip);
object.prop('title', tooltip);
} }
} }
/** /**
* Set the value of a switch button. * Set the value of a switch button.
* @param {string} id HTML id * @param {string} id HTML id
* @param {string} varname js internal variable name * @param {string} varname js internal variable name
*/ */
function setSwitchButton(id, varname) function setSwitchButton(id, varname) {
{ let element = document.getElementById(id);
let element = $('#'+id); element.checked = settings[varname];
element.prop('checked', settings[varname]);
} }

View File

@@ -27,18 +27,18 @@
function setText() function setText()
{ {
document.title = translate('blocked_html_title'); document.title = translate('blocked_html_title');
$('#title').html(translate('blocked_html_title')); document.getElementById('title').innerHTML = translate('blocked_html_title');
$('#body').html(translate('blocked_html_body')); document.getElementById('body').innerHTML = translate('blocked_html_body');
$('#page').text(translate('blocked_html_button')); document.getElementById('page').textContent = translate('blocked_html_button');
} }
$(document).ready(function(){ (function() {
setText(); setText();
let source = new URLSearchParams(window.location.search).get("source"); const source = new URLSearchParams(window.location.search).get("source");
$('#page').attr('href', decodeURIComponent(source)); document.getElementById('page').href = decodeURIComponent(source);
}); })();
/** /**
* Translate a string with the i18n API. * Translate a string with the i18n API.

View File

@@ -75,7 +75,7 @@ function saveOnDisk(keys) {
}); });
console.log(translate('core_save_on_disk')); console.log(translate('core_save_on_disk'));
browser.storage.local.set(json); browser.storage.local.set(json).catch(handleError);
} }
/** /**
@@ -114,7 +114,7 @@ function genesis() {
// Start history listener // Start history listener
historyListenerStart(); historyListenerStart();
}, error); }, handleError);
} }
/** /**
@@ -164,14 +164,6 @@ function setData(key, value) {
} }
} }
/**
* Write error on console.
*/
function error(e) {
console.log(translate('core_error'));
console.error(e);
}
/** /**
* Set default values, if the storage is empty. * Set default values, if the storage is empty.
* @param {Object} items * @param {Object} items
@@ -207,12 +199,14 @@ function initSettings() {
storage.historyListenerEnabled = true; storage.historyListenerEnabled = true;
storage.localHostsSkipping = true; storage.localHostsSkipping = true;
storage.referralMarketing = false; storage.referralMarketing = false;
storage.logLimit = -1; storage.logLimit = 100;
storage.domainBlocking = true; storage.domainBlocking = true;
storage.pingBlocking = true; storage.pingBlocking = true;
storage.eTagFiltering = true;
storage.watchDogErrorCount = 0;
if (getBrowser() === "Firefox") { 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"]; storage.pingRequestTypes = ["ping", "beacon"];
} else if (getBrowser() === "Chrome") { } else if (getBrowser() === "Chrome") {
storage.types = ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "csp_report", "media", "websocket", "other"]; storage.types = ["main_frame", "sub_frame", "stylesheet", "script", "image", "font", "object", "xmlhttprequest", "ping", "csp_report", "media", "websocket", "other"];
@@ -276,6 +270,10 @@ function storeHashStatus(status_code) {
case 3: case 3:
status_code = "hash_status_code_3"; status_code = "hash_status_code_3";
break; break;
case 5:
status_code = "hash_status_code_5";
break;
case 4:
default: default:
status_code = "hash_status_code_4"; status_code = "hash_status_code_4";
} }

View File

@@ -21,6 +21,12 @@
* This script is responsible for some tools. * 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. * To support Waterfox.
*/ */
@@ -48,9 +54,11 @@ function isEmpty(obj) {
* Translate a string with the i18n API. * Translate a string with the i18n API.
* *
* @param {string} string Name of the attribute used for localization * @param {string} string Name of the attribute used for localization
* @param {string[]} placeholders Array of placeholders
*/ */
function translate(string) { function translate(string, ...placeholders)
return browser.i18n.getMessage(string); {
return browser.i18n.getMessage(string, placeholders);
} }
/** /**
@@ -181,32 +189,6 @@ function loadOldDataFromStore() {
localDataHash = storage.dataHash; localDataHash = storage.dataHash;
} }
/**
* Save the hash status to the local storage (RAM).
* The status can have the following values:
* 1 "up to date"
* 2 "updated"
* 3 "update available"
* @param status_code the number for the status
*/
function storeHashStatus(status_code) {
switch (status_code) {
case 1:
status_code = "hash_status_code_1";
break;
case 2:
status_code = "hash_status_code_2";
break;
case 3:
status_code = "hash_status_code_3";
break;
default:
status_code = "hash_status_code_4";
}
storage.hashStatus = status_code;
}
/** /**
* Increase by {number} the GlobalURLCounter * Increase by {number} the GlobalURLCounter
* @param {int} number * @param {int} number
@@ -235,9 +217,9 @@ function changeIcon() {
checkOSAndroid().then((res) => { checkOSAndroid().then((res) => {
if (!res) { if (!res) {
if (storage.globalStatus) { if (storage.globalStatus) {
browser.browserAction.setIcon({path: "img/clearurls_128x128.png"}); browser.browserAction.setIcon({path: "img/clearurls_128x128.png"}).catch(handleError);
} else { } else {
browser.browserAction.setIcon({path: "img/clearurls_gray_128x128.png"}); browser.browserAction.setIcon({path: "img/clearurls_gray_128x128.png"}).catch(handleError);
} }
} }
}); });
@@ -252,11 +234,18 @@ function setBadgedStatus() {
checkOSAndroid().then((res) => { checkOSAndroid().then((res) => {
if (!res && storage.badgedStatus) { if (!res && storage.badgedStatus) {
let color = storage.badged_color; let color = storage.badged_color;
if(storage.badged_color.charAt(0) !== '#') if (storage.badged_color.charAt(0) !== '#')
color = '#' + storage.badged_color; color = '#' + storage.badged_color;
browser.browserAction.setBadgeBackgroundColor({ browser.browserAction.setBadgeBackgroundColor({
'color': color 'color': color
}); }).catch(handleError);
// Works only in Firefox: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserAction/setBadgeTextColor#Browser_compatibility
if (getBrowser() === "Firefox") {
browser.browserAction.setBadgeTextColor({
color: "#FFFFFF"
}).catch(handleError);
}
} }
}); });
} }
@@ -294,11 +283,67 @@ function decodeURL(url) {
} }
/** /**
* Gets the value of at `key` an object. If the resolved value is `undefined`, the `defaultValue` is returned in its place. * Gets the value of at `key` an object. If the resolved value is `undefined`, the `defaultValue` is returned in its place.
* *
* @param {string} key the key of the object * @param {string} key the key of the object
* @param {object} defaultValue the default value * @param {object} defaultValue the default value
*/ */
Object.prototype.getOrDefault = function (key, defaultValue) { Object.prototype.getOrDefault = function (key, defaultValue) {
return this[key] === undefined ? defaultValue : this[key]; return this[key] === undefined ? defaultValue : this[key];
}; };
function handleError(error) {
console.error("[ClearURLs ERROR]:" + error);
}
/**
* Function to log all activities from ClearUrls.
* Only logging when activated.
*
* @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 && !isNaN(limit)) {
while (storage.log.log.length >= limit
|| storage.log.log.length >= logThreshold) {
storage.log.log.shift();
}
storage.log.log.push(
{
"before": beforeProcessing,
"after": afterProcessing,
"rule": rule,
"timestamp": Date.now()
}
);
deferSaveOnDisk('log');
}
}
/**
* Checks if the storage is available.
*/
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('');
}

View File

@@ -24,15 +24,21 @@
* *
* This watchdog restarts the whole Add-on, when the check fails. * This watchdog restarts the whole Add-on, when the check fails.
*/ */
const CHECK_INTERVAL = 15000; const CHECK_INTERVAL = 60000;
setInterval(function() { setInterval(function() {
if(isStorageAvailable() && storage.globalStatus) {
const dirtyURL = "https://clearurls.roebert.eu?utm_source=addon"; const dirtyURL = "https://clearurls.roebert.eu?utm_source=addon";
const cleanURL = "https://clearurls.roebert.eu"; const cleanURL = "https://clearurls.roebert.eu";
if(pureCleaning(dirtyURL, true) !== cleanURL) { if(pureCleaning(dirtyURL, true) !== cleanURL) {
console.log(translate('watchdog')); storage.watchDogErrorCount += 1;
console.log(translate('watchdog', storage.watchDogErrorCount));
saveOnExit(); saveOnExit();
reload(); if(storage.watchDogErrorCount < 3) reload();
} else if(storage.watchDogErrorCount > 0){
storage.watchDogErrorCount = 0;
saveOnExit();
}
} }
}, CHECK_INTERVAL); }, CHECK_INTERVAL);

View File

@@ -21,4 +21,4 @@
* @return version * @return version
*/ */
const version = browser.runtime.getManifest().version; const version = browser.runtime.getManifest().version;
$('#version').text(version); document.getElementById('version').textContent = version;

File diff suppressed because one or more lines are too long

1
css/pickr.nano.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -33,7 +33,11 @@
"aaxitk", "aaxitk",
"hsa_cr_id", "hsa_cr_id",
"sb-ci-[a-zA-Z]+", "sb-ci-[a-zA-Z]+",
"rnid" "rnid",
"dchild",
"camp",
"creative",
"s"
], ],
"referralMarketing": [ "referralMarketing": [
"tag" "tag"
@@ -42,7 +46,9 @@
".*(amazon\\.).*(\\/gp).*\\/redirector.html\\/.*", ".*(amazon\\.).*(\\/gp).*\\/redirector.html\\/.*",
".*(amazon\\.).*(\\/hz\\/reviews-render\\/ajax\\/).*", ".*(amazon\\.).*(\\/hz\\/reviews-render\\/ajax\\/).*",
".*(amazon\\.).*(\\/gp).*\\/cart\\/ajax-update.html\\/.*", ".*(amazon\\.).*(\\/gp).*\\/cart\\/ajax-update.html\\/.*",
".*(amazon\\.).*\\/message-us\\?.*" ".*(amazon\\.).*\\/message-us\\?.*",
".*(amazon\\.).*(\\/gp).*\\/video\\/api\\/.*",
".*(amazon\\.).*\\/s\\?.*"
], ],
"rawRules": [ "rawRules": [
"\\/ref=[^\\/\\?]*" "\\/ref=[^\\/\\?]*"
@@ -50,6 +56,54 @@
"redirections": [], "redirections": [],
"forceRedirection": false "forceRedirection": false
}, },
"amazon search": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(amazon)(\\.[a-zA-Z]{2,}).*\\/s.*\\?.*",
"completeProvider": false,
"rules": [
"pf_rd_[a-zA-Z]",
"qid",
"sr",
"srs",
"pd_rd_[a-zA-Z]*",
"__mk_[a-zA-Z]{1,3}_[a-zA-Z]{1,3}",
"spIA",
"ms3_c",
"[a-zA-Z%0-9]*ie",
"refRID",
"colid",
"coliid",
"[^a-zA-Z%0-9]adId",
"qualifier",
"_encoding",
"smid",
"field-lbr_brands_browse-bin",
"ref_?",
"th",
"sprefix",
"crid",
"keywords",
"cv_ct_[a-zA-Z]+",
"linkCode",
"creativeASIN",
"ascsubtag",
"aaxitk",
"hsa_cr_id",
"sb-ci-[a-zA-Z]+",
"rnid",
"dchild",
"camp",
"creative"
],
"referralMarketing": [
"tag"
],
"rawRules": [
"\\/ref=[^\\/\\?]*"
],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"fls-na.amazon": { "fls-na.amazon": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(fls-na\\.amazon)(\\.[a-zA-Z]{2,}).*", "urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(fls-na\\.amazon)(\\.[a-zA-Z]{2,}).*",
"completeProvider": true, "completeProvider": true,
@@ -96,7 +150,9 @@
"aqs", "aqs",
"sourceid", "sourceid",
"sxsrf", "sxsrf",
"rlz" "rlz",
"i-would-rather-use-firefox",
"stick"
], ],
"referralMarketing": [ "referralMarketing": [
"referrer" "referrer"
@@ -125,6 +181,19 @@
], ],
"forceRedirection": true "forceRedirection": true
}, },
"googleSearch": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(google)(\\.[a-zA-Z]{2,})\\/search\\?.*",
"completeProvider": false,
"rules": [
"client",
"sclient"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"googlesyndication": { "googlesyndication": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(googlesyndication)(\\.[a-zA-Z]{2,}).*", "urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(googlesyndication)(\\.[a-zA-Z]{2,}).*",
"completeProvider": true, "completeProvider": true,
@@ -163,7 +232,7 @@
"urlPattern": ".*", "urlPattern": ".*",
"completeProvider": false, "completeProvider": false,
"rules": [ "rules": [
"(%3F)?utm(_[a-zA-Z]*)?", "(%3F)?utm(_[a-zA-Z_]*)?",
"(%3F)?ga_[a-zA-Z_]+", "(%3F)?ga_[a-zA-Z_]+",
"(%3F)?yclid", "(%3F)?yclid",
"(%3F)?_openstat", "(%3F)?_openstat",
@@ -191,7 +260,9 @@
"(%3F)?wtrid", "(%3F)?wtrid",
"(%3F)?[a-zA-Z]?mc", "(%3F)?[a-zA-Z]?mc",
"(%3F)?dclid", "(%3F)?dclid",
"Echobox" "Echobox",
"(%3F)?spm",
"(%3F)?vn(_[a-zA-Z]*)+"
], ],
"referralMarketing": [], "referralMarketing": [],
"rawRules": [], "rawRules": [],
@@ -223,7 +294,19 @@
"(https:\\/\\/|http:\\/\\/)(support\\.)(steampowered\\.com).*\\?.*", "(https:\\/\\/|http:\\/\\/)(support\\.)(steampowered\\.com).*\\?.*",
"(https:\\/\\/|http:\\/\\/)(privacy\\.)(vakmedianet\\.nl).*\\?.*ref=.*", "(https:\\/\\/|http:\\/\\/)(privacy\\.)(vakmedianet\\.nl).*\\?.*ref=.*",
"(https:\\/\\/|http:\\/\\/)(sso\\.)(serverplan\\.com)\\/manage2fa\\/check\\?ref=.*", "(https:\\/\\/|http:\\/\\/)(sso\\.)(serverplan\\.com)\\/manage2fa\\/check\\?ref=.*",
"(https:\\/\\/|http:\\/\\/)(login\\.)(meijer\\.com)\\/.*\\?ref=.*" "(https:\\/\\/|http:\\/\\/)(login\\.)(meijer\\.com)\\/.*\\?ref=.*",
".*(facebook\\.)\\w{2,}.*(\\/login_alerts\\/).*",
".*(facebook\\.)\\w{2,}.*(\\/should_add_browser\\/).*",
".*(facebook\\.)\\w{2,}.*(\\/ajax\\/).*",
".*(api\\.taiga\\.io).*",
".*(\\.gog\\.com\\/click\\.html).*",
".*(login\\.progressive\\.com).*",
".*(sephora\\.com\\/api\\/).*",
".*(contestgirl\\.com).*",
".*agenciatributaria.gob.es.*",
".*login\\.ingbank\\.pl.*",
"wss?:\\/\\/.*zoom\\.us.*",
".*api\\.bilibili\\.com.*"
], ],
"redirections": [], "redirections": [],
"forceRedirection": false "forceRedirection": false
@@ -337,7 +420,8 @@
"padding", "padding",
"ls_ref", "ls_ref",
"action_history", "action_history",
"fbid" "fbid",
"comment_id"
], ],
"referralMarketing": [], "referralMarketing": [],
"rawRules": [], "rawRules": [],
@@ -373,7 +457,18 @@
"reddit": { "reddit": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(reddit)(\\.[a-zA-Z]{2,}).*", "urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(reddit)(\\.[a-zA-Z]{2,}).*",
"completeProvider": false, "completeProvider": false,
"rules": [], "rules": [
"%24deep_link",
"\\$deep_link",
"correlation_id",
"ref_campaign",
"ref_source",
"%243p",
"\\$3p",
"%24original_url",
"\\$original_url",
"_branch_match_id"
],
"referralMarketing": [], "referralMarketing": [],
"rawRules": [], "rawRules": [],
"exceptions": [], "exceptions": [],
@@ -479,7 +574,9 @@
], ],
"referralMarketing": [], "referralMarketing": [],
"rawRules": [], "rawRules": [],
"exceptions": [], "exceptions": [
".*indeed\\.com\\/rc\\/clk.*"
],
"redirections": [], "redirections": [],
"forceRedirection": false "forceRedirection": false
}, },
@@ -598,7 +695,6 @@
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(youku\\.com).*", "urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(youku\\.com).*",
"completeProvider": false, "completeProvider": false,
"rules": [ "rules": [
"spm",
"tpa" "tpa"
], ],
"referralMarketing": [], "referralMarketing": [],
@@ -788,7 +884,6 @@
"btsid", "btsid",
"algo_expid", "algo_expid",
"algo_pvid", "algo_pvid",
"spm",
"gps-id", "gps-id",
"scm[_a-zA-Z\\-]*", "scm[_a-zA-Z\\-]*",
"pvid" "pvid"
@@ -1025,14 +1120,15 @@
"referralMarketing": [], "referralMarketing": [],
"rawRules": [], "rawRules": [],
"exceptions": [], "exceptions": [],
"redirections": [], "redirections": [
".*u=([^&]*)"
],
"forceRedirection": false "forceRedirection": false
}, },
"lazada.com.my": { "lazada.com.my": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(lazada\\.com)(\\.my).*", "urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(lazada\\.com)(\\.my).*",
"completeProvider": false, "completeProvider": false,
"rules": [ "rules": [
"spm",
"ad_src", "ad_src",
"did", "did",
"pa", "pa",
@@ -1299,6 +1395,556 @@
"exceptions": [], "exceptions": [],
"redirections": [], "redirections": [],
"forceRedirection": false "forceRedirection": false
},
"diepresse.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(diepresse)(\\.com).*",
"completeProvider": false,
"rules": [
"from",
"xtor",
"xt_at"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"newsletter.lidl.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(newsletter\\.lidl)(\\.com).*",
"completeProvider": false,
"rules": [
"x"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"allegro.pl": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(allegro)(\\.pl).*",
"completeProvider": false,
"rules": [
"reco_id",
"sid"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"backcountry.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(backcountry)(\\.com).*",
"completeProvider": false,
"rules": [
"CMP_SKU",
"MER",
"mr:trackingCode",
"mr:device",
"mr:adType",
"iv_",
"CMP_ID",
"k_clickid",
"rmatt",
"INT_ID",
"ti",
"fl"
],
"referralMarketing": [
"mr:referralID"
],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},"meetup.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(meetup)(\\.com).*",
"completeProvider": false,
"rules": [
"rv",
"_xtd"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},"apple.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(apple)(\\.com).*",
"completeProvider": false,
"rules": [
"app",
"ign-itsc[a-zA-Z]+"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},"alabout.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(alabout)(\\.com).*",
"completeProvider": false,
"rules": [],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [
".*url=([^&]*)"
],
"forceRedirection": false
},"newyorker.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(newyorker)(\\.com).*",
"completeProvider": false,
"rules": [
"source",
"bxid",
"cndid",
"esrc",
"mbid"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
}, "gog.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(gog)(\\.com).*",
"completeProvider": false,
"rules": [
"track_click",
"link_id"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"tradedoubler.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(tradedoubler)(\\.com).*",
"completeProvider": false,
"rules": [],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [
".*url=([^&]*)",
".*_td_deeplink=([^&]*)"
],
"forceRedirection": false
},
"theguardian.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(theguardian)(\\.com).*",
"completeProvider": false,
"rules": [
"CMP"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"srvtrck.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(srvtrck)(\\.com).*",
"completeProvider": false,
"rules": [],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [
".*url=([^&]*)"
],
"forceRedirection": false
},
"mysku.ru": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(mysku)(\\.ru).*",
"completeProvider": false,
"rules": [],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [
".*r=([^&]*)"
],
"forceRedirection": false
},
"admitad.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(admitad)(\\.com).*",
"completeProvider": false,
"rules": [],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [
".*ulp=([^&]*)"
],
"forceRedirection": false
},
"taobao.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(taobao)(\\.com).*",
"completeProvider": false,
"rules": [
"price",
"sourceType",
"suid",
"ut_sk",
"un",
"share_crt_v",
"sp_tk",
"cpp",
"shareurl",
"short_name",
"app",
"scm[_a-zA-Z\\-]*",
"pvid",
"algo_expid",
"algo_pvid",
"ns",
"abbucket",
"ali_refid",
"ali_trackid",
"acm",
"utparam",
"pos",
"abtest",
"trackInfo",
"user_number_id",
"utkn",
"scene",
"mytmenu",
"turing_bucket",
"lygClk",
"impid",
"bftTag",
"bftRwd"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"tmall.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(tmall)(\\.com).*",
"completeProvider": false,
"rules": [
"price",
"sourceType",
"suid",
"ut_sk",
"un",
"share_crt_v",
"sp_tk",
"cpp",
"shareurl",
"short_name",
"app",
"scm[_a-zA-Z\\-]*",
"pvid",
"algo_expid",
"algo_pvid",
"ns",
"abbucket",
"ali_refid",
"ali_trackid",
"acm",
"utparam",
"pos",
"abtest",
"trackInfo",
"user_number_id",
"utkn",
"scene",
"mytmenu",
"turing_bucket",
"lygClk",
"impid",
"bftTag",
"bftRwd",
"activity_id"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"tb.cn": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(tb)(\\.cn).*",
"completeProvider": false,
"rules": [
"sm"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"bilibili.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(bilibili)(\\.com).*",
"completeProvider": false,
"rules": [
"callback",
"spm_id_from",
"from_source",
"from",
"seid"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [
".*(api\\.bilibili\\.com)\\/.*"
],
"redirections": [],
"forceRedirection": false
},
"marketscreener.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(marketscreener)(\\.com).*",
"completeProvider": false,
"rules": [
"type_recherche",
"mots",
"noredirect",
"RewriteLast",
"lien",
"aComposeInputSearch",
"type_recherche_forum",
"add_mots"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [
".*\\/search\\/.*\\?.*"
],
"redirections": [],
"forceRedirection": false
},
"marketscreener.com search": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(marketscreener)(\\.com).*\\/search\\/.*\\?.*",
"completeProvider": false,
"rules": [
"type_recherche",
"noredirect",
"RewriteLast",
"lien",
"aComposeInputSearch",
"type_recherche_forum"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"bestbuy.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(bestbuy)(\\.com).*",
"completeProvider": false,
"rules": [
"irclickid",
"irgwc",
"loc",
"acampID",
"mpid",
"intl"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"digidip.net": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(digidip)(\\.net).*",
"completeProvider": false,
"rules": [],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [
".*url=([^&]*)"
],
"forceRedirection": false
},
"tiktok.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(tiktok)(\\.com).*",
"completeProvider": false,
"rules": [
"u_code",
"preview_pb",
"_d",
"timestamp",
"user_id",
"share_app_name",
"share_iid",
"source"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"autoplus.fr": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(autoplus)(\\.fr).*",
"completeProvider": false,
"rules": [
"idprob",
"hash",
"sending_id",
"site_id",
"dr_tracker"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"bigfishgames.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(bigfishgames)(\\.com).*",
"completeProvider": false,
"rules": [
"pc",
"npc",
"npv[0-9]+",
"npi"
],
"referralMarketing": [],
"rawRules": [
"\\?pc$"
],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"dpbolvw.net": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(dpbolvw)(\\.net).*",
"completeProvider": false,
"rules": [],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [
".*url=([^&]*)"
],
"forceRedirection": false
},
"humblebundle.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(humblebundle)(\\.com).*",
"completeProvider": false,
"rules": [],
"referralMarketing": [
"partner"
],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"cafepedagogique.net": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(cafepedagogique)(\\.net).*",
"completeProvider": false,
"rules": [
"actId",
"actCampaignType",
"actSource"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"bloculus.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(bloculus)(\\.com).*",
"completeProvider": false,
"rules": [
"tl_[a-zA-Z_]+"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"mailpanion.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(mailpanion)(\\.com).*",
"completeProvider": false,
"rules": [],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [
".*destination=([^&]*)"
],
"forceRedirection": false
},
"signtr.website": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(signtr)(\\.website).*",
"completeProvider": false,
"rules": [],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [
".*redirect=([^&]*)"
],
"forceRedirection": false
},
"mailtrack.io": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(mailtrack)(\\.io).*",
"completeProvider": false,
"rules": [],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [
".*url=([^&]*)"
],
"forceRedirection": false
},
"zillow.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(zillow)(\\.com).*",
"completeProvider": false,
"rules": [
"rtoken"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"realtor.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(realtor)(\\.com).*",
"completeProvider": false,
"rules": [
"ex",
"identityID",
"MID",
"RID"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
},
"redfin.com": {
"urlPattern": "(https:\\/\\/|http:\\/\\/)([a-zA-Z0-9-.]*\\.)?(redfin)(\\.com).*",
"completeProvider": false,
"rules": [
"riftinfo"
],
"referralMarketing": [],
"rawRules": [],
"exceptions": [],
"redirections": [],
"forceRedirection": false
} }
} }
} }

3
external_js/pickr.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -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);

View File

@@ -77,8 +77,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!-- Optional JavaScript --> <!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS --> <!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="../browser-polyfill.js"></script> <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/cleaning_tool.js"></script>
<script src="../core_js/write_version.js"></script> <script src="../core_js/write_version.js"></script>
</body> </body>

View File

@@ -113,9 +113,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!-- jQuery first, then Popper.js, then Bootstrap JS --> <!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="../browser-polyfill.js"></script> <script src="../browser-polyfill.js"></script>
<script src="../external_js/jquery-3.4.1.min.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/dataTables.min.js"></script>
<script src="../external_js/fontawesome/all.min.js"></script>
<script src="../core_js/log.js"></script> <script src="../core_js/log.js"></script>
<script src="../core_js/write_version.js"></script> <script src="../core_js/write_version.js"></script>
</body> </body>

View File

@@ -158,8 +158,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!-- Optional JavaScript --> <!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS --> <!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script type="application/javascript" src="../browser-polyfill.js"></script> <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="../external_js/fontawesome/all.min.js"></script>
<script src="../core_js/popup.js"></script> <script src="../core_js/popup.js"></script>
<script src="../core_js/write_version.js"></script> <script src="../core_js/write_version.js"></script>

View File

@@ -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" href="../css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../css/switchButtons.css"> <link rel="stylesheet" type="text/css" href="../css/switchButtons.css">
<link rel="stylesheet" type="text/css" href="../css/core.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> <style>
td { td {
word-wrap: break-word; word-wrap: break-word;
@@ -92,10 +92,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<br /> <br />
<label id="badged_color_label"></label><br /> <label id="badged_color_label"></label><br />
<div id="badged-color-picker" class="input-group"> <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> </div>
<br /> <br />
<br /> <br />
@@ -116,7 +112,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<br /> <br />
<p> <p>
<label id="logLimit_label"></label><br /> <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> </p>
<br /> <br />
<p> <p>
@@ -161,6 +157,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<span class="slider round"></span> <span class="slider round"></span>
</label> </label>
</p> </p>
<p>
<label id="eTag_filtering_enabled" style="font-weight: bold;"></label><br />
<label class="switch">
<input type="checkbox" id="eTagFiltering">
<span class="slider round"></span>
</label>
</p>
<br /> <br />
<p class="text-center"> <p class="text-center">
<button type="button" id="save_settings_btn" <button type="button" id="save_settings_btn"
@@ -171,11 +174,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!-- Optional JavaScript --> <!-- Optional JavaScript -->
<script src="../browser-polyfill.js"></script> <script src="../browser-polyfill.js"></script>
<script src="../external_js/jquery-3.4.1.min.js"></script> <script src="../external_js/pickr.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="../core_js/settings.js"></script> <script src="../core_js/settings.js"></script>
<script src="../core_js/write_version.js"></script> <script src="../core_js/write_version.js"></script>
</body> </body>

View File

@@ -69,8 +69,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!-- Optional JavaScript --> <!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS --> <!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="../browser-polyfill.js"></script> <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/siteBlockedAlert.js"></script>
<script src="../core_js/write_version.js"></script> <script src="../core_js/write_version.js"></script>
</body> </body>

View File

@@ -1,16 +1,11 @@
{ {
"manifest_version": 2, "manifest_version": 2,
"name": "ClearURLs", "name": "ClearURLs",
"version": "1.15.0", "version": "1.18.0",
"author": "Kevin Röbert", "author": "Kevin Röbert",
"description": "Remove tracking elements from URLs.", "description": "__MSG_extension_description__",
"homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls", "homepage_url": "https://gitlab.com/KevinRoebert/ClearUrls",
"default_locale": "en", "default_locale": "en",
"applications": {
"gecko": {
"id": "{74145f27-f039-47ce-a470-a662b129930a}"
}
},
"icons": { "icons": {
"16": "img/clearurls_16x16.png", "16": "img/clearurls_16x16.png",
"19": "img/clearurls_19x19.png", "19": "img/clearurls_19x19.png",
@@ -43,7 +38,6 @@
"default_popup": "html/popup.html" "default_popup": "html/popup.html"
}, },
"permissions": [ "permissions": [
"*://*/*",
"<all_urls>", "<all_urls>",
"webRequest", "webRequest",
"webRequestBlocking", "webRequestBlocking",
@@ -58,28 +52,20 @@
"background": { "background": {
"scripts": [ "scripts": [
"browser-polyfill.js", "browser-polyfill.js",
"external_js/jquery-3.4.1.min.js",
"external_js/sha256.jquery.js",
"core_js/message_handler.js", "core_js/message_handler.js",
"external_js/ip-range-check.js", "external_js/ip-range-check.js",
"core_js/tools.js", "core_js/tools.js",
"core_js/badgedHandler.js",
"core_js/pureCleaning.js", "core_js/pureCleaning.js",
"core_js/context_menu.js", "core_js/context_menu.js",
"core_js/historyListener.js", "core_js/historyListener.js",
"clearurls.js", "clearurls.js",
"core_js/storage.js", "core_js/storage.js",
"core_js/watchdog.js" "core_js/watchdog.js",
"core_js/eTagFilter.js"
] ]
}, },
"content_scripts": [ "content_scripts": [
{
"matches": [
"<all_urls>"
],
"js": [
"browser-polyfill.js"
]
},
{ {
"all_frames": true, "all_frames": true,
"matches": [ "matches": [

9473
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -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"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

BIN
promotion/MEA-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

290
promotion/MEA-button.svg Normal file
View File

@@ -0,0 +1,290 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="173mm"
height="62mm"
viewBox="0 0 173 62"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="MEA-button.svg">
<defs
id="defs2">
<style
id="style4487">.cls-1{fill:url(#linear-gradient);}.cls-2{opacity:0.35;fill:url(#radial-gradient);}.cls-2,.cls-4{isolation:isolate;}.cls-3{fill:url(#linear-gradient-2);}.cls-4{opacity:0.41;fill:url(#radial-gradient-2);}.cls-5{fill:url(#radial-gradient-3);}.cls-6{fill:url(#radial-gradient-4);}</style>
<linearGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,-1,0,266)"
y2="84.03"
x2="241.67"
y1="84.03"
x1="63.33"
id="linear-gradient">
<stop
id="stop4489"
stop-color="#0c59a4"
offset="0" />
<stop
id="stop4491"
stop-color="#114a8b"
offset="1" />
</linearGradient>
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,-0.95,0,248.84)"
r="95.38"
cy="68.91"
cx="161.83"
id="radial-gradient">
<stop
id="stop4494"
stop-opacity="0"
offset="0.72" />
<stop
id="stop4496"
stop-opacity="0.53"
offset="0.95" />
<stop
id="stop4498"
offset="1" />
</radialGradient>
<linearGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,-1,0,266)"
y2="40.06"
x2="45.96"
y1="161.39"
x1="157.35"
id="linear-gradient-2">
<stop
id="stop4501"
stop-color="#1b9de2"
offset="0" />
<stop
id="stop4503"
stop-color="#1595df"
offset="0.16" />
<stop
id="stop4505"
stop-color="#0680d7"
offset="0.67" />
<stop
id="stop4507"
stop-color="#0078d4"
offset="1" />
</linearGradient>
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.15,-0.99,-0.8,-0.12,176.64,-125.4)"
r="143.24"
cy="62.99"
cx="-340.29"
id="radial-gradient-2">
<stop
id="stop4510"
stop-opacity="0"
offset="0.76" />
<stop
id="stop4512"
stop-opacity="0.5"
offset="0.95" />
<stop
id="stop4514"
offset="1" />
</radialGradient>
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.04,1,2.13,0.08,-1179.54,-106.69)"
r="202.43"
cy="570.21"
cx="113.37"
id="radial-gradient-3">
<stop
id="stop4517"
stop-color="#35c1f1"
offset="0" />
<stop
id="stop4519"
stop-color="#34c1ed"
offset="0.11" />
<stop
id="stop4521"
stop-color="#2fc2df"
offset="0.23" />
<stop
id="stop4523"
stop-color="#2bc3d2"
offset="0.31" />
<stop
id="stop4525"
stop-color="#36c752"
offset="0.67" />
</radialGradient>
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.28,0.96,0.78,-0.23,-303.76,-148.5)"
r="97.34"
cy="567.97"
cx="376.52"
id="radial-gradient-4">
<stop
id="stop4528"
stop-color="#66eb6e"
offset="0" />
<stop
id="stop4530"
stop-opacity="0"
stop-color="#66eb6e"
offset="1" />
</radialGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="680.12936"
inkscape:cy="17.153298"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="2560"
inkscape:window-height="1377"
inkscape:window-x="-8"
inkscape:window-y="32"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-235)">
<rect
style="opacity:1;fill:#20989a;fill-opacity:1;stroke:none;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill"
id="rect4485"
width="172"
height="60"
x="0.75595236"
y="236.24405"
ry="9.0862904"
inkscape:export-filename="F:\Programmieren\Git\Firefox Addons\ClearUrls\promotion\MEA-button.png"
inkscape:export-xdpi="25.4"
inkscape:export-ydpi="25.4" />
<g
id="g4586"
transform="matrix(0.18042983,0,0,0.18191038,10.112503,242.71284)"
inkscape:export-filename="F:\Programmieren\Git\Firefox Addons\ClearUrls\promotion\MEA-button.png"
inkscape:export-xdpi="25.4"
inkscape:export-ydpi="25.4">
<path
id="path4537"
transform="translate(-4.63,-4.92)"
d="m 235.68,195.46 a 93.73,93.73 0 0 1 -10.54,4.71 101.87,101.87 0 0 1 -35.9,6.46 c -47.32,0 -88.54,-32.55 -88.54,-74.32 A 31.48,31.48 0 0 1 117.13,105 c -42.8,1.8 -53.8,46.4 -53.8,72.53 0,73.88 68.09,81.37 82.76,81.37 7.91,0 19.84,-2.3 27,-4.56 l 1.31,-0.44 a 128.34,128.34 0 0 0 66.6,-52.8 4,4 0 0 0 -5.32,-5.64 z"
class="cls-1"
inkscape:connector-curvature="0"
style="fill:url(#linear-gradient)" />
<path
id="path4539"
transform="translate(-4.63,-4.92)"
d="m 235.68,195.46 a 93.73,93.73 0 0 1 -10.54,4.71 101.87,101.87 0 0 1 -35.9,6.46 c -47.32,0 -88.54,-32.55 -88.54,-74.32 A 31.48,31.48 0 0 1 117.13,105 c -42.8,1.8 -53.8,46.4 -53.8,72.53 0,73.88 68.09,81.37 82.76,81.37 7.91,0 19.84,-2.3 27,-4.56 l 1.31,-0.44 a 128.34,128.34 0 0 0 66.6,-52.8 4,4 0 0 0 -5.32,-5.64 z"
class="cls-2"
inkscape:connector-curvature="0"
style="opacity:0.35;isolation:isolate;fill:url(#radial-gradient)" />
<path
id="path4541"
transform="translate(-4.63,-4.92)"
d="M 110.34,246.34 A 79.2,79.2 0 0 1 87.6,225 80.72,80.72 0 0 1 117.13,105 c 3.12,-1.47 8.45,-4.13 15.54,-4 a 32.35,32.35 0 0 1 25.69,13 31.88,31.88 0 0 1 6.36,18.66 c 0,-0.21 24.46,-79.6 -80,-79.6 -43.9,0 -80,41.66 -80,78.21 a 130.15,130.15 0 0 0 12.11,56 128,128 0 0 0 156.38,67.11 75.55,75.55 0 0 1 -62.78,-8 z"
class="cls-3"
inkscape:connector-curvature="0"
style="fill:url(#linear-gradient-2)" />
<path
id="path4543"
transform="translate(-4.63,-4.92)"
d="M 110.34,246.34 A 79.2,79.2 0 0 1 87.6,225 80.72,80.72 0 0 1 117.13,105 c 3.12,-1.47 8.45,-4.13 15.54,-4 a 32.35,32.35 0 0 1 25.69,13 31.88,31.88 0 0 1 6.36,18.66 c 0,-0.21 24.46,-79.6 -80,-79.6 -43.9,0 -80,41.66 -80,78.21 a 130.15,130.15 0 0 0 12.11,56 128,128 0 0 0 156.38,67.11 75.55,75.55 0 0 1 -62.78,-8 z"
class="cls-4"
inkscape:connector-curvature="0"
style="opacity:0.41000001;isolation:isolate;fill:url(#radial-gradient-2)" />
<path
id="path4545"
transform="translate(-4.63,-4.92)"
d="m 156.94,153.78 c -0.81,1.05 -3.3,2.5 -3.3,5.66 0,2.61 1.7,5.12 4.72,7.23 14.38,10 41.49,8.68 41.56,8.68 a 59.56,59.56 0 0 0 30.27,-8.35 61.38,61.38 0 0 0 30.43,-52.88 c 0.26,-22.41 -8,-37.31 -11.34,-43.91 C 228.09,28.76 182.35,4.92 132.61,4.92 a 128,128 0 0 0 -128,126.2 c 0.48,-36.54 36.8,-66.05 80,-66.05 3.5,0 23.46,0.34 42,10.07 16.34,8.58 24.9,18.94 30.85,29.21 6.18,10.67 7.28,24.15 7.28,29.52 0,5.37 -2.74,13.33 -7.8,19.91 z"
class="cls-5"
inkscape:connector-curvature="0"
style="fill:url(#radial-gradient-3)" />
<path
id="path4547"
transform="translate(-4.63,-4.92)"
d="m 156.94,153.78 c -0.81,1.05 -3.3,2.5 -3.3,5.66 0,2.61 1.7,5.12 4.72,7.23 14.38,10 41.49,8.68 41.56,8.68 a 59.56,59.56 0 0 0 30.27,-8.35 61.38,61.38 0 0 0 30.43,-52.88 c 0.26,-22.41 -8,-37.31 -11.34,-43.91 C 228.09,28.76 182.35,4.92 132.61,4.92 a 128,128 0 0 0 -128,126.2 c 0.48,-36.54 36.8,-66.05 80,-66.05 3.5,0 23.46,0.34 42,10.07 16.34,8.58 24.9,18.94 30.85,29.21 6.18,10.67 7.28,24.15 7.28,29.52 0,5.37 -2.74,13.33 -7.8,19.91 z"
class="cls-6"
inkscape:connector-curvature="0"
style="fill:url(#radial-gradient-4)" />
</g>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:14.11111069px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
x="63.122021"
y="270.91965"
id="text4594"
inkscape:export-filename="F:\Programmieren\Git\Firefox Addons\ClearUrls\promotion\MEA-button.png"
inkscape:export-xdpi="25.4"
inkscape:export-ydpi="25.4"><tspan
sodipodi:role="line"
id="tspan4592"
x="63.122021"
y="283.79364"
style="font-size:14.11111069px;fill:#ffffff;stroke-width:0.26458332" /></text>
<g
id="g4607"
transform="translate(67.73337,2.7074)"
inkscape:export-filename="F:\Programmieren\Git\Firefox Addons\ClearUrls\promotion\MEA-button.png"
inkscape:export-xdpi="25.4"
inkscape:export-ydpi="25.4">
<text
id="text4590"
y="260.3363"
x="-0.79237193"
style="font-style:normal;font-weight:normal;font-size:14.11111069px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="font-size:14.11111069px;fill:#ffffff;stroke-width:0.26458332"
y="260.3363"
x="-0.79237193"
id="tspan4588"
sodipodi:role="line">GET THE</tspan></text>
<text
id="text4598"
y="276.43811"
x="-0.23151043"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:16.93333244px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ffffff;stroke-width:0.26458332"
y="276.43811"
x="-0.23151043"
id="tspan4596"
sodipodi:role="line"><tspan
id="tspan4600"
style="font-size:19.75555611px">ADD</tspan>-ON</tspan></text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

BIN
promotion/download-128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

View File

@@ -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);
}
?>