Compare commits

...

22 commits

Author SHA1 Message Date
theaquamarine
81afa6ba72
Merge f6163cd947 into ec5a1b3ab6 2024-12-07 19:53:53 +01:00
Raymond Hill
ec5a1b3ab6
Import translation work from https://crowdin.com/project/ublock 2024-12-06 17:21:30 -05:00
Raymond Hill
424fc81628
[mv3] Minor code review 2024-12-06 12:13:18 -05:00
Raymond Hill
4e7bdff8ed
Make Firefox dev build auto-update 2024-12-06 12:11:15 -05:00
Raymond Hill
4ed97bb513
Update JSDoc documenation 2024-12-06 12:04:21 -05:00
Raymond Hill
0701422dcf
New revision for dev build 2024-12-06 11:56:56 -05:00
Raymond Hill
0d0754a57b
Update changelog 2024-12-06 11:56:33 -05:00
Raymond Hill
3417fe3d5d
Improve trusted-replace-argument scriptlet
As discussed with filter list maintainers.
2024-12-06 11:53:42 -05:00
Raymond Hill
36db7f8327
Block media elements unconditionally when max size is set to 0
Related feedback:
https://old.reddit.com/r/uBlockOrigin/comments/1h7x9nj/
2024-12-06 10:15:42 -05:00
Raymond Hill
b3a51d0018
Import translation work from https://crowdin.com/project/ublock 2024-12-05 13:09:07 -05:00
Raymond Hill
38390bab9c
[mv3] Add urlskip support for strict-blocked page + extra info
Add information about which ruleset caused a page to be strict-
blocked.

Whenever possible, add ability to URL-skip an incoming redirect
in a strict-blocked page.

Add new default list: "30-day Phishing Domain List"
2024-12-05 12:56:25 -05:00
Raymond Hill
fb82db34f7
Make Firefox dev build auto-update 2024-12-05 09:20:54 -05:00
Raymond Hill
fd2ddd3c01
Import translation work from https://crowdin.com/project/ublock 2024-12-05 09:12:28 -05:00
Raymond Hill
07484ceed1
Import translation work from https://crowdin.com/project/ublock 2024-12-05 09:10:46 -05:00
Raymond Hill
37f7181a52
New revision for dev build 2024-12-05 09:08:26 -05:00
Raymond Hill
a86e802afc
Add advanced setting noScriptingCSP
Related discussion:
https://github.com/uBlockOrigin/uBlock-issues/issues/2642#issuecomment-2520096503

Specify which CSP directive to inject when no-scripting switch is
toggled on. If this hidden setting is changed, uBO will not try
to spoof `noscript` elements.

For internal use at the moment, not to be documented.
2024-12-05 09:04:31 -05:00
blue
f6163cd947 Accept truth-y values for DisableDashboard
Make configuring via Windows registry easier. Specifically after 1 =
true and 0 = false as booleans are usually stored as dwords, so could
alternatively cast to boolean if typeof disableDashboard === 'number'
2022-04-04 20:16:48 +01:00
blue
b83dcd1595 Change Firefox sz policies to multi_sz
https://bugzilla.mozilla.org/show_bug.cgi?id=1762253#c12
2022-04-04 19:16:53 +01:00
blue
a0dc557542 Add remaining Firefox policies
Firefox preferences appear to not work because of
https://github.com/uBlockOrigin/uBlock-issues/issues/2067
2022-03-26 21:57:26 +00:00
blue
db539e8f92 Add Firefox group policy template
I've not been able to make the other, new settings work.
2022-03-24 23:13:04 +00:00
blue
6a542c5934 Add Group Policy template for Google Chrome 2022-03-24 22:22:33 +00:00
blue
d00c0861c6 Add Group Policy template for MS Edge
Policies for all available managed storage settings, documentation from
the wiki, and usage examples.
2022-03-24 22:08:43 +00:00
102 changed files with 1426 additions and 276 deletions

View file

