mirror of
https://github.com/Synzvato/decentraleyes.git
synced 2026-01-16 11:08:26 -05:00
Compare commits
44 Commits
v2.0.3
...
experiment
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab43484f30 | ||
|
|
2a3e508441 | ||
|
|
1a7f41ee0a | ||
|
|
e6a5de1683 | ||
|
|
4c8262599e | ||
|
|
53c8dd2a1c | ||
|
|
b5d09327b8 | ||
|
|
9fe8cfb6d3 | ||
|
|
0072d3bf59 | ||
|
|
e9ccd3e290 | ||
|
|
52c9b40c59 | ||
|
|
50428fcdc6 | ||
|
|
e1b80f73ae | ||
|
|
81f60022e8 | ||
|
|
00998af264 | ||
|
|
7f80465972 | ||
|
|
90c1374c8d | ||
|
|
fd59656bb3 | ||
|
|
2e1ff77b1c | ||
|
|
318058e920 | ||
|
|
cffd907f88 | ||
|
|
b4a5aaf9d2 | ||
|
|
50ee191e22 | ||
|
|
17f4c986fd | ||
|
|
cc8898a386 | ||
|
|
c71216522f | ||
|
|
d036d73ae2 | ||
|
|
4ded48a07f | ||
|
|
5ce6d5f819 | ||
|
|
0e1b8bf8af | ||
|
|
bde8e6357b | ||
|
|
51c076e984 | ||
|
|
037ad24370 | ||
|
|
746c5694fb | ||
|
|
e7e56deca7 | ||
|
|
db4b4986de | ||
|
|
bb31683bba | ||
|
|
3e8b347d6b | ||
|
|
82750cd381 | ||
|
|
c5b9eda31a | ||
|
|
00f8bcbac4 | ||
|
|
826cfd9f72 | ||
|
|
b7392bca64 | ||
|
|
3fc2648990 |
15
.eslintrc
15
.eslintrc
@@ -4,21 +4,28 @@
|
||||
"es6": true,
|
||||
"webextensions": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:no-unsanitized/DOM"
|
||||
],
|
||||
"globals": {
|
||||
"Address": true,
|
||||
"fileGuard": true,
|
||||
"files": true,
|
||||
"Header": true,
|
||||
"helpers": true,
|
||||
"interceptor": true,
|
||||
"mappings": true,
|
||||
"MessageResponse": true,
|
||||
"requestAnalyzer": true,
|
||||
"requestSanitizer": true,
|
||||
"Resource": true,
|
||||
"resources": true,
|
||||
"Setting": true,
|
||||
"shorthands": true,
|
||||
"stateManager": true,
|
||||
"WebRequest": true,
|
||||
"WebRequestType": true,
|
||||
"Whitelist": true,
|
||||
"wrappers": true
|
||||
},
|
||||
@@ -27,12 +34,16 @@
|
||||
"core/constants.js",
|
||||
"core/files.js",
|
||||
"core/mappings.js",
|
||||
"core/resources.js"
|
||||
"core/resources.js",
|
||||
"core/shorthands.js"
|
||||
],
|
||||
"rules": {
|
||||
"no-unused-vars": "off"
|
||||
}
|
||||
},
|
||||
"plugins": [
|
||||
"no-unsanitized"
|
||||
],
|
||||
"rules": {
|
||||
"array-bracket-newline": "error",
|
||||
"array-bracket-spacing": "error",
|
||||
|
||||
35
README.md
35
README.md
@@ -1,30 +1,35 @@
|
||||
Decentraleyes
|
||||
Decentraleyes (Experimental)
|
||||
=============
|
||||
|
||||
A [web browser extension](https://decentraleyes.org) that emulates Content Delivery Networks to improve your online privacy. It intercepts traffic, finds supported resources locally, and injects them into the environment. All of this happens automatically, so no prior configuration is required. Feel free to use the following [testing utility](https://decentraleyes.org/test) to find out if you are properly protected.
|
||||
A reimplementation of current features of Decentraleyes. This project will help bring Decentraleyes to WebExtensions (Firefox 57 and higher), as well as Chromium-based browsers, Opera, and possibly even Edge.
|
||||
|
||||
> **Note:** Decentraleyes is no silver bullet, but it does prevent a lot of websites from making you send these kinds of requests. Ultimately, you can make Decentraleyes block requests for any missing CDN resources, too.
|
||||
## Changelog
|
||||
|
||||
## Contributing Code
|
||||
Below is a list of all notable changes made to the reimplementation project to date. This includes, but is most certainly not limited to, records of changes such as bug fixes, and new, removed, and updated features.
|
||||
|
||||
Suggestions in the form of **Issues**, and contributions in the form of **Pull Requests**, are highly welcome. You can also use the public contact details and PGP key on the extension's [contact page](https://decentraleyes.org/contact) to get in touch.
|
||||
### v1.3.7.5
|
||||
|
||||
#### Prerequisites
|
||||
* Fix Subresource Integrity (SRI) validation issues.
|
||||
* Implement context stripping for allowed CDN requests.
|
||||
* Implement request filters to improve performance.
|
||||
|
||||
* Mozilla Firefox 56 *(or higher)*.
|
||||
### v1.3.7.4
|
||||
|
||||
> **Note:** If you want to contribute to the Firefox legacy extension, please check out the ```legacy``` branch. If you are looking for the Chromium-compatible codebase, please see the ```experimental``` branch.
|
||||
* Fix rare injection counter issue.
|
||||
|
||||
#### Running the Code
|
||||
### v1.3.7.3
|
||||
|
||||
Please read this [short guide](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Your_first_WebExtension#Trying_it_out) for information on how to run this extension from source.
|
||||
* Improve injection state management _(requires a new permission)_.
|
||||
* Implement injection overview and icon badge.
|
||||
|
||||
> **Important:** All commits since 26 October 2016 are signed with GPG. It's likely best to ignore unsigned commits, unless you really know what you're doing. Please send an email if you have any questions or security concerns.
|
||||
### v1.3.7.2
|
||||
|
||||
## Submitting Translations
|
||||
* Fix popup icon display issue.
|
||||
|
||||
Do you master a non-supported language? Please help out by translating this add-on on [Crowdin](https://crowdin.com/project/decentraleyes).
|
||||
### v1.3.7.1
|
||||
|
||||
## License
|
||||
* Improve compatibility with HTTPS Everywhere.
|
||||
|
||||
[MPL-2.0](https://www.mozilla.org/MPL/2.0).
|
||||
### v1.3.7
|
||||
|
||||
* Initial release.
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
{
|
||||
"extensionDescription":{
|
||||
"message":"Decentraleyes protektas vin kontraŭ sekvado per senkosta, centra enhavoprovizado.",
|
||||
"description":"Extension description."
|
||||
"extensionDescription": {
|
||||
"message": "Decentraleyes protektas vin kontraŭ sekvado per senkosta, centra enhavoprovizado.",
|
||||
"description": "Extension description."
|
||||
},
|
||||
"disableProtectionTitle":{
|
||||
"message":"Malaktivigi protekton por tiu ĉi retejo",
|
||||
"description":"Disable protection title."
|
||||
"disableProtectionTitle": {
|
||||
"message": "Malaktivigi protekton por tiu ĉi retejo",
|
||||
"description": "Disable protection title."
|
||||
},
|
||||
"enableProtectionTitle":{
|
||||
"message":"Aktivigi protekton",
|
||||
"description":"Enable protection title."
|
||||
"enableProtectionTitle": {
|
||||
"message": "Aktivigi protekton",
|
||||
"description": "Enable protection title."
|
||||
},
|
||||
"amountInjectedTitle":{
|
||||
"message":"Nombrilo de loke enmetiaj risurcoj",
|
||||
"description":"Amount injected title."
|
||||
"amountInjectedTitle": {
|
||||
"message": "Nombrilo de loke enmetiaj risurcoj",
|
||||
"description": "Amount injected title."
|
||||
},
|
||||
"amountInjectedDescription":{
|
||||
"message":"Kvanto de lokaj CDN-risurcoj enmetitaj ekde instaliĝo.",
|
||||
"description":"Amount injected description."
|
||||
"amountInjectedDescription": {
|
||||
"message": "Kvanto de lokaj CDN-risurcoj enmetitaj ekde instaliĝo.",
|
||||
"description": "Amount injected description."
|
||||
},
|
||||
"optionsTitle":{
|
||||
"message":"Elektebloj",
|
||||
"description":"Options title."
|
||||
"optionsTitle": {
|
||||
"message": "Elektebloj",
|
||||
"description": "Options title."
|
||||
},
|
||||
"showIconBadgeTitle":{
|
||||
"message":"Display injection counts on icon",
|
||||
"description":"Show icon badge title."
|
||||
"showIconBadgeTitle": {
|
||||
"message": "Montri nombrilon sur piktogramo",
|
||||
"description": "Show icon badge title."
|
||||
},
|
||||
"showIconBadgeDescription":{
|
||||
"message":"Show the number of injected resources on the extension icon.",
|
||||
"description":"Show icon badge description."
|
||||
"showIconBadgeDescription": {
|
||||
"message": "Montri nombron da enmetataj risurcoj sur la aldonaĵa piktogramo.",
|
||||
"description": "Show icon badge description."
|
||||
},
|
||||
"blockMissingTitle":{
|
||||
"message":"Bloki petojn por mankaj risurcoj",
|
||||
"description":"Block requests for missing resources title."
|
||||
"blockMissingTitle": {
|
||||
"message": "Bloki petojn por mankaj risurcoj",
|
||||
"description": "Block requests for missing resources title."
|
||||
},
|
||||
"blockMissingDescription":{
|
||||
"message":"Bloki petojn interkaptitajn se la petitan risurcon ne loke haveblas.",
|
||||
"description":"Block requests for missing resources description."
|
||||
"blockMissingDescription": {
|
||||
"message": "Bloki petojn interkaptitajn se la petitan risurcon ne loke haveblas.",
|
||||
"description": "Block requests for missing resources description."
|
||||
},
|
||||
"disablePrefetchTitle":{
|
||||
"message":"Disable link prefetching",
|
||||
"description":"Disable prefetch title."
|
||||
"disablePrefetchTitle": {
|
||||
"message": "Ne antaŭlegi ligilojn",
|
||||
"description": "Disable prefetch title."
|
||||
},
|
||||
"disablePrefetchDescription":{
|
||||
"message":"Prevent disallowed requests from leaking out to delivery networks.",
|
||||
"description":"Disable prefetch description."
|
||||
"disablePrefetchDescription": {
|
||||
"message": "Bloki malpermesatajn petojn por preventi tralasojn al enhav-proviz-retoj.",
|
||||
"description": "Disable prefetch description."
|
||||
},
|
||||
"stripMetadataTitle":{
|
||||
"message":"Strip metadata from allowed requests",
|
||||
"description":"Strip metadata title."
|
||||
"stripMetadataTitle": {
|
||||
"message": "Forigi metadatumojn el permesataj petoj",
|
||||
"description": "Strip metadata title."
|
||||
},
|
||||
"stripMetadataDescription":{
|
||||
"message":"Erase sensitive data from allowed CDN requests for improved privacy.",
|
||||
"description":"Strip metadata description."
|
||||
"stripMetadataDescription": {
|
||||
"message": "Forviŝi delikatajn datumojn el permesataj CDN-petoj por plibonigi privatecon.",
|
||||
"description": "Strip metadata description."
|
||||
},
|
||||
"whitelistedDomainsTitle":{
|
||||
"message":"Neinspektendaj domajnoj",
|
||||
"description":"Whitelisted domains title."
|
||||
"whitelistedDomainsTitle": {
|
||||
"message": "Neinspektendaj domajnoj",
|
||||
"description": "Whitelisted domains title."
|
||||
},
|
||||
"whitelistedDomainsDescription":{
|
||||
"message":"Entajpu demajnojn, kiujn Decentraleyes ne devas inspekti. Disigu domajnojn per punktokomoj (;).",
|
||||
"description":"Whitelisted domains description."
|
||||
"whitelistedDomainsDescription": {
|
||||
"message": "Entajpu demajnojn, kiujn Decentraleyes ne devas inspekti. Disigu domajnojn per punktokomoj (;).",
|
||||
"description": "Whitelisted domains description."
|
||||
},
|
||||
"advancedLabel":{
|
||||
"message":"Spertula",
|
||||
"description":"Advanced label."
|
||||
"advancedLabel": {
|
||||
"message": "Spertula",
|
||||
"description": "Advanced label."
|
||||
}
|
||||
}
|
||||
@@ -1,70 +1,70 @@
|
||||
{
|
||||
"extensionDescription":{
|
||||
"message":"Protège du pistage lié aux diffuseurs de contenus \"gratuits\", centralisés.",
|
||||
"description":"Extension description."
|
||||
"extensionDescription": {
|
||||
"message": "Protège du pistage lié aux diffuseurs de contenus \"gratuits\", centralisés.",
|
||||
"description": "Extension description."
|
||||
},
|
||||
"disableProtectionTitle":{
|
||||
"message":"Désactiver la protection pour ce site",
|
||||
"description":"Disable protection title."
|
||||
"disableProtectionTitle": {
|
||||
"message": "Désactiver la protection pour ce site",
|
||||
"description": "Disable protection title."
|
||||
},
|
||||
"enableProtectionTitle":{
|
||||
"message":"Activer la protection",
|
||||
"description":"Enable protection title."
|
||||
"enableProtectionTitle": {
|
||||
"message": "Activer la protection",
|
||||
"description": "Enable protection title."
|
||||
},
|
||||
"amountInjectedTitle":{
|
||||
"message":"Compteur de ressources injectées localement",
|
||||
"description":"Amount injected title."
|
||||
"amountInjectedTitle": {
|
||||
"message": "Compteur de ressources injectées localement",
|
||||
"description": "Amount injected title."
|
||||
},
|
||||
"amountInjectedDescription":{
|
||||
"message":"Quantité de ressource CDN injectées localement depuis l'installation.",
|
||||
"description":"Amount injected description."
|
||||
"amountInjectedDescription": {
|
||||
"message": "Quantité de ressources CDN injectées localement depuis l'installation.",
|
||||
"description": "Amount injected description."
|
||||
},
|
||||
"optionsTitle":{
|
||||
"message":"Options",
|
||||
"description":"Options title."
|
||||
"optionsTitle": {
|
||||
"message": "Options",
|
||||
"description": "Options title."
|
||||
},
|
||||
"showIconBadgeTitle":{
|
||||
"message":"Affichage du nombre d'injections sur l'icône",
|
||||
"description":"Show icon badge title."
|
||||
"showIconBadgeTitle": {
|
||||
"message": "Afficher le nombre d’injections sur l’icône",
|
||||
"description": "Show icon badge title."
|
||||
},
|
||||
"showIconBadgeDescription":{
|
||||
"message":"Affiche le nombre de ressources injectées sur l'icône d'extension.",
|
||||
"description":"Show icon badge description."
|
||||
"showIconBadgeDescription": {
|
||||
"message": "Affiche le nombre de ressources injectées sur l'icône d'extension.",
|
||||
"description": "Show icon badge description."
|
||||
},
|
||||
"blockMissingTitle":{
|
||||
"message":"Bloquer les requêtes de ressources manquantes",
|
||||
"description":"Block requests for missing resources title."
|
||||
"blockMissingTitle": {
|
||||
"message": "Bloquer les requêtes de ressources manquantes",
|
||||
"description": "Block requests for missing resources title."
|
||||
},
|
||||
"blockMissingDescription":{
|
||||
"message":"Annule la requête interceptée si la ressource requise n'est pas disponible localement.",
|
||||
"description":"Block requests for missing resources description."
|
||||
"blockMissingDescription": {
|
||||
"message": "Annule la requête interceptée si la ressource requise n'est pas disponible localement.",
|
||||
"description": "Block requests for missing resources description."
|
||||
},
|
||||
"disablePrefetchTitle":{
|
||||
"message":"Désactiver le préchargement de lien",
|
||||
"description":"Disable prefetch title."
|
||||
"disablePrefetchTitle": {
|
||||
"message": "Désactiver le préchargement de lien",
|
||||
"description": "Disable prefetch title."
|
||||
},
|
||||
"disablePrefetchDescription":{
|
||||
"message":"Empêcher que des requêtes non autorisées fuit du réseaux de distribution.",
|
||||
"description":"Disable prefetch description."
|
||||
"disablePrefetchDescription": {
|
||||
"message": "Empêche que des requêtes non autorisées fuient vers les réseaux de distribution.",
|
||||
"description": "Disable prefetch description."
|
||||
},
|
||||
"stripMetadataTitle":{
|
||||
"message":"Découper les métadonnées des requêtes autorisées",
|
||||
"description":"Strip metadata title."
|
||||
"stripMetadataTitle": {
|
||||
"message": "Découper les métadonnées des requêtes autorisées",
|
||||
"description": "Strip metadata title."
|
||||
},
|
||||
"stripMetadataDescription":{
|
||||
"message":"Efface les données sensibles des demandes de CDN autorisées pour améliorer la confidentialité.",
|
||||
"description":"Strip metadata description."
|
||||
"stripMetadataDescription": {
|
||||
"message": "Efface les données sensibles des demandes de CDN autorisées pour améliorer la confidentialité.",
|
||||
"description": "Strip metadata description."
|
||||
},
|
||||
"whitelistedDomainsTitle":{
|
||||
"message":"Exclure les domaines des inspections",
|
||||
"description":"Whitelisted domains title."
|
||||
"whitelistedDomainsTitle": {
|
||||
"message": "Exclure les domaines des inspections",
|
||||
"description": "Whitelisted domains title."
|
||||
},
|
||||
"whitelistedDomainsDescription":{
|
||||
"message":"Entrez des domaines pour la liste blanche. Séparez les entrées multiples par des points-virgules (;).",
|
||||
"description":"Whitelisted domains description."
|
||||
"whitelistedDomainsDescription": {
|
||||
"message": "Entrez des domaines pour la liste blanche. Séparez les entrées multiples par des points-virgules (;).",
|
||||
"description": "Whitelisted domains description."
|
||||
},
|
||||
"advancedLabel":{
|
||||
"message":"Avancé",
|
||||
"description":"Advanced label."
|
||||
"advancedLabel": {
|
||||
"message": "Avancé",
|
||||
"description": "Advanced label."
|
||||
}
|
||||
}
|
||||
@@ -1,70 +1,70 @@
|
||||
{
|
||||
"extensionDescription":{
|
||||
"message":"Verndar þig gegn eftirliti frá \"ókeypis\" miðlægum efnisveitum.",
|
||||
"description":"Extension description."
|
||||
"extensionDescription": {
|
||||
"message": "Verndar þig gegn eftirliti frá \"ókeypis\" miðlægum efnisveitum.",
|
||||
"description": "Extension description."
|
||||
},
|
||||
"disableProtectionTitle":{
|
||||
"message":"Slökkva á vörn fyrir þetta vefsvæði",
|
||||
"description":"Disable protection title."
|
||||
"disableProtectionTitle": {
|
||||
"message": "Slökkva á vörn fyrir þetta vefsvæði",
|
||||
"description": "Disable protection title."
|
||||
},
|
||||
"enableProtectionTitle":{
|
||||
"message":"Virkja vernd",
|
||||
"description":"Enable protection title."
|
||||
"enableProtectionTitle": {
|
||||
"message": "Virkja vernd",
|
||||
"description": "Enable protection title."
|
||||
},
|
||||
"amountInjectedTitle":{
|
||||
"message":"Fjöldi staðvært inspýttra tilfanga",
|
||||
"description":"Amount injected title."
|
||||
"amountInjectedTitle": {
|
||||
"message": "Fjöldi staðvært inspýttra tilfanga",
|
||||
"description": "Amount injected title."
|
||||
},
|
||||
"amountInjectedDescription":{
|
||||
"message":"Fjöldi tilfanga frá miðlægum efnisveitum sem skipt hefur verið út síðan viðbótin var sett upp.",
|
||||
"description":"Amount injected description."
|
||||
"amountInjectedDescription": {
|
||||
"message": "Fjöldi tilfanga frá miðlægum efnisveitum sem skipt hefur verið út síðan viðbótin var sett upp.",
|
||||
"description": "Amount injected description."
|
||||
},
|
||||
"optionsTitle":{
|
||||
"message":"Valkostir",
|
||||
"description":"Options title."
|
||||
"optionsTitle": {
|
||||
"message": "Valkostir",
|
||||
"description": "Options title."
|
||||
},
|
||||
"showIconBadgeTitle":{
|
||||
"message":"Birta fjölda innspýtinga á táknmynd",
|
||||
"description":"Show icon badge title."
|
||||
"showIconBadgeTitle": {
|
||||
"message": "Birta fjölda innspýtinga á táknmynd",
|
||||
"description": "Show icon badge title."
|
||||
},
|
||||
"showIconBadgeDescription":{
|
||||
"message":"Sýnir merki fyrir fjölda innspýttra tilfanga á táknmynd viðbótarinnar.",
|
||||
"description":"Show icon badge description."
|
||||
"showIconBadgeDescription": {
|
||||
"message": "Sýnir merki fyrir fjölda innspýttra tilfanga á táknmynd viðbótarinnar.",
|
||||
"description": "Show icon badge description."
|
||||
},
|
||||
"blockMissingTitle":{
|
||||
"message":"Loka á beiðnir vegna tilfanga sem vantar",
|
||||
"description":"Block requests for missing resources title."
|
||||
"blockMissingTitle": {
|
||||
"message": "Loka á beiðnir vegna tilfanga sem vantar",
|
||||
"description": "Block requests for missing resources title."
|
||||
},
|
||||
"blockMissingDescription":{
|
||||
"message":"Hætta við veiddar beiðnir ef umbeðið tilfang er ekki til staðar á tölvunni.",
|
||||
"description":"Block requests for missing resources description."
|
||||
"blockMissingDescription": {
|
||||
"message": "Hætta við veiddar beiðnir ef umbeðið tilfang er ekki til staðar á tölvunni.",
|
||||
"description": "Block requests for missing resources description."
|
||||
},
|
||||
"disablePrefetchTitle":{
|
||||
"message":"Gera forsöfnun tengla óvirka",
|
||||
"description":"Disable prefetch title."
|
||||
"disablePrefetchTitle": {
|
||||
"message": "Gera forsöfnun tengla óvirka",
|
||||
"description": "Disable prefetch title."
|
||||
},
|
||||
"disablePrefetchDescription":{
|
||||
"message":"Kemur í veg fyrir að bannaðar beiðnir leki út til afhendingarveitna.",
|
||||
"description":"Disable prefetch description."
|
||||
"disablePrefetchDescription": {
|
||||
"message": "Kemur í veg fyrir að bannaðar beiðnir leki út til afhendingarveitna.",
|
||||
"description": "Disable prefetch description."
|
||||
},
|
||||
"stripMetadataTitle":{
|
||||
"message":"Hreinsa lýsigögn úr leyfðum beiðnum",
|
||||
"description":"Strip metadata title."
|
||||
"stripMetadataTitle": {
|
||||
"message": "Hreinsa lýsigögn úr leyfðum beiðnum",
|
||||
"description": "Strip metadata title."
|
||||
},
|
||||
"stripMetadataDescription":{
|
||||
"message":"Þurrka viðkvæm gögn út úr leyfðum beiðnum til efnisveitna til að auka gagnaleynd.",
|
||||
"description":"Strip metadata description."
|
||||
"stripMetadataDescription": {
|
||||
"message": "Þurrka viðkvæm gögn út úr leyfðum beiðnum til efnisveitna til að auka gagnaleynd.",
|
||||
"description": "Strip metadata description."
|
||||
},
|
||||
"whitelistedDomainsTitle":{
|
||||
"message":"Undanskilja lén frá athugun",
|
||||
"description":"Whitelisted domains title."
|
||||
"whitelistedDomainsTitle": {
|
||||
"message": "Undanskilja lén frá athugun",
|
||||
"description": "Whitelisted domains title."
|
||||
},
|
||||
"whitelistedDomainsDescription":{
|
||||
"message":"Settu inn lén til að skrá þau á lista yfir leyfð lén. Aðgreindu færslur með semíkommum (;).",
|
||||
"description":"Whitelisted domains description."
|
||||
"whitelistedDomainsDescription": {
|
||||
"message": "Settu inn lén til að skrá þau á lista yfir leyfð lén. Aðgreindu færslur með semíkommum (;).",
|
||||
"description": "Whitelisted domains description."
|
||||
},
|
||||
"advancedLabel":{
|
||||
"message":"Ítarlegt",
|
||||
"description":"Advanced label."
|
||||
"advancedLabel": {
|
||||
"message": "Ítarlegt",
|
||||
"description": "Advanced label."
|
||||
}
|
||||
}
|
||||
70
_locales/lb/messages.json
Normal file
70
_locales/lb/messages.json
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"extensionDescription": {
|
||||
"message": "Schützt virun Tracking duerch \"gratis\" Content Delivery Networks.",
|
||||
"description": "Extension description."
|
||||
},
|
||||
"disableProtectionTitle": {
|
||||
"message": "Schutz fir dëse Site ausschalten",
|
||||
"description": "Disable protection title."
|
||||
},
|
||||
"enableProtectionTitle": {
|
||||
"message": "Schutz aktivéieren",
|
||||
"description": "Enable protection title."
|
||||
},
|
||||
"amountInjectedTitle": {
|
||||
"message": "Zieler fir lokal injizéierte Ressourcen",
|
||||
"description": "Amount injected title."
|
||||
},
|
||||
"amountInjectedDescription": {
|
||||
"message": "Unzuel vu lokalen Injektiounen vun CDN-Ressourcen säit der Installatioun.",
|
||||
"description": "Amount injected description."
|
||||
},
|
||||
"optionsTitle": {
|
||||
"message": "Astellungen",
|
||||
"description": "Options title."
|
||||
},
|
||||
"showIconBadgeTitle": {
|
||||
"message": "Unzuel vun Injektiounen op der Ikon uweisen",
|
||||
"description": "Show icon badge title."
|
||||
},
|
||||
"showIconBadgeDescription": {
|
||||
"message": "D'Unzuel vun injizéierte Ressourcen op der Decentraleyes-Ikon uweisen.",
|
||||
"description": "Show icon badge description."
|
||||
},
|
||||
"blockMissingTitle": {
|
||||
"message": "Eroflueden vu fehlenden Ressourcen blockéieren",
|
||||
"description": "Block requests for missing resources title."
|
||||
},
|
||||
"blockMissingDescription": {
|
||||
"message": "Ofgefaangen Ressourcen-Downloads blockéieren, wann déi ugefuerdert Datei net lokal um System verfügbar ass.",
|
||||
"description": "Block requests for missing resources description."
|
||||
},
|
||||
"disablePrefetchTitle": {
|
||||
"message": "\"Link Prefetching\" ausschalten",
|
||||
"description": "Disable prefetch title."
|
||||
},
|
||||
"disablePrefetchDescription": {
|
||||
"message": "Verhënnert, dass onerlaabten Ressourcen entgéint den aneren Astellungen trotzdeem ugefuerdert\/erofgeluede ginn.",
|
||||
"description": "Disable prefetch description."
|
||||
},
|
||||
"stripMetadataTitle": {
|
||||
"message": "Metadaten aus den erlaabten Downloads erausläschen",
|
||||
"description": "Strip metadata title."
|
||||
},
|
||||
"stripMetadataDescription": {
|
||||
"message": "Läscht sensibel Daten aus den erlaabten CDN-Downloads fir den Dateschutz ze verbesseren.",
|
||||
"description": "Strip metadata description."
|
||||
},
|
||||
"whitelistedDomainsTitle": {
|
||||
"message": "Downloads fir dës Siten ëmmer erlaaben (Whitelist)",
|
||||
"description": "Whitelisted domains title."
|
||||
},
|
||||
"whitelistedDomainsDescription": {
|
||||
"message": "Gitt hei d'Domains un, deenen hir Downloads ëmmer sollen erlaabt ginn. Trennt déi eenzel Domains duerch e Semikolon (;).",
|
||||
"description": "Whitelisted domains description."
|
||||
},
|
||||
"advancedLabel": {
|
||||
"message": "Erweidert",
|
||||
"description": "Advanced label."
|
||||
}
|
||||
}
|
||||
70
_locales/tl/messages.json
Normal file
70
_locales/tl/messages.json
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"extensionDescription": {
|
||||
"message": "Para protektahan ka laban sa pagsubaybay sa pamamagitan ng \"libre\", sentralisadong, paghahatid ng nilalaman.",
|
||||
"description": "Extension description."
|
||||
},
|
||||
"disableProtectionTitle": {
|
||||
"message": "Huwag paganahin ang proteksyon para sa sayt na ito",
|
||||
"description": "Disable protection title."
|
||||
},
|
||||
"enableProtectionTitle": {
|
||||
"message": "Paganahin ang proteksyon",
|
||||
"description": "Enable protection title."
|
||||
},
|
||||
"amountInjectedTitle": {
|
||||
"message": "Laban para sa mga lokal na iniksiyong mga mapagkukunan",
|
||||
"description": "Amount injected title."
|
||||
},
|
||||
"amountInjectedDescription": {
|
||||
"message": "Ang halaga ng mga lokal na Nilalaman sa Network ng Paghahatid ng pinagmulan sa pag-install mula noong pag-install.",
|
||||
"description": "Amount injected description."
|
||||
},
|
||||
"optionsTitle": {
|
||||
"message": "Ang mga pagpipilian",
|
||||
"description": "Options title."
|
||||
},
|
||||
"showIconBadgeTitle": {
|
||||
"message": "Ang naka-displey na ineksyon ay mabibilang sa imahe",
|
||||
"description": "Show icon badge title."
|
||||
},
|
||||
"showIconBadgeDescription": {
|
||||
"message": "Ipakita ang bilang ng mga injected na pinagmulan sa ekstensyon nang imahe.",
|
||||
"description": "Show icon badge description."
|
||||
},
|
||||
"blockMissingTitle": {
|
||||
"message": "Harangan ang mga kahilingan para sa mga nawawalang mapagkukunan",
|
||||
"description": "Block requests for missing resources title."
|
||||
},
|
||||
"blockMissingDescription": {
|
||||
"message": "Kanselahin ang kahilingan na intercepted kung ang mga kinakailangang mapagkukunan ay hindi available sa lokal.",
|
||||
"description": "Block requests for missing resources description."
|
||||
},
|
||||
"disablePrefetchTitle": {
|
||||
"message": "Huwag paganahin ang prefetching link",
|
||||
"description": "Disable prefetch title."
|
||||
},
|
||||
"disablePrefetchDescription": {
|
||||
"message": "Pigilan ang mga kahilingan na hindi pinayagan mula sa pagkalat sa paghahatid ng mga network.",
|
||||
"description": "Disable prefetch description."
|
||||
},
|
||||
"stripMetadataTitle": {
|
||||
"message": "Iliston ang metadata mula sa mga pinayagan na kahilingan",
|
||||
"description": "Strip metadata title."
|
||||
},
|
||||
"stripMetadataDescription": {
|
||||
"message": "Burahin ang sensitibong datus mula sa mga pinahihintulutang kahilingan ng CDN para sa pinahusay na pagiging pribado nito.",
|
||||
"description": "Strip metadata description."
|
||||
},
|
||||
"whitelistedDomainsTitle": {
|
||||
"message": "Ibukod ang mga domain mula sa mga iinspeksyon",
|
||||
"description": "Whitelisted domains title."
|
||||
},
|
||||
"whitelistedDomainsDescription": {
|
||||
"message": "Ipasok ang mga domain upang i-whitelist sila. Paghiwalayin ang maramihang mga entry na may tuldok kuwit (;).",
|
||||
"description": "Whitelisted domains description."
|
||||
},
|
||||
"advancedLabel": {
|
||||
"message": "Naka-usad",
|
||||
"description": "Advanced label."
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ const Address = {
|
||||
'ANY': '*://*/*',
|
||||
'ANY_PATH': '/*',
|
||||
'ANY_PROTOCOL': '*://',
|
||||
'CHROME_EXTENSION': 'chrome-extension:',
|
||||
'EXAMPLE': 'example.org',
|
||||
'HTTP': 'http:',
|
||||
'HTTPS': 'https:',
|
||||
@@ -33,6 +34,11 @@ const Header = {
|
||||
'REFERER': 'Referer'
|
||||
};
|
||||
|
||||
const MessageResponse = {
|
||||
'ASYNCHRONOUS': true,
|
||||
'SYNCHRONOUS': false
|
||||
};
|
||||
|
||||
const Resource = {
|
||||
'MAPPING_EXPRESSION': /\.map$/i,
|
||||
'VERSION_EXPRESSION': /(?:\d{1,2}\.){1,3}\d{1,2}/,
|
||||
@@ -46,7 +52,8 @@ const Setting = {
|
||||
'SHOW_ICON_BADGE': 'showIconBadge',
|
||||
'SHOW_RELEASE_NOTES': 'showReleaseNotes',
|
||||
'STRIP_METADATA': 'stripMetadata',
|
||||
'WHITELISTED_DOMAINS': 'whitelistedDomains'
|
||||
'WHITELISTED_DOMAINS': 'whitelistedDomains',
|
||||
'XHR_TEST_DOMAIN': 'xhrTestDomain'
|
||||
};
|
||||
|
||||
const WebRequest = {
|
||||
@@ -55,6 +62,10 @@ const WebRequest = {
|
||||
'HEADERS': 'requestHeaders'
|
||||
};
|
||||
|
||||
const WebRequestType = {
|
||||
'XHR': 'xmlhttprequest'
|
||||
};
|
||||
|
||||
const Whitelist = {
|
||||
'TRIM_EXPRESSION': /^;+|;+$/g,
|
||||
'VALUE_SEPARATOR': ';'
|
||||
|
||||
58
core/file-guard.js
Normal file
58
core/file-guard.js
Normal file
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* File Guard
|
||||
* Belongs to Decentraleyes.
|
||||
*
|
||||
* @see https://github.com/Synzvato/decentraleyes/pull/258
|
||||
*
|
||||
* @author Thomas Rientjes
|
||||
* @since 2018-05-17
|
||||
* @license MPL 2.0
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* File Guard
|
||||
*/
|
||||
|
||||
var fileGuard = {};
|
||||
|
||||
/**
|
||||
* Private Methods
|
||||
*/
|
||||
|
||||
fileGuard._startListening = function () {
|
||||
|
||||
let randomHexString = helpers.generateRandomHexString(24);
|
||||
fileGuard.secret = `?_=${randomHexString}`;
|
||||
|
||||
chrome.webRequest.onBeforeRequest.addListener(
|
||||
fileGuard._verifyRequest,
|
||||
{'urls': [`${fileGuard.path}/*`]},
|
||||
[WebRequest.BLOCKING]
|
||||
);
|
||||
};
|
||||
|
||||
fileGuard._verifyRequest = function (requestDetails) {
|
||||
|
||||
let redirectUrl = chrome.runtime.getURL('/');
|
||||
|
||||
if (!requestDetails.url.endsWith(fileGuard.secret)) {
|
||||
return {redirectUrl};
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializations
|
||||
*/
|
||||
|
||||
fileGuard.path = chrome.runtime.getURL('/resources');
|
||||
fileGuard.secret = '';
|
||||
|
||||
if (fileGuard.path.startsWith(Address.CHROME_EXTENSION)) {
|
||||
fileGuard._startListening();
|
||||
}
|
||||
@@ -42,6 +42,13 @@ interceptor.handleRequest = function (requestDetails, tabIdentifier, tab) {
|
||||
tabDomain = Address.EXAMPLE;
|
||||
}
|
||||
|
||||
if (requestDetails.type === WebRequestType.XHR) {
|
||||
|
||||
if (tabDomain !== interceptor.xhrTestDomain) {
|
||||
return interceptor._handleMissingCandidate(requestDetails.url);
|
||||
}
|
||||
}
|
||||
|
||||
// Temporary list of undetectable tainted domains.
|
||||
let undetectableTaintedDomains = {
|
||||
'10fastfingers.com': true,
|
||||
@@ -49,15 +56,27 @@ interceptor.handleRequest = function (requestDetails, tabIdentifier, tab) {
|
||||
'bundleofholding.com': true,
|
||||
'cdnjs.com': true,
|
||||
'dropbox.com': true,
|
||||
'evoice.com': true,
|
||||
'freebusy.io': true,
|
||||
'gazetadopovo.com.br': true,
|
||||
'glowing-bear.org': true,
|
||||
'manualslib.com': true,
|
||||
'meslieux.paris.fr': true,
|
||||
'mgm.gov.tr': true,
|
||||
'minigames.mail.ru': true,
|
||||
'miniquadtestbench.com': true,
|
||||
'nhm.ac.uk': true,
|
||||
'openweathermap.org': true,
|
||||
'poedb.tw': true,
|
||||
'qwertee.com': true,
|
||||
'regentgreymouth.co.nz': true,
|
||||
'report-uri.io': true,
|
||||
'scan.nextcloud.com': true,
|
||||
'scotthelme.co.uk': true,
|
||||
'securityheaders.com': true,
|
||||
'securityheaders.io': true,
|
||||
'stefansundin.github.io': true,
|
||||
'transcend-info.com': true,
|
||||
'udacity.com': true,
|
||||
'yadi.sk': true,
|
||||
'yourvotematters.co.uk': true
|
||||
@@ -86,7 +105,7 @@ interceptor.handleRequest = function (requestDetails, tabIdentifier, tab) {
|
||||
};
|
||||
|
||||
return {
|
||||
'redirectUrl': chrome.extension.getURL(targetPath)
|
||||
'redirectUrl': chrome.extension.getURL(targetPath + fileGuard.secret)
|
||||
};
|
||||
};
|
||||
|
||||
@@ -124,6 +143,10 @@ interceptor._handleMissingCandidate = function (requestUrl) {
|
||||
|
||||
interceptor._handleStorageChanged = function (changes) {
|
||||
|
||||
if (Setting.XHR_TEST_DOMAIN in changes) {
|
||||
interceptor.xhrTestDomain = changes.xhrTestDomain.newValue;
|
||||
}
|
||||
|
||||
if (Setting.BLOCK_MISSING in changes) {
|
||||
interceptor.blockMissing = changes.blockMissing.newValue;
|
||||
}
|
||||
@@ -134,11 +157,19 @@ interceptor._handleStorageChanged = function (changes) {
|
||||
*/
|
||||
|
||||
interceptor.amountInjected = 0;
|
||||
interceptor.xhrTestDomain = 'decentraleyes.org';
|
||||
interceptor.blockMissing = false;
|
||||
|
||||
chrome.storage.local.get([Setting.AMOUNT_INJECTED, Setting.BLOCK_MISSING], function (items) {
|
||||
interceptor.relatedSettings = [];
|
||||
|
||||
interceptor.relatedSettings.push(Setting.AMOUNT_INJECTED);
|
||||
interceptor.relatedSettings.push(Setting.XHR_TEST_DOMAIN);
|
||||
interceptor.relatedSettings.push(Setting.BLOCK_MISSING);
|
||||
|
||||
chrome.storage.local.get(interceptor.relatedSettings, function (items) {
|
||||
|
||||
interceptor.amountInjected = items.amountInjected || 0;
|
||||
interceptor.xhrTestDomain = items.xhrTestDomain || 'decentraleyes.org';
|
||||
interceptor.blockMissing = items.blockMissing || false;
|
||||
});
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ var main = {};
|
||||
main._initializeOptions = function () {
|
||||
|
||||
let optionDefaults = {
|
||||
[Setting.XHR_TEST_DOMAIN]: 'decentraleyes.org',
|
||||
[Setting.SHOW_ICON_BADGE]: true,
|
||||
[Setting.BLOCK_MISSING]: false,
|
||||
[Setting.DISABLE_PREFETCH]: true,
|
||||
|
||||
@@ -35,7 +35,7 @@ var mappings = {
|
||||
'swfobject/{version}/swfobject.': resources.swfobject,
|
||||
'webfont/{version}/webfont.': resources.webfont,
|
||||
|
||||
// Common Shorthand Notations [Deprecated]
|
||||
// Basic Shorthand Notations [Deprecated]
|
||||
'dojo/1/dojo/dojo.': {
|
||||
'path': 'resources/dojo/1.6.1/dojo/dojo.js.dec',
|
||||
'type': 'application/javascript'
|
||||
@@ -116,7 +116,7 @@ var mappings = {
|
||||
'ui/{version}/jquery-ui.js': resources.jQueryUI,
|
||||
'ui/{version}/jquery-ui.min.js': resources.jQueryUI,
|
||||
|
||||
// Common Shorthand Notations [Deprecated]
|
||||
// Basic Shorthand Notations [Deprecated]
|
||||
'jquery-latest.': {
|
||||
'path': 'resources/jquery/1.11.1/jquery.min.js.dec',
|
||||
'type': 'application/javascript'
|
||||
@@ -124,46 +124,6 @@ var mappings = {
|
||||
'jquery.': {
|
||||
'path': 'resources/jquery/1.11.1/jquery.min.js.dec',
|
||||
'type': 'application/javascript'
|
||||
},
|
||||
'jquery-1.3.min.js': {
|
||||
'path': 'resources/jquery/1.3.0/jquery.min.js.dec',
|
||||
'type': 'application/javascript'
|
||||
},
|
||||
'jquery-1.3.js': {
|
||||
'path': 'resources/jquery/1.3.0/jquery.min.js.dec',
|
||||
'type': 'application/javascript'
|
||||
},
|
||||
'jquery-1.4.min.js': {
|
||||
'path': 'resources/jquery/1.4.0/jquery.min.js.dec',
|
||||
'type': 'application/javascript'
|
||||
},
|
||||
'jquery-1.4.js': {
|
||||
'path': 'resources/jquery/1.4.0/jquery.min.js.dec',
|
||||
'type': 'application/javascript'
|
||||
},
|
||||
'jquery-1.5.min.js': {
|
||||
'path': 'resources/jquery/1.5.0/jquery.min.js.dec',
|
||||
'type': 'application/javascript'
|
||||
},
|
||||
'jquery-1.5.js': {
|
||||
'path': 'resources/jquery/1.5.0/jquery.min.js.dec',
|
||||
'type': 'application/javascript'
|
||||
},
|
||||
'jquery-1.6.min.js': {
|
||||
'path': 'resources/jquery/1.6.0/jquery.min.js.dec',
|
||||
'type': 'application/javascript'
|
||||
},
|
||||
'jquery-1.6.js': {
|
||||
'path': 'resources/jquery/1.6.0/jquery.min.js.dec',
|
||||
'type': 'application/javascript'
|
||||
},
|
||||
'jquery-1.7.min.js': {
|
||||
'path': 'resources/jquery/1.7.0/jquery.min.js.dec',
|
||||
'type': 'application/javascript'
|
||||
},
|
||||
'jquery-1.7.js': {
|
||||
'path': 'resources/jquery/1.7.0/jquery.min.js.dec',
|
||||
'type': 'application/javascript'
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -277,3 +237,11 @@ var mappings = {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Geekzu Public Service [Mirror]
|
||||
mappings['sdn.geekzu.org'] = {
|
||||
'/ajax/ajax/libs/': mappings['ajax.googleapis.com']['/ajax/libs/']
|
||||
};
|
||||
|
||||
// USTC Linux User Group [Mirror]
|
||||
mappings['ajax.proxy.ustclug.org'] = mappings['ajax.googleapis.com'];
|
||||
|
||||
70
core/messenger.js
Normal file
70
core/messenger.js
Normal file
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* Messenger
|
||||
* Belongs to Decentraleyes.
|
||||
*
|
||||
* @author Thomas Rientjes
|
||||
* @since 2018-05-28
|
||||
* @license MPL 2.0
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Messenger
|
||||
*/
|
||||
|
||||
var messenger = {};
|
||||
|
||||
/**
|
||||
* Private Methods
|
||||
*/
|
||||
|
||||
messenger._handleMessageReceived = function (message, sender, sendResponse) {
|
||||
|
||||
let topic, value;
|
||||
|
||||
topic = message.topic;
|
||||
value = message.value;
|
||||
|
||||
if (topic === 'tab:fetch-injections') {
|
||||
|
||||
sendResponse({'value': stateManager.tabs[value].injections});
|
||||
return MessageResponse.SYNCHRONOUS;
|
||||
}
|
||||
|
||||
if (topic === 'domain:fetch-is-whitelisted') {
|
||||
|
||||
let whitelistRecord = requestAnalyzer.whitelistedDomains[value];
|
||||
sendResponse({'value': Boolean(whitelistRecord)});
|
||||
|
||||
return MessageResponse.SYNCHRONOUS;
|
||||
}
|
||||
|
||||
if (topic === 'whitelist:add-domain') {
|
||||
|
||||
stateManager.addDomainToWhitelist(value).then(function () {
|
||||
sendResponse({'value': true});
|
||||
});
|
||||
|
||||
return MessageResponse.ASYNCHRONOUS;
|
||||
}
|
||||
|
||||
if (topic === 'whitelist:remove-domain') {
|
||||
|
||||
stateManager.removeDomainFromWhitelist(value).then(function () {
|
||||
sendResponse({'value': true});
|
||||
});
|
||||
|
||||
return MessageResponse.ASYNCHRONOUS;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Event Handlers
|
||||
*/
|
||||
|
||||
chrome.runtime.onMessage.addListener(messenger._handleMessageReceived);
|
||||
@@ -100,12 +100,23 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
|
||||
|
||||
if (resourcePattern.startsWith(resourceMold)) {
|
||||
|
||||
let targetPath, version;
|
||||
let targetPath, hostShorthands, version;
|
||||
|
||||
targetPath = resourceMappings[resourceMold].path;
|
||||
targetPath = targetPath.replace(Resource.VERSION_PLACEHOLDER, versionNumber);
|
||||
|
||||
version = versionNumber && versionNumber[0] || targetPath.match(Resource.VERSION_EXPRESSION);
|
||||
hostShorthands = shorthands[channelHost];
|
||||
|
||||
if (hostShorthands && hostShorthands[targetPath]) {
|
||||
|
||||
let shorthand = hostShorthands[targetPath];
|
||||
|
||||
targetPath = shorthand.path;
|
||||
version = shorthand.version;
|
||||
|
||||
} else {
|
||||
version = versionNumber && versionNumber[0] || targetPath.match(Resource.VERSION_EXPRESSION);
|
||||
}
|
||||
|
||||
// Prepare and return a local target.
|
||||
return {
|
||||
|
||||
82
core/shorthands.js
Normal file
82
core/shorthands.js
Normal file
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* Shorthands
|
||||
* Belongs to Decentraleyes.
|
||||
*
|
||||
* @author Thomas Rientjes
|
||||
* @since 2018-02-24
|
||||
* @license MPL 2.0
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Shorthands
|
||||
*/
|
||||
|
||||
var shorthands = {
|
||||
|
||||
// Google Hosted Libraries [Deprecated]
|
||||
'ajax.googleapis.com': {
|
||||
'resources/jquery/1.8/jquery.min.js.dec': {
|
||||
'path': 'resources/jquery/1.8.3/jquery.min.js.dec',
|
||||
'version': '1.8.3'
|
||||
},
|
||||
'resources/jquery/1.7/jquery.min.js.dec': {
|
||||
'path': 'resources/jquery/1.7.2/jquery.min.js.dec',
|
||||
'version': '1.7.2'
|
||||
},
|
||||
'resources/jquery/1.6/jquery.min.js.dec': {
|
||||
'path': 'resources/jquery/1.6.4/jquery.min.js.dec',
|
||||
'version': '1.6.4'
|
||||
},
|
||||
'resources/jquery/1.5/jquery.min.js.dec': {
|
||||
'path': 'resources/jquery/1.5.2/jquery.min.js.dec',
|
||||
'version': '1.5.2'
|
||||
},
|
||||
'resources/jquery/1.4/jquery.min.js.dec': {
|
||||
'path': 'resources/jquery/1.4.4/jquery.min.js.dec',
|
||||
'version': '1.4.4'
|
||||
},
|
||||
'resources/jquery/1.3/jquery.min.js.dec': {
|
||||
'path': 'resources/jquery/1.3.2/jquery.min.js.dec',
|
||||
'version': '1.3.2'
|
||||
},
|
||||
'resources/jquery/1.2/jquery.min.js.dec': {
|
||||
'path': 'resources/jquery/1.2.6/jquery.min.js.dec',
|
||||
'version': '1.2.6'
|
||||
}
|
||||
},
|
||||
// jQuery CDN [Deprecated]
|
||||
'code.jquery.com': {
|
||||
'resources/jquery/1.7/jquery.min.js.dec': {
|
||||
'path': 'resources/jquery/1.7.0/jquery.min.js.dec',
|
||||
'version': '1.7.0'
|
||||
},
|
||||
'resources/jquery/1.6/jquery.min.js.dec': {
|
||||
'path': 'resources/jquery/1.6.0/jquery.min.js.dec',
|
||||
'version': '1.6.0'
|
||||
},
|
||||
'resources/jquery/1.5/jquery.min.js.dec': {
|
||||
'path': 'resources/jquery/1.5.0/jquery.min.js.dec',
|
||||
'version': '1.5.0'
|
||||
},
|
||||
'resources/jquery/1.4/jquery.min.js.dec': {
|
||||
'path': 'resources/jquery/1.4.0/jquery.min.js.dec',
|
||||
'version': '1.4.0'
|
||||
},
|
||||
'resources/jquery/1.3/jquery.min.js.dec': {
|
||||
'path': 'resources/jquery/1.3.0/jquery.min.js.dec',
|
||||
'version': '1.3.0'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Geekzu Public Service [Mirror]
|
||||
shorthands['sdn.geekzu.org'] = shorthands['ajax.googleapis.com'];
|
||||
|
||||
// USTC Linux User Group [Mirror]
|
||||
shorthands['ajax.proxy.ustclug.org'] = shorthands['ajax.googleapis.com'];
|
||||
@@ -74,7 +74,7 @@ stateManager.addDomainToWhitelist = function (domain) {
|
||||
});
|
||||
};
|
||||
|
||||
stateManager.deleteDomainFromWhitelist = function (domain) {
|
||||
stateManager.removeDomainFromWhitelist = function (domain) {
|
||||
|
||||
return new Promise((resolve) => {
|
||||
|
||||
|
||||
@@ -8,12 +8,13 @@
|
||||
"locale_with_underscore":
|
||||
"ar": "ar"
|
||||
"bg": "bg"
|
||||
"cs": "cs"
|
||||
"da": "da"
|
||||
"de": "de"
|
||||
"el": "el"
|
||||
"et": "et"
|
||||
"eo": "eo"
|
||||
"es-ES": "es"
|
||||
"et": "et"
|
||||
"fi": "fi"
|
||||
"fr": "fr"
|
||||
"he": "he"
|
||||
@@ -23,10 +24,12 @@
|
||||
"it": "it"
|
||||
"ja": "ja"
|
||||
"ko": "ko"
|
||||
"lb": "lb"
|
||||
"nl": "nl"
|
||||
"pl": "pl"
|
||||
"ro": "ro"
|
||||
"ru": "ru"
|
||||
"sr": "sr"
|
||||
"sv-SE": "sv"
|
||||
"tl": "tl"
|
||||
"tr": "tr"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Decentraleyes",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
|
||||
"author": "Thomas Rientjes",
|
||||
|
||||
@@ -47,13 +47,6 @@
|
||||
"page": "pages/options/options.html"
|
||||
},
|
||||
|
||||
"applications": {
|
||||
"gecko": {
|
||||
"id": "jid1-BoFifL9Vbdl2zQ@jetpack",
|
||||
"strict_min_version": "56.0a1"
|
||||
}
|
||||
},
|
||||
|
||||
"web_accessible_resources": [
|
||||
"resources/*"
|
||||
]
|
||||
|
||||
@@ -62,8 +62,9 @@ helpers.languageIsFullySupported = function (language) {
|
||||
languageSupported = false;
|
||||
|
||||
supportedLanguages = [
|
||||
'ar', 'bg', 'zh', 'cs', 'da', 'nl', 'en', 'et', 'fi', 'fr', 'de', 'el',
|
||||
'is', 'id', 'it', 'ja', 'ko', 'pl', 'pt', 'ro', 'ru', 'es', 'sv', 'tr'
|
||||
'ar', 'bg', 'zh', 'cs', 'da', 'nl', 'en', 'et', 'fi',
|
||||
'fr', 'de', 'el', 'is', 'id', 'it', 'ja', 'ko', 'lb',
|
||||
'pl', 'pt', 'ro', 'ru', 'es', 'sv', 'tr'
|
||||
];
|
||||
|
||||
for (let supportedLanguage of supportedLanguages) {
|
||||
@@ -118,6 +119,23 @@ helpers.extractFilenameFromPath = function (path) {
|
||||
return filename;
|
||||
};
|
||||
|
||||
helpers.generateRandomHexString = function (length) {
|
||||
|
||||
let randomValues, randomHexString;
|
||||
|
||||
randomValues = crypto.getRandomValues(new Uint8Array(length));
|
||||
randomHexString = '';
|
||||
|
||||
for (let value of randomValues) {
|
||||
|
||||
// eslint-disable-next-line no-bitwise
|
||||
let hexValue = (0 ^ value & 15 >> 0 / 4).toString(16);
|
||||
randomHexString += hexValue;
|
||||
}
|
||||
|
||||
return randomHexString;
|
||||
};
|
||||
|
||||
helpers.determineCdnName = function (domainName) {
|
||||
|
||||
switch (domainName) {
|
||||
@@ -144,6 +162,10 @@ helpers.determineCdnName = function (domainName) {
|
||||
return 'Sina Public Resources';
|
||||
case 'upcdn.b0.upaiyun.com':
|
||||
return 'UpYun Library';
|
||||
case 'sdn.geekzu.org':
|
||||
return 'Geekzu Public Service [Mirror]';
|
||||
case 'ajax.proxy.ustclug.org':
|
||||
return 'USTC Linux User Group [Mirror]';
|
||||
default:
|
||||
return 'Unknown';
|
||||
}
|
||||
|
||||
@@ -17,9 +17,12 @@
|
||||
<script src="../../core/files.js"></script>
|
||||
<script src="../../core/resources.js"></script>
|
||||
<script src="../../core/mappings.js"></script>
|
||||
<script src="../../core/shorthands.js"></script>
|
||||
<script src="../../core/request-sanitizer.js"></script>
|
||||
<script src="../../core/state-manager.js"></script>
|
||||
<script src="../../core/request-analyzer.js"></script>
|
||||
<script src="../../core/file-guard.js"></script>
|
||||
<script src="../../core/messenger.js"></script>
|
||||
<script src="../../core/interceptor.js"></script>
|
||||
<script src="../../core/main.js"></script>
|
||||
|
||||
|
||||
@@ -7,15 +7,29 @@ body {
|
||||
cursor: default;
|
||||
font-family: 'Noto Sans', Arial, sans-serif !important;
|
||||
font-size: 12px;
|
||||
margin-top: -15px;
|
||||
padding: 10px !important;
|
||||
}
|
||||
|
||||
.option {
|
||||
margin-bottom: 22px;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.notice {
|
||||
margin-top: 12px;
|
||||
border-radius: 3px;
|
||||
box-sizing: border-box;
|
||||
margin-top: 25px;
|
||||
max-width: 470px;
|
||||
padding: 14px 16px;
|
||||
}
|
||||
|
||||
.notice-default {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.notice-warning {
|
||||
background-color: #ffa500;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,10 +88,58 @@ body {
|
||||
*/
|
||||
|
||||
.icon {
|
||||
color: #777;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Buttons
|
||||
*/
|
||||
|
||||
.button {
|
||||
-moz-user-select: none;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #cfcfcf;
|
||||
color: #5f5f5f;
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-size: 12px;
|
||||
outline: 0;
|
||||
padding: 5px 22px;
|
||||
text-decoration: none;
|
||||
user-select: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.button:active {
|
||||
background-color: #dedede;
|
||||
}
|
||||
|
||||
.button-warning {
|
||||
background-color: #ea9700;
|
||||
border: 1px solid #d88c00;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.button-warning:hover {
|
||||
background-color: #d88c00;
|
||||
border-color: #c98200;
|
||||
}
|
||||
|
||||
.button-warning:active {
|
||||
background-color: #c07c00;
|
||||
border-color: #b47400;
|
||||
}
|
||||
|
||||
.button-notice {
|
||||
margin-left: auto;
|
||||
padding: 5px 9px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Links
|
||||
*/
|
||||
@@ -118,14 +180,19 @@ body {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.notice-head {
|
||||
font-weight: 600;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.notice-body {
|
||||
background-color: #fbfbfb;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #e7e7e7;
|
||||
color: #595959;
|
||||
display: inline-block;
|
||||
font-size: 11px;
|
||||
padding: 8px 10px;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.notice-message {
|
||||
line-height: 1.3;
|
||||
margin-right: 14px;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,6 +23,29 @@
|
||||
|
||||
<script src="options.js"></script>
|
||||
|
||||
<section class="notice notice-warning hidden" id="notice-block-missing">
|
||||
|
||||
<div class="notice-head">
|
||||
|
||||
<i class="fai fa-exclamation-triangle icon"></i>
|
||||
<span data-i18n-content="blockMissingTitle"></span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="notice-body" dir="ltr">
|
||||
|
||||
<div class="notice-message">
|
||||
This feature breaks websites. Do not leave it enabled, unless you are prepared to manually whitelist any affected domains.
|
||||
</div>
|
||||
|
||||
<div class="button button-notice button-warning" id="button-block-missing">
|
||||
Disable
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="option">
|
||||
|
||||
<div class="title-option">
|
||||
@@ -105,13 +128,18 @@
|
||||
|
||||
</section>
|
||||
|
||||
<section class="notice hidden" id="notice-locale">
|
||||
<section class="notice notice-default hidden" id="notice-locale">
|
||||
|
||||
<div class="notice-body" dir="ltr">
|
||||
|
||||
<i class="fai fa-exclamation-triangle icon"></i>
|
||||
Your preferred language is not yet fully supported.
|
||||
<a class="link-text" href="https://crowdin.com/project/decentraleyes" target="_blank">
|
||||
<div class="notice-message">
|
||||
|
||||
<i class="fai fa-exclamation-triangle icon"></i>
|
||||
Your preferred language is not yet fully supported.
|
||||
|
||||
</div>
|
||||
|
||||
<a class="button button-notice" href="https://crowdin.com/project/decentraleyes" target="_blank">
|
||||
Help Translate
|
||||
</a>
|
||||
|
||||
|
||||
@@ -48,16 +48,33 @@ options._renderOptionsPanel = function () {
|
||||
elements.whitelistedDomains.value = domainWhitelist;
|
||||
|
||||
options._registerOptionChangedEventListeners(elements);
|
||||
options._registerMiscellaneousEventListeners();
|
||||
|
||||
if (options._optionValues.blockMissing === true) {
|
||||
options._renderBlockMissingNotice();
|
||||
}
|
||||
|
||||
if (options._languageSupported === false) {
|
||||
options._renderLocaleNotice();
|
||||
}
|
||||
};
|
||||
|
||||
options._renderBlockMissingNotice = function () {
|
||||
|
||||
let blockMissingNoticeElement = document.getElementById('notice-block-missing');
|
||||
blockMissingNoticeElement.setAttribute('class', 'notice notice-warning');
|
||||
};
|
||||
|
||||
options._hideBlockMissingNotice = function () {
|
||||
|
||||
let blockMissingNoticeElement = document.getElementById('notice-block-missing');
|
||||
blockMissingNoticeElement.setAttribute('class', 'notice notice-warning hidden');
|
||||
};
|
||||
|
||||
options._renderLocaleNotice = function () {
|
||||
|
||||
let localeNoticeElement = document.getElementById('notice-locale');
|
||||
localeNoticeElement.setAttribute('class', 'notice');
|
||||
localeNoticeElement.setAttribute('class', 'notice notice-default');
|
||||
};
|
||||
|
||||
options._registerOptionChangedEventListeners = function (elements) {
|
||||
@@ -69,6 +86,19 @@ options._registerOptionChangedEventListeners = function (elements) {
|
||||
elements.whitelistedDomains.addEventListener('keyup', options._onOptionChanged);
|
||||
};
|
||||
|
||||
options._registerMiscellaneousEventListeners = function () {
|
||||
|
||||
let blockMissingButtonElement = document.getElementById('button-block-missing');
|
||||
|
||||
blockMissingButtonElement.addEventListener('click', function () {
|
||||
|
||||
let changeEvent = new Event('change');
|
||||
|
||||
options._optionElements.blockMissing.checked = false;
|
||||
options._optionElements.blockMissing.dispatchEvent(changeEvent);
|
||||
});
|
||||
};
|
||||
|
||||
options._determineOptionValues = function () {
|
||||
|
||||
return new Promise((resolve) => {
|
||||
@@ -173,6 +203,15 @@ options._onOptionChanged = function ({target}) {
|
||||
optionValue = target.value;
|
||||
}
|
||||
|
||||
if (optionKey === Setting.BLOCK_MISSING) {
|
||||
|
||||
if (optionValue === true) {
|
||||
options._renderBlockMissingNotice();
|
||||
} else {
|
||||
options._hideBlockMissingNotice();
|
||||
}
|
||||
}
|
||||
|
||||
if (optionKey === Setting.DISABLE_PREFETCH) {
|
||||
options._configureLinkPrefetching(optionValue);
|
||||
}
|
||||
|
||||
@@ -30,11 +30,10 @@ popup._renderContents = function () {
|
||||
|
||||
popup._renderNonContextualContents();
|
||||
|
||||
if (popup._backgroundPage !== null) {
|
||||
|
||||
popup._determineTargetTab()
|
||||
.then(popup._renderContextualContents);
|
||||
}
|
||||
popup._determineTargetTab()
|
||||
.then(popup._determineDomainWhitelistStatus)
|
||||
.then(popup._determineResourceInjections)
|
||||
.then(popup._renderContextualContents);
|
||||
};
|
||||
|
||||
popup._renderNonContextualContents = function () {
|
||||
@@ -55,24 +54,12 @@ popup._renderNonContextualContents = function () {
|
||||
|
||||
popup._renderContextualContents = function () {
|
||||
|
||||
let injections, groupedInjections;
|
||||
|
||||
popup._domain = helpers.extractDomainFromUrl(popup._targetTab.url);
|
||||
|
||||
popup._requestAnalyzer = popup._backgroundPage.requestAnalyzer;
|
||||
popup._stateManager = popup._backgroundPage.stateManager;
|
||||
|
||||
if (popup._domain !== null) {
|
||||
|
||||
popup._domain = helpers.normalizeDomain(popup._domain);
|
||||
popup._renderDomainWhitelistPanel();
|
||||
}
|
||||
|
||||
injections = popup._stateManager.tabs[popup._targetTab.id].injections;
|
||||
groupedInjections = popup._groupResourceInjections(injections);
|
||||
|
||||
if (Object.keys(groupedInjections).length > 0) {
|
||||
popup._renderInjectionPanel(groupedInjections);
|
||||
if (Object.keys(popup._resourceInjections).length > 0) {
|
||||
popup._renderInjectionPanel(popup._resourceInjections);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -87,7 +74,7 @@ popup._renderDomainWhitelistPanel = function () {
|
||||
protectionToggleElement.setAttribute('dir', popup._scriptDirection);
|
||||
domainIndicatorElement.innerText = popup._domain;
|
||||
|
||||
if (popup._requestAnalyzer.whitelistedDomains[popup._domain]) {
|
||||
if (popup._domainIsWhitelisted === true) {
|
||||
|
||||
let enableProtectionTitle = chrome.i18n.getMessage('enableProtectionTitle');
|
||||
|
||||
@@ -119,23 +106,59 @@ popup._renderInjectionPanel = function (groupedInjections) {
|
||||
|
||||
popup._enableProtection = function () {
|
||||
|
||||
popup._stateManager.deleteDomainFromWhitelist(popup._domain)
|
||||
.then(popup._onProtectionToggled);
|
||||
let message = {
|
||||
'topic': 'whitelist:remove-domain',
|
||||
'value': popup._domain
|
||||
};
|
||||
|
||||
chrome.runtime.sendMessage(message, function () {
|
||||
popup._onProtectionToggled();
|
||||
});
|
||||
};
|
||||
|
||||
popup._disableProtection = function () {
|
||||
|
||||
popup._stateManager.addDomainToWhitelist(popup._domain)
|
||||
.then(popup._onProtectionToggled);
|
||||
let message = {
|
||||
'topic': 'whitelist:add-domain',
|
||||
'value': popup._domain
|
||||
};
|
||||
|
||||
chrome.runtime.sendMessage(message, function () {
|
||||
popup._onProtectionToggled();
|
||||
});
|
||||
};
|
||||
|
||||
popup._determineBackgroundPage = function () {
|
||||
popup._determineDomainWhitelistStatus = function () {
|
||||
|
||||
return new Promise((resolve) => {
|
||||
|
||||
chrome.runtime.getBackgroundPage(function (backgroundPage) {
|
||||
let message = {
|
||||
'topic': 'domain:fetch-is-whitelisted',
|
||||
'value': popup._domain
|
||||
};
|
||||
|
||||
chrome.runtime.sendMessage(message, function (response) {
|
||||
|
||||
popup._domainIsWhitelisted = response.value;
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
popup._determineResourceInjections = function () {
|
||||
|
||||
return new Promise((resolve) => {
|
||||
|
||||
let message = {
|
||||
'topic': 'tab:fetch-injections',
|
||||
'value': popup._targetTab.id
|
||||
};
|
||||
|
||||
chrome.runtime.sendMessage(message, function (response) {
|
||||
|
||||
let groupedInjections = popup._groupResourceInjections(response.value);
|
||||
popup._resourceInjections = groupedInjections;
|
||||
|
||||
popup._backgroundPage = backgroundPage;
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
@@ -148,6 +171,12 @@ popup._determineTargetTab = function () {
|
||||
chrome.tabs.query({'active': true, 'currentWindow': true}, function (tabs) {
|
||||
|
||||
popup._targetTab = tabs[0];
|
||||
popup._domain = helpers.extractDomainFromUrl(tabs[0].url);
|
||||
|
||||
if (popup._domain !== null) {
|
||||
popup._domain = helpers.normalizeDomain(popup._domain);
|
||||
}
|
||||
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
@@ -292,8 +321,7 @@ popup._onDocumentLoaded = function () {
|
||||
popup._version = helpers.formatVersion(manifest.version);
|
||||
popup._scriptDirection = helpers.determineScriptDirection(language);
|
||||
|
||||
popup._determineBackgroundPage()
|
||||
.then(popup._determineAmountInjected)
|
||||
popup._determineAmountInjected()
|
||||
.then(popup._renderContents);
|
||||
};
|
||||
|
||||
|
||||
@@ -25,24 +25,16 @@
|
||||
|
||||
<div class="container">
|
||||
|
||||
<h1>For a smoother experience</h1>
|
||||
|
||||
<div class="notice">
|
||||
|
||||
<span class="subtle-hint"><span class="topic-label">Configure HTTPS Everywhere</span><br>There's no need to read any further, unless you actually use Decentraleyes in combination with the HTTPS Everywhere extension. If you do, please follow this <a href="https://decentraleyes.org/configure-https-everywhere/" target="_blank">short guide</a> to prevent, or resolve, any conflicts.</span>
|
||||
|
||||
</div>
|
||||
|
||||
<h1>What's new in version 2.0?</h1>
|
||||
|
||||
<div class="notice">
|
||||
|
||||
<span class="subtle-hint"><span class="topic-label">A Completely New Foundation</span><br>Decentraleyes has been fully rebuilt, on top of cutting-edge web technologies. As a result, it's even faster, more capable, and ready for upcoming versions of Firefox.</span>
|
||||
|
||||
<div class="topic-badge"><i class="fai fa-cube"></i></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="notice">
|
||||
|
||||
<div class="topic-badge color-purple"><i class="fai fa-window-restore fa-flip-horizontal"></i></div>
|
||||
|
||||
<span class="subtle-hint"><span class="topic-label color-purple">A Clear User Interface</span><br>The extension is finally less shy about what it does to protect you. It shows you what exactly it injects into given pages, and puts all available features right at your fingertips.</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="notice">
|
||||
|
||||
<span class="subtle-hint"><span class="topic-label">Improved Configurability</span><br>The options screen has been updated to give you more control over the extension. Settings that impact privacy, or website functionality, are now explicitly labeled as advanced.</span>
|
||||
|
||||
Reference in New Issue
Block a user