@ -1,3 +1,6 @@
- [Improve `trusted-replace-argument` scriptlet](https://github.com/gorhill/uBlock/commit/3417fe3d5d)
- [Block media elements unconditionally when max size is set to 0](https://github.com/gorhill/uBlock/commit/36db7f8327)
- Regression from <https://github.com/gorhill/uBlock/commit/73ce4e6bcf>
- [Visually separate scriptlet parameters in active line](https://github.com/gorhill/uBlock/commit/076e9fa73e)
- [Mitigate potentially delayed execution of scriptlets in Firefox](https://github.com/gorhill/uBlock/commit/b1a00145bd)
- [Improve `prevent-setTimeout`/`prevent-setInterval` scriptlets](https://github.com/gorhill/uBlock/commit/3b7fa79a68)

View file

@ -3,9 +3,9 @@
"uBlock0@raymondhill.net": {
"updates": [
{
"version": "1.61.3.3",
"version": "1.61.3.5",
"browser_specific_settings": { "gecko": { "strict_min_version": "78.0" } },
"update_link": "https://github.com/gorhill/uBlock/releases/download/1.61.3b3/uBlock0_1.61.3b3.firefox.signed.xpi"
"update_link": "https://github.com/gorhill/uBlock/releases/download/1.61.3b5/uBlock0_1.61.3b5.firefox.signed.xpi"
}
]
}

2
dist/version vendored
View file

@ -1 +1 @@
1.61.3.3
1.61.3.5

View file

@ -251,6 +251,14 @@
"message": "لقد منع uBO Lite تحميل الصفحة التالية:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite папярэдзіў чытанне наступнай старонкі:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "без параметраў",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite попречи на зареждането на следната страница:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Страницата е блокирана поради съвпадащ филтър в {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "Блокираната страница иска да ви пренасочи към друг сайт. Ако изберете да продължите, ще преминете директно към: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "без параметри",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite en deus miret ar bajenn-mañ da gargañ:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Stanket eo bet ar bajenn abalamour d'ur sil dereat e-barzh {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "Ar bajenn stanket a fell dezhi adkas d'ul lec'hienn all. M'ho peus c'hoant da genderc'hel e vioc'h kaset d'ar chomlec'h-mañ: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "kuit a arventennoù",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "L'uBO Lite ha evitat la càrrega d'aquesta pàgina:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "La pàgina s'ha blocat a causa d'un filtre coincident a {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "La pàgina blocada vol redirigir-vos a un altre web diferent. Si continueu, si us reenviarà a: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "sense paràmetres",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite har forhindret flg. side i at blive indlæst:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Siden blev blokeret grundet et matchende filter i {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "Den blokerede side ønsker at omdirigere til et andet websted. Vælger man at fortsætte, navigeres direkte til: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "uden parametre",
"description": "Label to be used for the parameter-less URL"

View file

@ -232,7 +232,7 @@
"description": "Label for a checkbox in the options page"
},
"enableStrictBlockLabel": {
"message": "Stricktes Blockieren aktivieren",
"message": "Striktes Blockieren aktivieren",
"description": "Label for a checkbox in the options page"
},
"enableStrictBlockLegend": {
@ -251,6 +251,14 @@
"message": "uBO Lite hat das Laden der folgenden Seite verhindert:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Die Seite wurde aufgrund eines übereinstimmenden Filters in {{listname}} blockiert.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "Die blockierte Seite möchte zu einer anderen Website weiterleiten. Beim Fortfahren wird folgende Seite aufgerufen: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "ohne Parameter",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -250,6 +250,14 @@
"strictblockSentence1": {
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite impidió la carga de la página:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "La página fue bloqueada debido a un filtro coincidente en {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "La página bloqueada quiere redirigir a otro sitio. Si eliges proceder, navegarás directamente a: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "sin parámetros",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite ennetas järgmise veebilehe laadimist:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Lehe avamine keelati {{listname}} tõttu.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "Keelatud leht üritab suunata teisele lehele. Jätkates nõustute avama {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "ilma näitajateta",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite on estänyt seuraavan sivun latauksen:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Sivu estettiin listalla {{listname}} olevan sännön perusteella.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "Estetty sivu ohjautuu eri sivustolle. Jos jatkat, siirryt suoraan osoitteeseen {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "ilman parametreja",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite a empêché le chargement de cette page :",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "La page a été bloquée à cause d'un filtre correspondant dans {{listname}}",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "La page bloquée souhaite rediriger vers un autre site. Si vous choisissez de continuer, vous vous rendrez à l'adresse suivante : {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "sans paramètres",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite hat opkeard dat de folgjende side laden wurd:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "sûnder parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite evitou que a seguinte páxina se cargase:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Bloqueouse a páxina porque concorda cun filtro de {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "A páxina bloqueada quere redirixir a outra web. Se elixes continuar vas ir directamente a: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "sen parámetros",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -232,11 +232,11 @@
"description": "Label for a checkbox in the options page"
},
"enableStrictBlockLabel": {
"message": "Enable strict blocking",
"message": "הפעלת חסימה קפדנית",
"description": "Label for a checkbox in the options page"
},
"enableStrictBlockLegend": {
"message": "Navigation to potentially undesirable sites will be blocked, and you will be offered the option to proceed.",
"message": "ניווט אפשרי לאתרים לא רצויים יחסם ותהיה אפשרות להחליט להמשיך.",
"description": "Label for a checkbox in the options page"
},
"findListsPlaceholder": {
@ -244,31 +244,39 @@
"description": "Placeholder for the input field used to find lists"
},
"strictblockTitle": {
"message": "Page blocked",
"message": "הדף נחסם",
"description": "Webpage title for the strict-blocked page"
},
"strictblockSentence1": {
"message": "uBO Lite has prevented the following page from loading:",
"message": "uBO Lite מנע טעינה של הדפים הבאים:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "הדף נחסם בגלל התאמה למסנן מהרשימה {{listname}}",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "הדף החסום רוצה להעביר אותך לאתר אחר. בחירה להמשיך תעבור ישירות ל {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"message": "ללא פרמטרים",
"description": "Label to be used for the parameter-less URL"
},
"strictblockBack": {
"message": "Go back",
"message": "חזור",
"description": "A button to go back to the previous webpage"
},
"strictblockClose": {
"message": "Close this window",
"message": "סגור חלון זה",
"description": "A button to close the current tab"
},
"strictblockDontWarn": {
"message": "Don't warn me again about this site",
"message": "אל תתריע לי שוב על אתר זה",
"description": "Label for checkbox in document-blocked page"
},
"strictblockProceed": {
"message": "Proceed",
"message": "המשך",
"description": "A button to navigate to the blocked page"
}
}

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "पृष्ठ को {{listname}} में मेल खाते फ़िल्टर के कारण अवरुद्ध किया गया था.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "ब्लॉक किया गया पेज किसी दूसरी साइट पर रीडायरेक्ट करना चाहता है. अगर आप आगे बढ़ना चुनते हैं, तो आप सीधे इस पर नेविगेट करें: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite je spriječio učitavanje sljedeće stranice:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Stranica je blokirana zbog odgovarajućeg filtra u {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "Blokirana stranica želi preusmjeriti na drugu stranicu. Ako odlučite nastaviti, otići ćete izravno na: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "bez parametara",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "A uBO Lite megakadályozta a következő oldal betöltését:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "paraméterek nélkül",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -232,43 +232,51 @@
"description": "Label for a checkbox in the options page"
},
"enableStrictBlockLabel": {
"message": "Enable strict blocking",
"message": "Aktifkan pemblokiran ketat",
"description": "Label for a checkbox in the options page"
},
"enableStrictBlockLegend": {
"message": "Navigation to potentially undesirable sites will be blocked, and you will be offered the option to proceed.",
"message": "Navigasi ke situs yang mungkin tidak diinginkan akan diblokir, dan Anda akan ditawari opsi untuk melanjutkan.",
"description": "Label for a checkbox in the options page"
},
"findListsPlaceholder": {
"message": "Find lists",
"message": "Temukan daftar",
"description": "Placeholder for the input field used to find lists"
},
"strictblockTitle": {
"message": "Page blocked",
"message": "Halaman diblokir",
"description": "Webpage title for the strict-blocked page"
},
"strictblockSentence1": {
"message": "uBO Lite has prevented the following page from loading:",
"message": "uBO Lite telah mencegah pemuatan halaman berikut:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"message": "tanpa parameter",
"description": "Label to be used for the parameter-less URL"
},
"strictblockBack": {
"message": "Go back",
"message": "Kembali",
"description": "A button to go back to the previous webpage"
},
"strictblockClose": {
"message": "Close this window",
"message": "Tutup jendela ini",
"description": "A button to close the current tab"
},
"strictblockDontWarn": {
"message": "Don't warn me again about this site",
"message": "Jangan peringatkan saya lagi tentang situs ini",
"description": "Label for checkbox in document-blocked page"
},
"strictblockProceed": {
"message": "Proceed",
"message": "Lanjutkan",
"description": "A button to navigate to the blocked page"
}
}

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "La pagina è stata bloccata a causa di un filtro corrispondente in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "La pagina bloccata vuole reindirizzare a un altro sito. Se scegli di procedere, navigherai direttamente su: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite はこのページの読み込みをブロックしています:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "パラメータを除いた URL",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite novērsa šīs lapas ielādēšanu:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Lapa tika aizturēta, jo atbilst aizturētājam sarakstā {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "Aizturētā lapa veic pārvirzīšanu uz citu vietni. Ja izvēlēsies turpināt, nonāksi uzreiz šeit: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "bez parametriem",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -232,11 +232,11 @@
"description": "Label for a checkbox in the options page"
},
"enableStrictBlockLabel": {
"message": "Enable strict blocking",
"message": "Strenge blokkering inschakelen",
"description": "Label for a checkbox in the options page"
},
"enableStrictBlockLegend": {
"message": "Navigation to potentially undesirable sites will be blocked, and you will be offered the option to proceed.",
"message": "Navigatie naar mogelijk ongewenste websites wordt geblokkeerd, en nu krijgt de mogelijkheid om door te gaan.",
"description": "Label for a checkbox in the options page"
},
"findListsPlaceholder": {
@ -244,31 +244,39 @@
"description": "Placeholder for the input field used to find lists"
},
"strictblockTitle": {
"message": "Page blocked",
"message": "Pagina geblokkeerd",
"description": "Webpage title for the strict-blocked page"
},
"strictblockSentence1": {
"message": "uBO Lite has prevented the following page from loading:",
"message": "uBO Lite heeft het laden van de volgende pagina voorkomen:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "De pagina is geblokkeerd vanwege een overeenkomend filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "De geblokkeerde pagina wil u omleiden naar een andere website. Als u doorgaat, navigeert u rechtstreeks naar: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"message": "zonder parameters",
"description": "Label to be used for the parameter-less URL"
},
"strictblockBack": {
"message": "Go back",
"message": "Teruggaan",
"description": "A button to go back to the previous webpage"
},
"strictblockClose": {
"message": "Close this window",
"message": "Dit venster sluiten",
"description": "A button to close the current tab"
},
"strictblockDontWarn": {
"message": "Don't warn me again about this site",
"message": "Mij niet meer waarschuwen over deze website",
"description": "Label for checkbox in document-blocked page"
},
"strictblockProceed": {
"message": "Proceed",
"message": "Doorgaan",
"description": "A button to navigate to the blocked page"
}
}

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite nie pozwolił załadować się następującej stronie:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Strona została zablokowana z powodu pasującego filtra na liście {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "Zablokowana strona chce przekierować na inną witrynę. Jeśli zdecydujesz się kontynuować, przejdziesz bezpośrednio do: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "bez parametrów",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "O uBO Lite impediu o carregamento da seguinte página:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "A página foi bloqueada por causa de um filtro que combina no {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "A página bloqueada quer redirecionar para outro site. Se você escolher prosseguir, você navegará diretamente para: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "sem parâmetros",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite предотвратил загрузку следующей страницы:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Веб-страница была заблокирована из-за попадания в фильтр из {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "Заблокированная страница собирается перенаправить вас на другой сайт. Если вы решите продолжить, вы перейдете непосредственно на: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "без параметров",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite zabránil načítaniu nasledujúcej stránky:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Stránka bola zablokovaná z dôvodu zhodného filtra v{{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "Zablokovaná stránka chce presmerovať na inú stránku. Ak sa rozhodnete pokračovať, prejdete priamo na: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "bez parametrov",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -232,11 +232,11 @@
"description": "Label for a checkbox in the options page"
},
"enableStrictBlockLabel": {
"message": "Enable strict blocking",
"message": "Aktivizo bllokimin strikt",
"description": "Label for a checkbox in the options page"
},
"enableStrictBlockLegend": {
"message": "Navigation to potentially undesirable sites will be blocked, and you will be offered the option to proceed.",
"message": "Lundrimi drejt faqeve potencialisht të padëshirueshme do të bllokohet dhe do t'ju ofrohet mundësia për të vazhduar.",
"description": "Label for a checkbox in the options page"
},
"findListsPlaceholder": {
@ -244,31 +244,39 @@
"description": "Placeholder for the input field used to find lists"
},
"strictblockTitle": {
"message": "Page blocked",
"message": "Faqe e bllokuar",
"description": "Webpage title for the strict-blocked page"
},
"strictblockSentence1": {
"message": "uBO Lite has prevented the following page from loading:",
"message": "uMatrix ka penguar ngarkimin e faqes vijuese:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Faqja u bllokua për shkak të një filtri që përputhet në: {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "Faqja e bllokuar do t'ju drejtojë në një uebsajt tjetër. Në rast se pranoni do të shkoni te: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"message": "pa parametra",
"description": "Label to be used for the parameter-less URL"
},
"strictblockBack": {
"message": "Go back",
"message": "Mbrapa",
"description": "A button to go back to the previous webpage"
},
"strictblockClose": {
"message": "Close this window",
"message": "Mbyll këtë dritare",
"description": "A button to close the current tab"
},
"strictblockDontWarn": {
"message": "Don't warn me again about this site",
"message": "Mos më paralajmëro më për këtë faqe.",
"description": "Label for checkbox in document-blocked page"
},
"strictblockProceed": {
"message": "Proceed",
"message": "Vazhdo",
"description": "A button to navigate to the blocked page"
}
}

View file

@ -251,6 +251,14 @@
"message": "uBO Lite је спречио учитавање следеће странице:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "без параметара",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite har förhindrat följande sida från att läsas in:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Sidan har blockerats på grund av ett matchande filter i {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "Den blockerade sidan vill omdirigera till en annan webbplats. Om du väljer att fortsätta skickas du direkt till: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "utan parametrar",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBo Lite aşağıdaki sayfaların yüklenmesini engelledi:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Bu sayfa {{listname}} içindeki bir süzgece takıldığı için engellenmiştir.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "Engellenen sayfa sizi başka bir siteye yönlendirmek istiyor. Devam etmek isterseniz doğrudan şuraya yönlendirileceksiniz: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "değişkensiz",
"description": "Label to be used for the parameter-less URL"

View file

@ -232,11 +232,11 @@
"description": "Label for a checkbox in the options page"
},
"enableStrictBlockLabel": {
"message": "Enable strict blocking",
"message": "Увімкнути суворе блокування",
"description": "Label for a checkbox in the options page"
},
"enableStrictBlockLegend": {
"message": "Navigation to potentially undesirable sites will be blocked, and you will be offered the option to proceed.",
"message": "Перехід до потенційно небажаних сайтів буде заблоковано, та вам буде запропоновано можливість продовжити",
"description": "Label for a checkbox in the options page"
},
"findListsPlaceholder": {
@ -244,31 +244,39 @@
"description": "Placeholder for the input field used to find lists"
},
"strictblockTitle": {
"message": "Page blocked",
"message": "Сторінку заблоковано",
"description": "Webpage title for the strict-blocked page"
},
"strictblockSentence1": {
"message": "uBO Lite has prevented the following page from loading:",
"message": "uBO Lite заблокував завантаження наступних сторінок:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "Сторінку заблоковано, бо вона відповідає фільтру в {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "Заблокована сторінка хоче переадресувати на інший сайт. Якщо ви вирішите продовжити, ви перейдете безпосередньо на: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"message": "без параметрів",
"description": "Label to be used for the parameter-less URL"
},
"strictblockBack": {
"message": "Go back",
"message": "Повернутися",
"description": "A button to go back to the previous webpage"
},
"strictblockClose": {
"message": "Close this window",
"message": "Закрити це вікно",
"description": "A button to close the current tab"
},
"strictblockDontWarn": {
"message": "Don't warn me again about this site",
"message": "Більше не попереджати мене про цей сайт",
"description": "Label for checkbox in document-blocked page"
},
"strictblockProceed": {
"message": "Proceed",
"message": "Продовжити",
"description": "A button to navigate to the blocked page"
}
}

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite has prevented the following page from loading:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "The page was blocked because of a matching filter in {{listname}}.",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "without parameters",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite 已阻止了以下页面的加载:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "该页面由于 {{listName}} 中的匹配过滤器而被阻止。",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "被屏蔽的页面希望重定向到另一个网站。如果您选择继续,将直接导航到:{{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "不含参数",
"description": "Label to be used for the parameter-less URL"

View file

@ -251,6 +251,14 @@
"message": "uBO Lite 已防止下列頁面載入:",
"description": "Sentence used in the strict-blocked page"
},
"strictblockReasonSentence1": {
"message": "由於在 {{listname}} 中有符合的過濾條件,因此該頁面被封鎖。",
"description": "Text informing about what is causing the page to be blocked"
},
"strictblockRedirectSentence1": {
"message": "被封鎖的網頁想要重新導向至其他網站。如果您選擇繼續,則會直接前往:{{url}}",
"description": "Text warning about an incoming redirect"
},
"strictblockNoParamsPrompt": {
"message": "不帶參數",
"description": "Label to be used for the parameter-less URL"

View file

@ -15,7 +15,7 @@ h3 {
label + legend {
color: color-mix(in srgb, currentColor 69%, transparent);
font-size: small;
font-size: var(--font-size-smaller);
margin-inline-start: var(--default-gap-large);
}

View file

@ -26,6 +26,9 @@ body {
:root.mobile body {
padding: var(--default-gap-small);
}
body.loading {
visibility: hidden;
}
#rootContainer {
width: min(100%, 640px);
@ -43,8 +46,11 @@ p {
a {
text-decoration: none;
}
q {
font-weight: bold;
}
.code {
font-size: 13px;
font-size: var(--font-size-smaller);
word-break: break-all;
}
#warningSign {
@ -128,6 +134,11 @@ body[dir="rtl"] #toggleParse {
font-weight: bold;
}
#urlskip a {
display: block;
overflow-y: auto;
}
#actionContainer {
display: flex;
justify-content: space-between;

View file

@ -50,6 +50,7 @@ import {
excludeFromStrictBlock,
getEnabledRulesetsDetails,
getRulesetDetails,
patchDefaultRulesets,
setStrictBlockMode,
updateDynamicRules,
} from './ruleset-manager.js';
@ -377,20 +378,24 @@ function onMessage(request, sender, callback) {
async function start() {
await loadRulesetConfig();
const currentVersion = getCurrentVersion();
const isNewVersion = currentVersion !== rulesetConfig.version;
// The default rulesets may have changed, find out new ruleset to enable,
// obsolete ruleset to remove.
if ( isNewVersion ) {
ubolLog(`Version change: ${rulesetConfig.version} => ${currentVersion}`);
rulesetConfig.version = currentVersion;
await patchDefaultRulesets();
saveRulesetConfig();
}
const rulesetsUpdated = process.wakeupRun === false &&
await enableRulesets(rulesetConfig.enabledRulesets);
// We need to update the regex rules only when ruleset version changes.
if ( process.wakeupRun === false ) {
const currentVersion = getCurrentVersion();
if ( currentVersion !== rulesetConfig.version ) {
ubolLog(`Version change: ${rulesetConfig.version} => ${currentVersion}`);
rulesetConfig.version = currentVersion;
saveRulesetConfig();
if ( rulesetsUpdated === false ) {
updateDynamicRules();
}
}
if ( isNewVersion && rulesetsUpdated === false ) {
updateDynamicRules();
}
// Permissions may have been removed while the extension was disabled

View file

@ -24,13 +24,11 @@ import {
sessionRead, sessionWrite,
} from './ext.js';
import { defaultRulesetsFromLanguage } from './ruleset-manager.js';
/******************************************************************************/
export const rulesetConfig = {
version: '',
enabledRulesets: [ 'default' ],
enabledRulesets: [],
autoReload: true,
showBlockedCount: true,
strictBlockMode: true,
@ -67,7 +65,6 @@ export async function loadRulesetConfig() {
sessionWrite('rulesetConfig', rulesetConfig);
return;
}
rulesetConfig.enabledRulesets = await defaultRulesetsFromLanguage();
sessionWrite('rulesetConfig', rulesetConfig);
localWrite('rulesetConfig', rulesetConfig);
process.firstRun = true;

View file

@ -561,8 +561,6 @@ async function filteringModesToDNR(modes) {
/******************************************************************************/
async function defaultRulesetsFromLanguage() {
const out = await dnr.getEnabledRulesets();
const dropCountry = lang => {
const pos = lang.indexOf('-');
if ( pos === -1 ) { return lang; }
@ -581,7 +579,12 @@ async function defaultRulesetsFromLanguage() {
);
const rulesetDetails = await getRulesetDetails();
const out = [];
for ( const [ id, details ] of rulesetDetails ) {
if ( details.enabled ) {
out.push(id);
continue;
}
if ( typeof details.lang !== 'string' ) { continue; }
if ( reTargetLang.test(details.lang) === false ) { continue; }
out.push(id);
@ -591,6 +594,42 @@ async function defaultRulesetsFromLanguage() {
/******************************************************************************/
async function patchDefaultRulesets() {
const [
oldDefaultIds = [],
newDefaultIds,
newIds,
] = await Promise.all([
localRead('defaultRulesetIds'),
defaultRulesetsFromLanguage(),
getRulesetDetails(),
]);
const toAdd = [];
const toRemove = [];
for ( const id of newDefaultIds ) {
if ( oldDefaultIds.includes(id) ) { continue; }
toAdd.push(id);
}
for ( const id of oldDefaultIds ) {
if ( newDefaultIds.includes(id) ) { continue; }
toRemove.push(id);
}
for ( const id of rulesetConfig.enabledRulesets ) {
if ( newIds.has(id) ) { continue; }
toRemove.push(id);
}
localWrite('defaultRulesetIds', newDefaultIds);
if ( toAdd.length === 0 && toRemove.length === 0 ) { return; }
const enabledRulesets = new Set(rulesetConfig.enabledRulesets);
toAdd.forEach(id => enabledRulesets.add(id));
toRemove.forEach(id => enabledRulesets.delete(id));
const patchedRulesets = Array.from(enabledRulesets);
ubolLog(`Patched rulesets: ${rulesetConfig.enabledRulesets} => ${patchedRulesets}`);
rulesetConfig.enabledRulesets = patchedRulesets;
}
/******************************************************************************/
async function enableRulesets(ids) {
const afterIds = new Set(ids);
const [ beforeIds, adminIds, rulesetDetails ] = await Promise.all([
@ -679,6 +718,7 @@ export {
filteringModesToDNR,
getRulesetDetails,
getEnabledRulesetsDetails,
patchDefaultRulesets,
setStrictBlockMode,
updateDynamicRules,
};

View file

@ -20,21 +20,15 @@
*/
import { dom, qs$ } from './dom.js';
import { fetchJSON } from './fetch.js';
import { getEnabledRulesetsDetails } from './ruleset-manager.js';
import { i18n$ } from './i18n.js';
import { sendMessage } from './ext.js';
import { urlSkip } from './urlskip.js';
/******************************************************************************/
const toURL = new URL('about:blank');
function setURL(url) {
try {
toURL.href = url;
} catch(_) {
}
}
setURL(self.location.hash.slice(1));
const rulesetDetailsPromise = getEnabledRulesetsDetails();
/******************************************************************************/
@ -66,11 +60,43 @@ async function proceed() {
/******************************************************************************/
const toURL = new URL('about:blank');
try {
toURL.href = self.location.hash.slice(1);
} catch(_) {
}
dom.clear('#theURL > p > span:first-of-type');
qs$('#theURL > p > span:first-of-type').append(urlToFragment(toURL.href));
/******************************************************************************/
function fragmentFromTemplate(template, placeholder, text, details) {
const fragment = new DocumentFragment();
const pos = template.indexOf(placeholder);
if ( pos === -1 ) {
fragment.append(template);
return fragment;
}
const elem = document.createElement(details.tag);
const { attributes } = details;
if ( attributes ) {
for ( let i = 0; i < attributes.length; i+= 2 ) {
elem.setAttribute(attributes[i+0], attributes[i+1]);
}
}
elem.append(text);
fragment.append(
template.slice(0, pos),
elem,
template.slice(pos + placeholder.length)
);
return fragment;
}
/******************************************************************************/
// https://github.com/gorhill/uBlock/issues/691
// Parse URL to extract as much useful information as possible. This is
// useful to assist the user in deciding whether to navigate to the web page.
@ -152,16 +178,79 @@ qs$('#theURL > p > span:first-of-type').append(urlToFragment(toURL.href));
/******************************************************************************/
// Find which list caused the blocking.
(async ( ) => {
const rulesetDetails = await rulesetDetailsPromise;
let iList = -1;
const searchInList = async i => {
if ( iList !== -1 ) { return; }
const hostnames = new Set(
await fetchJSON(`/rulesets/strictblock/${rulesetDetails[i].id}`)
);
if ( iList !== -1 ) { return; }
let hn = toURL.hostname;
for (;;) {
if ( hostnames.has(hn) ) { iList = i; break; }
const pos = hn.indexOf('.');
if ( pos === -1 ) { break; }
hn = hn.slice(pos+1);
}
};
const toFetch = [];
for ( let i = 0; i < rulesetDetails.length; i++ ) {
if ( rulesetDetails[i].rules.strictblock === 0 ) { continue; }
toFetch.push(searchInList(i));
}
if ( toFetch.length === 0 ) { return; }
await Promise.all(toFetch);
if ( iList === -1 ) { return; }
const fragment = fragmentFromTemplate(
i18n$('strictblockReasonSentence1'),
'{{listname}}', rulesetDetails[iList].name,
{ tag: 'q' }
);
qs$('#reason').append(fragment);
dom.attr('#reason', 'hidden', null);
})();
/******************************************************************************/
// Offer to skip redirection whenever possible
(async ( ) => {
const rulesetDetails = await rulesetDetailsPromise;
const toFetch = [];
for ( const details of rulesetDetails ) {
if ( details.rules.urlskip === 0 ) { continue; }
toFetch.push(fetchJSON(`/rulesets/urlskip/${details.id}`));
}
if ( toFetch.length === 0 ) { return; }
const urlskipLists = await Promise.all(toFetch);
for ( const urlskips of urlskipLists ) {
for ( const urlskip of urlskips ) {
const re = new RegExp(urlskip.re, urlskip.c ? undefined : 'i');
if ( re.test(toURL.href) === false ) { continue; }
const finalURL = urlSkip(toURL.href, false, urlskip.steps);
if ( finalURL === undefined ) { continue; }
const fragment = fragmentFromTemplate(
i18n$('strictblockRedirectSentence1'),
'{{url}}', urlToFragment(finalURL),
{ tag: 'a', attributes: [ 'href', finalURL, 'class', 'code' ] }
);
qs$('#urlskip').append(fragment);
dom.attr('#urlskip', 'hidden', null);
return;
}
}
})();
/******************************************************************************/
// https://www.reddit.com/r/uBlockOrigin/comments/breeux/
if ( window.history.length > 1 ) {
dom.on('#back', 'click', ( ) => {
window.history.back();
});
dom.on('#back', 'click', ( ) => { window.history.back(); });
qs$('#bye').style.display = 'none';
} else {
dom.on('#bye', 'click', ( ) => {
window.close();
});
dom.on('#bye', 'click', ( ) => { window.close(); });
qs$('#back').style.display = 'none';
}
@ -171,8 +260,8 @@ dom.on('#disableWarning', 'change', ev => {
dom.cl.toggle('[data-i18n="strictblockClose"]', 'disabled', checked);
});
dom.on('#proceed', 'click', ( ) => {
proceed();
});
dom.on('#proceed', 'click', ( ) => { proceed(); });
dom.cl.remove(dom.body, 'loading');
/******************************************************************************/

View file

@ -225,7 +225,7 @@ const isRegex = rule =>
rule.condition.regexFilter !== undefined;
const isRedirect = rule => {
if ( rule.action === undefined ) { return false; }
if ( isUnsupported(rule) ) { return false; }
if ( rule.action.type !== 'redirect' ) { return false; }
if ( rule.action.redirect?.extensionPath !== undefined ) { return true; }
if ( rule.action.redirect?.transform?.path !== undefined ) { return true; }
@ -233,19 +233,26 @@ const isRedirect = rule => {
};
const isModifyHeaders = rule =>
rule.action !== undefined &&
isUnsupported(rule) === false &&
rule.action.type === 'modifyHeaders';
const isRemoveparam = rule =>
rule.action !== undefined &&
isUnsupported(rule) === false &&
rule.action.type === 'redirect' &&
rule.action.redirect.transform !== undefined;
const isGood = rule =>
const isSafe = rule =>
isUnsupported(rule) === false &&
isRedirect(rule) === false &&
isModifyHeaders(rule) === false &&
isRemoveparam(rule) === false;
rule.action !== undefined && (
rule.action.type === 'block' ||
rule.action.type === 'allow' ||
rule.action.type === 'allowAllRequests'
);
const isURLSkip = rule =>
isUnsupported(rule) === false &&
rule.action !== undefined &&
rule.action.type === 'urlskip';
/******************************************************************************/
@ -357,7 +364,7 @@ async function processNetworkFilters(assetDetails, network) {
}
}
const plainGood = rules.filter(rule => isGood(rule) && isRegex(rule) === false);
const plainGood = rules.filter(rule => isSafe(rule) && isRegex(rule) === false);
log(`\tPlain good: ${plainGood.length}`);
log(plainGood
.filter(rule => Array.isArray(rule._warning))
@ -365,7 +372,7 @@ async function processNetworkFilters(assetDetails, network) {
.join('\n'), true
);
const regexes = rules.filter(rule => isGood(rule) && isRegex(rule));
const regexes = rules.filter(rule => isSafe(rule) && isRegex(rule));
log(`\tMaybe good (regexes): ${regexes.length}`);
const redirects = rules.filter(rule =>
@ -394,6 +401,22 @@ async function processNetworkFilters(assetDetails, network) {
);
log(`\tmodifyHeaders=: ${modifyHeaders.length}`);
const urlskips = rules.filter(rule => isURLSkip(rule)).filter(rule =>
rule.__modifierAction === 0 &&
rule.condition &&
rule.condition.regexFilter &&
rule.condition.resourceTypes &&
rule.condition.resourceTypes.includes('main_frame')
).map(rule => {
const steps = rule.__modifierValue;
return {
re: rule.condition.regexFilter,
c: rule.condition.isUrlFilterCaseSensitive,
steps: steps.includes(' ') && steps.split(/ +/) || [ steps ],
};
});
log(`\turlskip=: ${urlskips.length}`);
const bad = rules.filter(rule =>
isUnsupported(rule)
);
@ -460,6 +483,13 @@ async function processNetworkFilters(assetDetails, network) {
);
}
if ( urlskips.length !== 0 ) {
writeFile(
`${rulesetDir}/urlskip/${assetDetails.id}.json`,
JSON.stringify(urlskips, null, 1)
);
}
return {
total: rules.length,
plain: plainGood.length,
@ -470,6 +500,7 @@ async function processNetworkFilters(assetDetails, network) {
redirect: redirects.length,
modifyHeaders: modifyHeaders.length,
strictblock: strictBlocked.size,
urlskip: urlskips.length,
};
}
@ -1114,6 +1145,7 @@ async function rulesetFromURLs(assetDetails) {
redirect: netStats.redirect,
modifyHeaders: netStats.modifyHeaders,
strictblock: netStats.strictblock,
urlskip: netStats.urlskip,
discarded: netStats.discarded,
rejected: netStats.rejected,
},
@ -1264,6 +1296,14 @@ async function main() {
});
// Handpicked rulesets from abroad
await rulesetFromURLs({
id: 'nrd.30day.phishing',
name: '30-day Phishing Domain List',
enabled: true,
urls: [ 'https://raw.githubusercontent.com/xRuffKez/NRD/refs/heads/main/lists/30-day_phishing/domains-only/nrd-phishing-30day.txt' ],
homeURL: 'https://github.com/xRuffKez/NRD?tab=readme-ov-file',
});
await rulesetFromURLs({
id: 'stevenblack-hosts',
name: 'Steven Blacks Unified Hosts (adware + malware)',

View file

@ -10,20 +10,26 @@
<link rel="stylesheet" href="css/strictblock.css">
<link rel="shortcut icon" type="image/png" href="img/icon_64.png"/>
</head>
<body>
<body class="loading">
<div id="rootContainer">
<div id="warningSign">
<a class="fa-icon" href="https://github.com/gorhill/uBlock/wiki/Strict-blocking" target="_blank" rel="noopener noreferrer">exclamation-triangle</a>
</div>
<div>
<p data-i18n="strictblockSentence1">_</p>
<p data-i18n="strictblockSentence1"></p>
<div id="theURL" class="collapsed">
<p class="code"><span>&nbsp;</span><span id="toggleParse" class="hidden"><span class="fa-icon">zoom-in</span><span class="fa-icon">zoom-out</span></span></p>
<ul id="parsed"></ul>
</div>
</div>
<div id="reason" hidden>
</div>
<div id="urlskip" hidden>
</div>
<div class="li">
<label><span class="input checkbox"><input type="checkbox" id="disableWarning"><svg viewBox="0 0 24 24"><path d="M1.73,12.91 8.1,19.28 22.79,4.59"/></svg></span><span data-i18n="strictblockDontWarn">_</span></label>
</div>

View file

@ -1192,7 +1192,7 @@
"description": "Button text to navigate to the blocked page"
},
"docblockedRedirectPrompt": {
"message": "The blocked page wants to redirect to another site. If you choose to proceed, you will navigate directly to: {{url}}",
"message": "Halaman yang terblokir ingin dialihkan ke situs lain. Jika Anda memilih untuk melanjutkan, Anda akan langsung menuju ke: {{url}}",
"description": "Text warning about an incoming redirect"
},
"cloudPush": {

View file

@ -73,6 +73,7 @@ const hiddenSettingsDefault = {
loggerPopupType: 'popup',
manualUpdateAssetFetchPeriod: 500,
modifyWebextFlavor: 'unset',
noScriptingCSP: 'script-src http: https:',
popupFontSize: 'unset',
popupPanelDisabledSections: 0,
popupPanelHeightMode: 0,
@ -254,7 +255,6 @@ const µBlock = { // jshint ignore:line
scriptlets: {},
cspNoInlineScript: "script-src 'unsafe-eval' * blob: data:",
cspNoScripting: 'script-src http: https:',
cspNoInlineFont: 'font-src *',
liveBlockingProfiles: [],

View file

@ -804,6 +804,9 @@ const onMessage = function(request, sender, callback) {
case 'shouldRenderNoscriptTags': {
if ( pageStore === null ) { break; }
if ( µb.hiddenSettings.noScriptingCSP !== µb.hiddenSettingsDefault.noScriptingCSP ) {
break;
}
const fctxt = µb.filteringContext.fromTabId(sender.tabId);
if ( pageStore.filterScripting(fctxt, undefined) ) {
vAPI.tabs.executeScript(sender.tabId, {
@ -1884,7 +1887,11 @@ const onMessage = function(request, sender, callback) {
listPromises.push(
io.get(assetKey, { dontCache: true }).then(details => {
listNames.push(assetKey);
return { name: assetKey, text: details.content };
return {
name: assetKey,
text: details.content,
trustedSource: assetKey.startsWith('ublock-'),
};
})
);
}
@ -2009,7 +2016,7 @@ const logCSPViolations = function(pageStore, request) {
fctxt.type = 'script';
fctxt.filter = undefined;
if ( pageStore.filterScripting(fctxt, true) === 1 ) {
cspData.set(µb.cspNoScripting, fctxt.filter);
cspData.set(µb.hiddenSettings.noScriptingCSP, fctxt.filter);
}
fctxt.type = 'inline-font';

View file

@ -1063,7 +1063,9 @@ const PageStore = class {
this.largeMediaTimer.on(500);
}
const size = headers.contentLength;
if ( isNaN(size) ) { return 0; }
if ( isNaN(size) ) {
return µb.userSettings.largeMediaSize === 0 ? 1 : 0;
}
if ( (size >>> 10) < µb.userSettings.largeMediaSize ) { return 0; }
this.largeMediaCount += 1;
this.largeMediaTimer.on(500);

View file

@ -229,7 +229,7 @@ export function removeAttr(
if ( rawToken === '' ) { return; }
const safe = safeSelf();
const logPrefix = safe.makeLogPrefix('remove-attr', rawToken, rawSelector, behavior);
const tokens = rawToken.split(/\s*\|\s*/);
const tokens = safe.String_split.call(rawToken, /\s*\|\s*/);
const selector = tokens
.map(a => `${rawSelector}[${CSS.escape(a)}]`)
.join(',');
@ -289,7 +289,7 @@ export function removeAttr(
subtree: true,
});
};
runAt(( ) => { start(); }, behavior.split(/\s+/));
runAt(( ) => { start(); }, safe.String_split.call(behavior, /\s+/));
}
registerScriptlet(removeAttr, {
name: 'remove-attr.js',

View file

@ -53,7 +53,8 @@ registerScriptlet(getSafeCookieValuesFn, {
/******************************************************************************/
export function getAllCookiesFn() {
return document.cookie.split(/\s*;\s*/).map(s => {
const safe = safeSelf();
return safe.String_split.call(document.cookie, /\s*;\s*/).map(s => {
const pos = s.indexOf('=');
if ( pos === 0 ) { return; }
if ( pos === -1 ) { return `${s.trim()}=`; }
@ -64,6 +65,9 @@ export function getAllCookiesFn() {
}
registerScriptlet(getAllCookiesFn, {
name: 'get-all-cookies.fn',
dependencies: [
safeSelf,
],
});
/******************************************************************************/
@ -71,7 +75,8 @@ registerScriptlet(getAllCookiesFn, {
export function getCookieFn(
name = ''
) {
for ( const s of document.cookie.split(/\s*;\s*/) ) {
const safe = safeSelf();
for ( const s of safe.String_split.call(document.cookie, /\s*;\s*/) ) {
const pos = s.indexOf('=');
if ( pos === -1 ) { continue; }
if ( s.slice(0, pos) !== name ) { continue; }
@ -80,6 +85,9 @@ export function getCookieFn(
}
registerScriptlet(getCookieFn, {
name: 'get-cookie.fn',
dependencies: [
safeSelf,
],
});
/******************************************************************************/
@ -349,7 +357,7 @@ export function removeCookie(
}, ms);
};
const remove = ( ) => {
document.cookie.split(';').forEach(cookieStr => {
safe.String_split.call(document.cookie, ';').forEach(cookieStr => {
const pos = cookieStr.indexOf('=');
if ( pos === -1 ) { return; }
const cookieName = cookieStr.slice(0, pos).trim();
@ -387,7 +395,7 @@ export function removeCookie(
window.addEventListener('beforeunload', remove);
if ( typeof extraArgs.when !== 'string' ) { return; }
const supportedEventTypes = [ 'scroll', 'keydown' ];
const eventTypes = extraArgs.when.split(/\s/);
const eventTypes = safe.String_split.call(extraArgs.when, /\s/);
for ( const type of eventTypes ) {
if ( supportedEventTypes.includes(type) === false ) { continue; }
document.addEventListener(type, ( ) => {

View file

@ -52,7 +52,7 @@ export function proxyApplyFn(
}
reflect() {
const r = Reflect.construct(this.callFn, this.callArgs);
this.callFn = this.callArgs = undefined;
this.callFn = this.callArgs = this.private = undefined;
proxyApplyFn.ctorContexts.push(this);
return r;
}
@ -75,7 +75,7 @@ export function proxyApplyFn(
}
reflect() {
const r = Reflect.apply(this.callFn, this.thisArg, this.callArgs);
this.callFn = this.thisArg = this.callArgs = undefined;
this.callFn = this.thisArg = this.callArgs = this.private = undefined;
proxyApplyFn.applyContexts.push(this);
return r;
}

View file

@ -38,7 +38,8 @@ import { validateConstantFn } from './set-constant.js';
*
* @param argposRaw
* The zero-based position of the argument in the argument list. Use a negative
* number for a position relative to the last argument.
* number for a position relative to the last argument. Use literal `this` to
* replace the value used in `prototype`-based methods.
*
* @param argraw
* The replacement value, validated using the same heuristic as with the
@ -71,25 +72,39 @@ export function trustedReplaceArgument(
const reCondition = extraArgs.condition
? safe.patternToRegex(extraArgs.condition)
: /^/;
proxyApplyFn(propChain, function(context) {
const getArg = context => {
if ( argposRaw === 'this' ) { return context.thisArg; }
const { callArgs } = context;
if ( argposRaw === '' ) {
safe.uboLog(logPrefix, `Arguments:\n${callArgs.join('\n')}`);
return context.reflect();
}
const argpos = argoffset >= 0 ? argoffset : callArgs.length - argoffset;
if ( argpos < 0 || argpos >= callArgs.length ) {
if ( argpos < 0 || argpos >= callArgs.length ) { return; }
context.private = { argpos };
return callArgs[argpos];
};
const setArg = (context, value) => {
if ( argposRaw === 'this' ) {
if ( value !== context.thisArg ) {
context.thisArg = value;
}
} else if ( context.private ) {
context.callArgs[context.private.argpos] = value;
}
};
proxyApplyFn(propChain, function(context) {
if ( argposRaw === '' ) {
safe.uboLog(logPrefix, `Arguments:\n${context.callArgs.join('\n')}`);
return context.reflect();
}
const argBefore = callArgs[argpos];
const argBefore = getArg(context);
if ( safe.RegExp_test.call(reCondition, argBefore) === false ) {
return context.reflect();
}
const argAfter = replacer && typeof argBefore === 'string'
? argBefore.replace(replacer.re, replacer.replacement)
: value;
callArgs[argpos] = argAfter;
safe.uboLog(logPrefix, `Replaced argument:\nBefore: ${JSON.stringify(argBefore)}\nAfter: ${argAfter}`);
if ( argAfter !== argBefore ) {
setArg(context, argAfter);
safe.uboLog(logPrefix, `Replaced argument:\nBefore: ${JSON.stringify(argBefore)}\nAfter: ${argAfter}`);
}
return context.reflect();
});
}

View file

@ -51,6 +51,7 @@ export function safeSelf() {
'RegExp_exec': self.RegExp.prototype.exec,
'Request_clone': self.Request.prototype.clone,
'String_fromCharCode': String.fromCharCode,
'String_split': String.prototype.split,
'XMLHttpRequest': self.XMLHttpRequest,
'addEventListener': self.EventTarget.prototype.addEventListener,
'removeEventListener': self.EventTarget.prototype.removeEventListener,

View file

@ -192,7 +192,7 @@ function abortCurrentScriptCore(
const reContext = safe.patternToRegex(context);
const extraArgs = safe.getExtraArgs(Array.from(arguments), 3);
const thisScript = document.currentScript;
const chain = target.split('.');
const chain = safe.String_split.call(target, '.');
let owner = window;
let prop;
for (;;) {
@ -406,6 +406,7 @@ builtinScriptlets.push({
dependencies: [
'matches-stack-trace.fn',
'object-find-owner.fn',
'safe-self.fn',
],
});
// When no "prune paths" argument is provided, the scriptlet is
@ -422,11 +423,12 @@ function objectPruneFn(
extraArgs = {}
) {
if ( typeof rawPrunePaths !== 'string' ) { return; }
const safe = safeSelf();
const prunePaths = rawPrunePaths !== ''
? rawPrunePaths.split(/ +/)
? safe.String_split.call(rawPrunePaths, / +/)
: [];
const needlePaths = prunePaths.length !== 0 && rawNeedlePaths !== ''
? rawNeedlePaths.split(/ +/)
? safe.String_split.call(rawNeedlePaths, / +/)
: [];
if ( stackNeedleDetails.matchAll !== true ) {
if ( matchesStackTrace(stackNeedleDetails, extraArgs.logstack) === false ) {
@ -547,7 +549,7 @@ function matchesStackTrace(
// Normalize stack trace
const reLine = /(.*?@)?(\S+)(:\d+):\d+\)?$/;
const lines = [];
for ( let line of error.stack.split(/[\n\r]+/) ) {
for ( let line of safe.String_split.call(error.stack, /[\n\r]+/) ) {
if ( line.includes(exceptionToken) ) { continue; }
line = line.trim();
const match = safe.RegExp_exec.call(reLine, line);
@ -594,8 +596,8 @@ function parsePropertiesToMatch(propsToMatch, implicit = '') {
const needles = new Map();
if ( propsToMatch === undefined || propsToMatch === '' ) { return needles; }
const options = { canNegate: true };
for ( const needle of propsToMatch.split(/\s+/) ) {
const [ prop, pattern ] = needle.split(':');
for ( const needle of safe.String_split.call(propsToMatch, /\s+/) ) {
const [ prop, pattern ] = safe.String_split.call(needle, ':');
if ( prop === '' ) { continue; }
if ( pattern !== undefined ) {
needles.set(prop, safe.initPattern(pattern, options));
@ -1643,7 +1645,7 @@ function noFetchIf(
const safe = safeSelf();
const logPrefix = safe.makeLogPrefix('prevent-fetch', propsToMatch, responseBody, responseType);
const needles = [];
for ( const condition of propsToMatch.split(/\s+/) ) {
for ( const condition of safe.String_split.call(propsToMatch, /\s+/) ) {
if ( condition === '' ) { continue; }
const pos = condition.indexOf(':');
let key, value;
@ -1797,7 +1799,7 @@ function removeClass(
if ( rawToken === '' ) { return; }
const safe = safeSelf();
const logPrefix = safe.makeLogPrefix('remove-class', rawToken, rawSelector, behavior);
const tokens = rawToken.split(/\s*\|\s*/);
const tokens = safe.String_split.call(rawToken, /\s*\|\s*/);
const selector = tokens
.map(a => `${rawSelector}.${CSS.escape(a)}`)
.join(',');
@ -2510,12 +2512,12 @@ function m3uPrune(
}
text = before.trim() + '\n' + after.trim();
reM3u.lastIndex = before.length + 1;
toLog.push('Discarding', ...discard.split(/\n+/).map(s => `\t${s}`));
toLog.push('Discarding', ...safe.String_split.call(discard, /\n+/).map(s => `\t${s}`));
if ( reM3u.global === false ) { break; }
}
return text;
}
const lines = text.split(/\n\r|\n|\r/);
const lines = safe.String_split.call(text, /\n\r|\n|\r/);
for ( let i = 0; i < lines.length; i++ ) {
if ( lines[i] === undefined ) { continue; }
if ( pruneSpliceoutBlock(lines, i) ) { continue; }
@ -2758,13 +2760,17 @@ function hrefSanitizer(
builtinScriptlets.push({
name: 'call-nothrow.js',
fn: callNothrow,
dependencies: [
'safe-self.fn',
],
});
function callNothrow(
chain = ''
) {
if ( typeof chain !== 'string' ) { return; }
if ( chain === '' ) { return; }
const parts = chain.split('.');
const safe = safeSelf();
const parts = safe.String_split.call(chain, '.');
let owner = window, prop;
for (;;) {
prop = parts.shift();
@ -3095,7 +3101,7 @@ function trustedClickElement(
const logPrefix = safe.makeLogPrefix('trusted-click-element', selectors, extraMatch, delay);
if ( extraMatch !== '' ) {
const assertions = extraMatch.split(',').map(s => {
const assertions = safe.String_split.call(extraMatch, ',').map(s => {
const pos1 = s.indexOf(':');
const s1 = pos1 !== -1 ? s.slice(0, pos1) : s;
const not = s1.startsWith('!');
@ -3163,7 +3169,7 @@ function trustedClickElement(
return shadowRoot && querySelectorEx(inside, shadowRoot);
};
const selectorList = selectors.split(/\s*,\s*/)
const selectorList = safe.String_split.call(selectors, /\s*,\s*/)
.filter(s => {
try {
void querySelectorEx(s);
@ -3290,10 +3296,10 @@ function trustedPruneInboundObject(
const extraArgs = safe.getExtraArgs(Array.from(arguments), 4);
const needlePaths = [];
if ( rawPrunePaths !== '' ) {
needlePaths.push(...rawPrunePaths.split(/ +/));
needlePaths.push(...safe.String_split.call(rawPrunePaths, / +/));
}
if ( rawNeedlePaths !== '' ) {
needlePaths.push(...rawNeedlePaths.split(/ +/));
needlePaths.push(...safe.String_split.call(rawNeedlePaths, / +/));
}
const stackNeedle = safe.initPattern(extraArgs.stackToMatch || '', { canNegate: true });
const mustProcess = root => {
@ -3455,7 +3461,7 @@ function trustedSuppressNativeMethod(
if ( stack !== '' ) { return; }
const safe = safeSelf();
const logPrefix = safe.makeLogPrefix('trusted-suppress-native-method', methodPath, signature, how);
const signatureArgs = signature.split(/\s*\|\s*/).map(v => {
const signatureArgs = safe.String_split.call(signature, /\s*\|\s*/).map(v => {
if ( /^".*"$/.test(v) ) {
return { type: 'pattern', re: safe.patternToRegex(v.slice(1, -1)) };
}

View file

@ -61,6 +61,7 @@ export function validateConstantFn(trusted, raw, extraArgs = {}) {
} else if ( raw.startsWith('{') && raw.endsWith('}') ) {
try { value = safe.JSON_parse(raw).value; } catch(ex) { return; }
}
return raw;
} else {
return;
}

View file

@ -284,6 +284,7 @@ function addToDNR(context, list) {
toDNR: true,
nativeCssHas: env.includes('native_css_has'),
badTypes: [ sfp.NODE_TYPE_NET_OPTION_NAME_REDIRECTRULE ],
trustedSource: list.trustedSource || undefined,
});
const compiler = staticNetFilteringEngine.createCompiler();

View file

@ -28,6 +28,7 @@ import BidiTrieContainer from './biditrie.js';
import { CompiledListReader } from './static-filtering-io.js';
import { FilteringContext } from './filtering-context.js';
import HNTrieContainer from './hntrie.js';
import { urlSkip } from './urlskip.js';
/******************************************************************************/
@ -4679,6 +4680,25 @@ StaticNetFilteringEngine.prototype.dnrFromCompiled = function(op, context, ...ar
dnrAddRuleError(rule, `Incompatible with DNR: uritransform=${rule.__modifierValue}`);
break;
}
case 'urlskip': {
let urlFilter = rule.condition?.urlFilter;
if ( urlFilter === undefined ) { break; }
let anchor = 0b000;
if ( urlFilter.startsWith('||') ) {
anchor |= 0b100;
urlFilter = urlFilter.slice(2);
} else if ( urlFilter.startsWith('|') ) {
anchor |= 0b10;
urlFilter = urlFilter.slice(1);
}
if ( urlFilter.endsWith('|') ) {
anchor |= 0b001;
urlFilter = urlFilter.slice(0, -1);
}
rule.condition.urlFilter = undefined;
rule.condition.regexFilter = restrFromGenericPattern(urlFilter, anchor);
break;
}
default:
dnrAddRuleError(rule, `Unsupported modifier ${rule.__modifierType}`);
break;
@ -5391,57 +5411,6 @@ StaticNetFilteringEngine.prototype.transformRequest = function(fctxt, out = [])
return out;
};
/**
* @trustedOption urlskip
*
* @description
* Extract a URL from another URL according to one or more transformation steps,
* thereby skipping over intermediate network request(s) to remote servers.
* Requires a trusted source.
*
* @param steps
* A serie of space-separated directives representing the transformation steps
* to perform to extract the final URL to which a network request should be
* redirected.
*
* Supported directives:
*
* `?name`: extract the value of parameter `name` as the current string.
*
* `&i`: extract the name of the parameter at position `i` as the current
* string. The position is 1-based.
*
* `/.../`: extract the first capture group of a regex as the current string.
*
* `+https`: prepend the current string with `https://`.
*
* `-base64`: decode the current string as a base64-encoded string.
*
* `-safebase64`: decode the current string as a safe base64-encoded string.
*
* `-uricomponent`: decode the current string as a URI encoded string.
*
* `-blocked`: allow the redirection of blocked requests. By default, blocked
* requests can't by urlskip'ed.
*
* At any given step, the currently extracted string may not necessarily be
* a valid URL, and more transformation steps may be needed to obtain a valid
* URL once all the steps are applied.
*
* An unsupported step or a failed step will abort the transformation and no
* redirection will be performed.
*
* The final step is expected to yield a valid URL. If the result is not a
* valid URL, no redirection will be performed.
*
* @example
* ||example.com/path/to/tracker$urlskip=?url
* ||example.com/path/to/tracker$urlskip=?url ?to
* ||pixiv.net/jump.php?$urlskip=&1
* ||podtrac.com/pts/redirect.mp3/$urlskip=/\/redirect\.mp3\/(.*?\.mp3\b)/ +https
*
* */
StaticNetFilteringEngine.prototype.urlSkip = function(
fctxt,
blocked,
@ -5458,7 +5427,7 @@ StaticNetFilteringEngine.prototype.urlSkip = function(
const urlin = fctxt.url;
const value = directive.value;
const steps = value.includes(' ') && value.split(/ +/) || [ value ];
const urlout = urlSkip(directive, urlin, blocked, steps);
const urlout = urlSkip(urlin, blocked, steps, directive);
if ( urlout === undefined ) { continue; }
if ( urlout === urlin ) { continue; }
fctxt.redirectURL = urlout;
@ -5469,91 +5438,6 @@ StaticNetFilteringEngine.prototype.urlSkip = function(
return out;
};
function urlSkip(directive, url, blocked, steps) {
try {
let redirectBlocked = false;
let urlout = url;
for ( const step of steps ) {
const urlin = urlout;
const c0 = step.charCodeAt(0);
// Extract from URL parameter name at position i
if ( c0 === 0x26 ) { // &
const i = (parseInt(step.slice(1)) || 0) - 1;
if ( i < 0 ) { return; }
const url = new URL(urlin);
if ( i >= url.searchParams.size ) { return; }
const params = Array.from(url.searchParams.keys());
urlout = decodeURIComponent(params[i]);
continue;
}
// Enforce https
if ( c0 === 0x2B && step === '+https' ) {
const s = urlin.replace(/^https?:\/\//, '');
if ( /^[\w-]:\/\//.test(s) ) { return; }
urlout = `https://${s}`;
continue;
}
// Decode
if ( c0 === 0x2D ) {
// Base64
if ( step === '-base64' ) {
urlout = self.atob(urlin);
continue;
}
// Safe Base64
if ( step === '-safebase64' ) {
urlout = urlin.replace(/[-_]/g, safeBase64Replacer);
urlout = self.atob(urlout);
continue;
}
// URI component
if ( step === '-uricomponent' ) {
urlout = self.decodeURIComponent(urlin);
continue;
}
// Enable skip of blocked requests
if ( step === '-blocked' ) {
redirectBlocked = true;
continue;
}
}
// Regex extraction from first capture group
if ( c0 === 0x2F ) { // /
if ( directive.cache === null ) {
directive.cache = new RegExp(step.slice(1, -1));
}
const match = directive.cache.exec(urlin);
if ( match === null ) { return; }
if ( match.length <= 1 ) { return; }
urlout = match[1];
continue;
}
// Extract from URL parameter
if ( c0 === 0x3F ) { // ?
urlout = (new URL(urlin)).searchParams.get(step.slice(1));
if ( urlout === null ) { return; }
if ( urlout.includes(' ') ) {
urlout = urlout.replace(/ /g, '%20');
}
continue;
}
// Unknown directive
return;
}
const urlfinal = new URL(urlout);
if ( urlfinal.protocol !== 'https:' ) {
if ( urlfinal.protocol !== 'http:' ) { return; }
urlout = urlout.replace('http', 'https');
}
if ( blocked && redirectBlocked !== true ) { return; }
return urlout;
} catch(x) {
}
}
const safeBase64Map = { '-': '+', '_': '/' };
const safeBase64Replacer = s => safeBase64Map[s];
/******************************************************************************/
// https://github.com/uBlockOrigin/uBlock-issues/issues/1626

View file

@ -261,7 +261,7 @@ const hasOwnProperty = (o, p) =>
hsDefault[name] = hsAdmin[name] = hsUser[name] = value;
}
}
µb.noDashboard = disableDashboard === true;
µb.noDashboard = disableDashboard == true;
if ( Array.isArray(disabledPopupPanelParts) ) {
const partNameToBit = new Map([
[ 'globalStats', 0b00010 ],

View file

@ -969,7 +969,7 @@ const injectCSP = function(fctxt, pageStore, responseHeaders) {
const builtinDirectives = [];
if ( pageStore.filterScripting(fctxt, true) === 1 ) {
builtinDirectives.push(µb.cspNoScripting);
builtinDirectives.push(µb.hiddenSettings.noScriptingCSP);
if ( logger.enabled ) {
fctxt.setRealm('network').setType('scripting').toLogger();
}

157
src/js/urlskip.js Normal file
View file

@ -0,0 +1,157 @@
/*******************************************************************************
uBlock Origin - a comprehensive, efficient content blocker
Copyright (C) 2022-present Raymond Hill
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see {http://www.gnu.org/licenses/}.
Home: https://github.com/gorhill/uBlock
*/
const safeBase64Map = { '-': '+', '_': '/' };
const safeBase64Replacer = s => safeBase64Map[s];
/**
* @trustedOption urlskip
*
* @description
* Extract a URL from another URL according to one or more transformation steps,
* thereby skipping over intermediate network request(s) to remote servers.
* Requires a trusted source.
*
* @param steps
* A serie of space-separated directives representing the transformation steps
* to perform to extract the final URL to which a network request should be
* redirected.
*
* Supported directives:
*
* `?name`: extract the value of parameter `name` as the current string.
*
* `&i`: extract the name of the parameter at position `i` as the current
* string. The position is 1-based.
*
* `/.../`: extract the first capture group of a regex as the current string.
*
* `+https`: prepend the current string with `https://`.
*
* `-base64`: decode the current string as a base64-encoded string.
*
* `-safebase64`: decode the current string as a safe base64-encoded string.
*
* `-uricomponent`: decode the current string as a URI encoded string.
*
* `-blocked`: allow the redirection of blocked requests. By default, blocked
* requests can't by urlskip'ed.
*
* At any given step, the currently extracted string may not necessarily be
* a valid URL, and more transformation steps may be needed to obtain a valid
* URL once all the steps are applied.
*
* An unsupported step or a failed step will abort the transformation and no
* redirection will be performed.
*
* The final step is expected to yield a valid URL. If the result is not a
* valid URL, no redirection will be performed.
*
* @example
* ||example.com/path/to/tracker$urlskip=?url
* ||example.com/path/to/tracker$urlskip=?url ?to
* ||pixiv.net/jump.php?$urlskip=&1
* ||podtrac.com/pts/redirect.mp3/$urlskip=/\/redirect\.mp3\/(.*?\.mp3\b)/ +https
*
* */
export function urlSkip(url, blocked, steps, directive = {}) {
try {
let redirectBlocked = false;
let urlout = url;
for ( const step of steps ) {
const urlin = urlout;
const c0 = step.charCodeAt(0);
// Extract from URL parameter name at position i
if ( c0 === 0x26 ) { // &
const i = (parseInt(step.slice(1)) || 0) - 1;
if ( i < 0 ) { return; }
const url = new URL(urlin);
if ( i >= url.searchParams.size ) { return; }
const params = Array.from(url.searchParams.keys());
urlout = decodeURIComponent(params[i]);
continue;
}
// Enforce https
if ( c0 === 0x2B && step === '+https' ) {
const s = urlin.replace(/^https?:\/\//, '');
if ( /^[\w-]:\/\//.test(s) ) { return; }
urlout = `https://${s}`;
continue;
}
// Decode
if ( c0 === 0x2D ) {
// Base64
if ( step === '-base64' ) {
urlout = self.atob(urlin);
continue;
}
// Safe Base64
if ( step === '-safebase64' ) {
urlout = urlin.replace(/[-_]/g, safeBase64Replacer);
urlout = self.atob(urlout);
continue;
}
// URI component
if ( step === '-uricomponent' ) {
urlout = self.decodeURIComponent(urlin);
continue;
}
// Enable skip of blocked requests
if ( step === '-blocked' ) {
redirectBlocked = true;
continue;
}
}
// Regex extraction from first capture group
if ( c0 === 0x2F ) { // /
const re = directive.cache ?? new RegExp(step.slice(1, -1));
if ( directive.cache === null ) {
directive.cache = re;
}
const match = re.exec(urlin);
if ( match === null ) { return; }
if ( match.length <= 1 ) { return; }
urlout = match[1];
continue;
}
// Extract from URL parameter
if ( c0 === 0x3F ) { // ?
urlout = (new URL(urlin)).searchParams.get(step.slice(1));
if ( urlout === null ) { return; }
if ( urlout.includes(' ') ) {
urlout = urlout.replace(/ /g, '%20');
}
continue;
}
// Unknown directive
return;
}
const urlfinal = new URL(urlout);
if ( urlfinal.protocol !== 'https:' ) {
if ( urlfinal.protocol !== 'http:' ) { return; }
urlout = urlout.replace('http', 'https');
}
if ( blocked && redirectBlocked !== true ) { return; }
return urlout;
} catch(x) {
}
}

View file

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
<policyDefinitionResources xmlns:xsd="https://www.w3.org/2001/XMLSchema" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.microsoft.com/GroupPolicy/PolicyDefinitions" revision="1.0" schemaVersion="1.0">
<displayName>Contoso Company base file</displayName>
<description>This file contains the Contoso parent category.
</description>
<resources>
<stringTable>
<string id="V1_0_0_1">uBlock Origin v1.0.0.1 or later</string>
<string id="V1_3_2">uBlock Origin v1.3.2 or later</string>
<string id="V1_33_0">uBlock Origin v1.33.0 or later</string>
<string id="uBlockCategory">uBlock Origin</string>
<string id="GoogleChrome">Google Chrome</string>
<string id="MicrosoftEdge">Microsoft Edge</string>
<string id="MozillaFirefox">Mozilla Firefox</string>
<string id="adminSettings">Apply an exported configuration (adminSettings)</string>
<string id="advancedSettings">Advanced settings to overwrite</string>
<string id="userSettings">User settings to overwrite</string>
<string id="disableDashboard">Prevent access to uBO's dashboard</string>
<string id="disabledPopupPanelParts">Popup panel parts to disable</string>
<string id="toAdd">Settings to add at launch time</string>
<string id="toOverwrite">Settings to overwrite at launch time</string>
<string id="adminSettings_Help">A valid JSON string compliant with uBO's backup format.
Administrators can force specific configurations to deployed uBlock Origin (uBO). At launch time, uBO will look for a setting named adminSettings, and if it exists, it will parse, extract and overwrite a user's settings with the administrator-assigned ones.
Configure uBO as you wish for your users, then create a backup using the "Backup to file" in the Settings pane. Now open this backup file using a text editor, and remove all entries you do not want to overwrite, while taking care to end up with a valid JSON file (mind trailing commas, etc.). All the entries left are the ones which will be overwritten on the user's side.
Example value:
{"userSettings": {"colorBlindFriendly": true}}
https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin
</string>
<string id="userSettings_Help">A list of [name,value] pairs to populate user settings
Each entry in the array is an array consisting of a pair of name-value strings. Each name string must be a supported user setting, and each value string must properly resolve to a supported value.
Every valid entry will be used to overwrite the corresponding default user setting at launch time.
Example value:
[[ "contextMenuEnabled", "false" ],[ "dynamicFilteringEnabled", "false" ]]
https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin:-configuration#usersettings</string>
<string id="advancedSettings_Help">A list of [name,value] pairs to populate advanced settings
Each entry in the array is an array consisting of a pair of name-value strings. Each name string must be a supported advanced setting, and each value string must properly resolve to a supported value.
Every valid entry will be used to overwrite the corresponding default advanced setting, and will also become read-only, i.e. the user won't be able to change it.
Example value:
[[ "disableWebAssembly", "true" ]]
https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin:-configuration#advancedsettings</string>
<string id="disableDashboard_Help">Set to true to prevent access to configuration options
https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin:-configuration#disabledashboard</string>
<string id="disabledPopupPanelParts_Help">An array of strings, where each string refer to a part of the popup panel which should be removed from view. Current supported named parts:
globalStats: remove access to "Blocked since install" statistic.
basicTools: remove access to basic tools.
extraTools: remove access to per-site switches.
overviewPane: remove access to the overview pane.
Example value:
["globalStats","overviewPane"]
https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin:-configuration#disabledpopuppanelparts</string>
<string id="toAdd_Help">The properties in the toAdd branch will append to the already present local settings. Currently, the following properties are supported:
trustedSiteDirectives
The trustedSiteDirectives property is an array of string, each of which must resolve into a valid trusted-site directive, used to dictate where uBO must be disabled.
Example value:
{"trustedSiteDirectives": ["example.com","example.org"]}
https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin:-configuration#toadd</string>
<string id="toOverwrite_Help">The properties in the toOverwrite branch will wholly replace the corresponding local settings. Currently, the following properties are supported:
filters
The filters property is an array of strings, which are meant to represent all the lines making the text to use as the content of the "My filters" pane.
filterLists
The filterLists property is an array of strings, where each string is a token which identifies a list to enable by default. To enable a stock filter list, this is the token identifying the list as per content of assets.json. For an external list, i.e. not found in assets.json, the token is the URL of the filter list.
trustedSiteDirectives
The trustedSiteDirectives property is an array of string, each of which must resolve into a valid trusted-site directive, used to dictate where uBO must be disabled.
All the directives will be used to wholly replace the local trusted-site directives, including the built-in ones.
Example value:
{"trustedSiteDirectives": ["example.com","example.org"], "filters": ["||example.com/log$xhr,domain=www.example.org"], "filterLists": ["ublock-filters"]}
https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin:-configuration#tooverwrite</string>
</stringTable>
<presentationTable>
<presentation id="adminSettings">
<textBox refId="adminSettingsDialog">
<label>Exported settings to apply:</label>
</textBox>
</presentation>
<presentation id="advancedSettings">
<textBox refId="advancedSettingsDialog">
<label>Advanced settings to set:</label>
</textBox>
</presentation>
<presentation id="userSettings">
<textBox refId="userSettingsDialog">
<label>User settings to set:</label>
</textBox>
</presentation>
<presentation id="disabledPopupPanelParts">
<textBox refId="disabledPopupPanelPartsDialog">
<label>Popup panel parts to disable:</label>
</textBox>
</presentation>
<presentation id="toAdd">
<textBox refId="toAddDialog">
<label>Properties to add:</label>
</textBox>
</presentation>
<presentation id="toOverwrite">
<textBox refId="toOverwriteDialog">
<label>Properties to overwrite:</label>
</textBox>
</presentation>
<presentation id="advancedSettingsMulti">
<multiTextBox refId="advancedSettingsDialogMulti" />
</presentation>
<presentation id="userSettingsMulti">
<multiTextBox refId="userSettingsDialogMulti" />
</presentation>
<presentation id="disabledPopupPanelPartsMulti">
<multiTextBox refId="disabledPopupPanelPartsDialogMulti" />
</presentation>
<presentation id="toAddMulti">
<multiTextBox refId="toAddDialogMulti" />
</presentation>
<presentation id="toOverwriteMulti">
<multiTextBox refId="toOverwriteDialogMulti" />
</presentation>
</presentationTable>
</resources>
</policyDefinitionResources>

View file

@ -0,0 +1,165 @@
<?xml version="1.0" encoding="utf-8"?>
<policyDefinitions xmlns:xsd="https://www.w3.org/2001/XMLSchema" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" revision="1.0" schemaVersion="1.0" xmlns="http://www.microsoft.com/GroupPolicy/PolicyDefinitions">
<policyNamespaces>
<target prefix="uBlock" namespace="gorhill.uBlock" />
</policyNamespaces>
<resources minRequiredRevision="1.0" />
<supportedOn>
<definitions>
<definition name="V1_33_0" displayName="$(string.V1_33_0)" />
<definition name="V1_0_0_1" displayName="$(string.V1_0_0_1)" />
</definitions>
</supportedOn>
<categories>
<category name="uBlockOrigin" displayName="$(string.uBlockCategory)" />
<category name="MicrosoftEdge" displayName="$(string.MicrosoftEdge)">
<parentCategory ref="uBlockOrigin" />
</category>
<category name="GoogleChrome" displayName="$(string.GoogleChrome)">
<parentCategory ref="uBlockOrigin" />
</category>
<category name="MozillaFirefox" displayName="$(string.MozillaFirefox)">
<parentCategory ref="uBlockOrigin" />
</category>
</categories>
<policies>
<policy name="edgeAdminSettings" class="Both" displayName="$(string.adminSettings)" explainText="$(string.adminSettings_Help)" presentation="$(presentation.adminSettings)" key="Software\Policies\Microsoft\Edge\3rdparty\Extensions\odfafepnkmbhccpbejgmiehpchacaeak\policy">
<parentCategory ref="MicrosoftEdge" />
<supportedOn ref="V1_0_0_1" />
<elements>
<text id="adminSettingsDialog" valueName="adminSettings" required="true" />
</elements>
</policy>
<policy name="edgeAdvancedSettings" class="Both" displayName="$(string.advancedSettings)" explainText="$(string.advancedSettings_Help)" presentation="$(presentation.advancedSettings)" key="Software\Policies\Microsoft\Edge\3rdparty\Extensions\odfafepnkmbhccpbejgmiehpchacaeak\policy">
<parentCategory ref="MicrosoftEdge" />
<supportedOn ref="V1_33_0" />
<elements>
<text id="advancedSettingsDialog" valueName="advancedSettings" required="true" />
</elements>
</policy>
<policy name="edgeUserSettings" class="Both" displayName="$(string.userSettings)" explainText="$(string.userSettings_Help)" presentation="$(presentation.userSettings)" key="Software\Policies\Microsoft\Edge\3rdparty\Extensions\odfafepnkmbhccpbejgmiehpchacaeak\policy">
<parentCategory ref="MicrosoftEdge" />
<supportedOn ref="V1_33_0" />
<elements>
<text id="userSettingsDialog" valueName="userSettings" required="true" />
</elements>
</policy>
<policy name="edgeDisableDashboard" class="Both" displayName="$(string.disableDashboard)" explainText="$(string.disableDashboard_Help)" key="Software\Policies\Microsoft\Edge\3rdparty\Extensions\odfafepnkmbhccpbejgmiehpchacaeak\policy" valueName="disableDashboard">
<parentCategory ref="MicrosoftEdge" />
<supportedOn ref="V1_33_0" />
</policy>
<policy name="edgeDisabledPopupPanelParts" class="Both" displayName="$(string.disabledPopupPanelParts)" explainText="$(string.disabledPopupPanelParts_Help)" presentation="$(presentation.disabledPopupPanelParts)" key="Software\Policies\Microsoft\Edge\3rdparty\Extensions\odfafepnkmbhccpbejgmiehpchacaeak\policy">
<parentCategory ref="MicrosoftEdge" />
<supportedOn ref="V1_33_0" />
<elements>
<text id="disabledPopupPanelPartsDialog" valueName="disabledPopupPanelParts" required="true" />
</elements>
</policy>
<policy name="edgeToAdd" class="Both" displayName="$(string.toAdd)" explainText="$(string.toAdd_Help)" presentation="$(presentation.toAdd)" key="Software\Policies\Microsoft\Edge\3rdparty\Extensions\odfafepnkmbhccpbejgmiehpchacaeak\policy">
<parentCategory ref="MicrosoftEdge" />
<supportedOn ref="V1_33_0" />
<elements>
<text id="toAddDialog" valueName="toAdd" required="true" />
</elements>
</policy>
<policy name="edgeToOverwrite" class="Both" displayName="$(string.toOverwrite)" explainText="$(string.toOverwrite_Help)" presentation="$(presentation.toOverwrite)" key="Software\Policies\Microsoft\Edge\3rdparty\Extensions\odfafepnkmbhccpbejgmiehpchacaeak\policy">
<parentCategory ref="MicrosoftEdge" />
<supportedOn ref="V1_33_0" />
<elements>
<text id="toOverwriteDialog" valueName="toOverwrite" required="true" />
</elements>
</policy>
<policy name="chromeAdminSettings" class="Both" displayName="$(string.adminSettings)" explainText="$(string.adminSettings_Help)" presentation="$(presentation.adminSettings)" key="Software\Policies\Google\Chrome\3rdparty\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm\policy">
<parentCategory ref="GoogleChrome" />
<supportedOn ref="V1_0_0_1" />
<elements>
<text id="adminSettingsDialog" valueName="adminSettings" required="true" />
</elements>
</policy>
<policy name="chromeAdvancedSettings" class="Both" displayName="$(string.advancedSettings)" explainText="$(string.advancedSettings_Help)" presentation="$(presentation.advancedSettings)" key="Software\Policies\Google\Chrome\3rdparty\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm\policy">
<parentCategory ref="GoogleChrome" />
<supportedOn ref="V1_33_0" />
<elements>
<text id="advancedSettingsDialog" valueName="advancedSettings" required="true" />
</elements>
</policy>
<policy name="chromeUserSettings" class="Both" displayName="$(string.userSettings)" explainText="$(string.userSettings_Help)" presentation="$(presentation.userSettings)" key="Software\Policies\Google\Chrome\3rdparty\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm\policy">
<parentCategory ref="GoogleChrome" />
<supportedOn ref="V1_33_0" />
<elements>
<text id="userSettingsDialog" valueName="userSettings" required="true" />
</elements>
</policy>
<policy name="chromeDisableDashboard" class="Both" displayName="$(string.disableDashboard)" explainText="$(string.disableDashboard_Help)" key="Software\Policies\Google\Chrome\3rdparty\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm\policy" valueName="disableDashboard">
<parentCategory ref="GoogleChrome" />
<supportedOn ref="V1_33_0" />
</policy>
<policy name="chromeDisabledPopupPanelParts" class="Both" displayName="$(string.disabledPopupPanelParts)" explainText="$(string.disabledPopupPanelParts_Help)" presentation="$(presentation.disabledPopupPanelParts)" key="Software\Policies\Google\Chrome\3rdparty\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm\policy">
<parentCategory ref="GoogleChrome" />
<supportedOn ref="V1_33_0" />
<elements>
<text id="disabledPopupPanelPartsDialog" valueName="disabledPopupPanelParts" required="true" />
</elements>
</policy>
<policy name="chromeToAdd" class="Both" displayName="$(string.toAdd)" explainText="$(string.toAdd_Help)" presentation="$(presentation.toAdd)" key="Software\Policies\Google\Chrome\3rdparty\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm\policy">
<parentCategory ref="GoogleChrome" />
<supportedOn ref="V1_33_0" />
<elements>
<text id="toAddDialog" valueName="toAdd" required="true" />
</elements>
</policy>
<policy name="chromeToOverwrite" class="Both" displayName="$(string.toOverwrite)" explainText="$(string.toOverwrite_Help)" presentation="$(presentation.toOverwrite)" key="Software\Policies\Google\Chrome\3rdparty\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm\policy">
<parentCategory ref="GoogleChrome" />
<supportedOn ref="V1_33_0" />
<elements>
<text id="toOverwriteDialog" valueName="toOverwrite" required="true" />
</elements>
</policy>
<policy name="firefoxAdminSettings" class="Both" displayName="$(string.adminSettings)" explainText="$(string.adminSettings_Help)" presentation="$(presentation.adminSettings)" key="SOFTWARE\Policies\Mozilla\Firefox\3rdparty\Extensions\uBlock0@raymondhill.net">
<parentCategory ref="MozillaFirefox" />
<supportedOn ref="V1_0_0_1" />
<elements>
<text id="adminSettingsDialog" valueName="adminSettings" required="true" />
</elements>
</policy>
<policy name="firefoxAdvancedSettings" class="Both" displayName="$(string.advancedSettings)" explainText="$(string.advancedSettings_Help)" presentation="$(presentation.advancedSettingsMulti)" key="Software\Policies\Mozilla\Firefox\3rdparty\Extensions\uBlock0@raymondhill.net">
<parentCategory ref="MozillaFirefox" />
<supportedOn ref="V1_33_0" />
<elements>
<multiText id="advancedSettingsDialogMulti" valueName="advancedSettings" required="true" maxStrings="1" />
</elements>
</policy>
<policy name="firefoxUserSettings" class="Both" displayName="$(string.userSettings)" explainText="$(string.userSettings_Help)" presentation="$(presentation.userSettingsMulti)" key="Software\Policies\Mozilla\Firefox\3rdparty\Extensions\uBlock0@raymondhill.net">
<parentCategory ref="MozillaFirefox" />
<supportedOn ref="V1_33_0" />
<elements>
<multiText id="userSettingsDialogMulti" valueName="userSettings" required="true" maxStrings="1" />
</elements>
</policy>
<policy name="firefoxDisableDashboard" class="Both" displayName="$(string.disableDashboard)" explainText="$(string.disableDashboard_Help)" key="Software\Policies\Mozilla\Firefox\3rdparty\Extensions\uBlock0@raymondhill.net" valueName="disableDashboard">
<parentCategory ref="MozillaFirefox" />
<supportedOn ref="V1_33_0" />
</policy>
<policy name="firefoxDisabledPopupPanelParts" class="Both" displayName="$(string.disabledPopupPanelParts)" explainText="$(string.disabledPopupPanelParts_Help)" presentation="$(presentation.disabledPopupPanelPartsMulti)" key="Software\Policies\Mozilla\Firefox\3rdparty\Extensions\uBlock0@raymondhill.net">
<parentCategory ref="MozillaFirefox" />
<supportedOn ref="V1_33_0" />
<elements>
<multiText id="disabledPopupPanelPartsDialogMulti" valueName="disabledPopupPanelParts" required="true" maxStrings="1" />
</elements>
</policy>
<policy name="firefoxToAdd" class="Both" displayName="$(string.toAdd)" explainText="$(string.toAdd_Help)" presentation="$(presentation.toAddMulti)" key="Software\Policies\Mozilla\Firefox\3rdparty\Extensions\uBlock0@raymondhill.net">
<parentCategory ref="MozillaFirefox" />
<supportedOn ref="V1_33_0" />
<elements>
<multiText id="toAddDialogMulti" valueName="toAdd" required="true" maxStrings="1" />
</elements>
</policy>
<policy name="firefoxToOverwrite" class="Both" displayName="$(string.toOverwrite)" explainText="$(string.toOverwrite_Help)" presentation="$(presentation.toOverwriteMulti)" key="Software\Policies\Mozilla\Firefox\3rdparty\Extensions\uBlock0@raymondhill.net">
<parentCategory ref="MozillaFirefox" />
<supportedOn ref="V1_33_0" />
<elements>
<multiText id="toOverwriteDialogMulti" valueName="toOverwrite" required="true" maxStrings="1" />
</elements>
</policy>
</policies>
</policyDefinitions>

Some files were not shown because too many files have changed in this diff Show more