Skip to content

Commit

Permalink
Add checkboxes to "My filters" pane
Browse files Browse the repository at this point in the history
Related issues:
- uBlockOrigin/uBlock-issues#3161
- uBlockOrigin/uBlock-issues#2895 (reply in thread)

Two checkboxes have been added to the "My filters "pane:

1. A checkbox to wholly disable/enable "My filters". This is equivalent
   to the checkbox for "My filters" in "Filter lists" pane.

2. A checkbox to enable/disable the trustworthiness of the content
   of "My filters". Default to untrusted.

Since toggling these checkboxes requires reloading all filter lists,
their new state must be committed through the "Apply changes" button.

Additionally: a "book" icon has been added to the top-right of the
dashboard, which is a link to the wiki according to whichever pane is
currently active.
  • Loading branch information
gorhill committed Mar 11, 2024
1 parent 640eaf8 commit 46ea551
Show file tree
Hide file tree
Showing 92 changed files with 886 additions and 465 deletions.
7 changes: 4 additions & 3 deletions src/1p-filters.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@

<div class="body">
<div id="cloudWidget" class="hide" data-cloud-entry="myFiltersPane"></div>

<p><span data-i18n="1pTrustWarning"></span>&ensp;<span class="vverbose"><span data-i18n="1pFormatHint"></span>&thinsp;<a class="fa-icon info" href="https://github.com/gorhill/uBlock/wiki/Dashboard:-My-filters" target="_blank">question-circle</a></span></p>
<p>
<button id="userFiltersApply" class="preferred iconified" type="button" disabled><span class="fa-icon">check</span><span data-i18n="1pApplyChanges">_</span><span class="hover"></span></button>
<button id="userFiltersRevert" class="iconified" type="button" disabled><span class="fa-icon">undo</span><span data-i18n="genericRevert">_</span><span class="hover"></span></button>
&ensp;
&emsp;
<button id="importUserFiltersFromFile" class="iconified" type="button"><span class="fa-icon">download-alt</span><span data-i18n="1pImport">_</span><span class="hover"></span></button>
<button id="exportUserFiltersToFile" class="iconified" type="button"><span class="fa-icon">upload-alt</span><span data-i18n="1pExport">_</span><span class="hover"></span></button>
</p>
<p data-i18n="1pTrustWarning"></p>
<div class="li"><label><span id="enableMyFilters" class="input checkbox"><input type="checkbox"><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="1pEnableMyFiltersLabel"></span></label></div>
<div id="trustMyFilters" class="li"><label><span class="input checkbox"><input type="checkbox"><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="1pTrustMyFiltersLabel"></span></label></div>
</div>
<div id="userFilters" class="codeMirrorContainer codeMirrorBreakAll cm-theme-override" spellcheck="false"></div>
<div class="hidden">
Expand Down
4 changes: 2 additions & 2 deletions src/3p-filters.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<div class="body">

<div id="cloudWidget" class="hide" data-cloud-entry="tpFiltersPane"></div>
<div id="actions">
<p id="actions">
<button id="buttonApply" class="preferred disabled iconified dontshrink" type="button" data-i18n-title="3pApplyChanges"><span class="fa-icon">check</span><span data-i18n="3pApplyChanges">_</span><span class="hover"></span></button>
<button id="buttonUpdate" class="preferred disabled iconified" type="button" data-i18n-title="3pUpdateNow"><span class="fa-icon">refresh</span><span data-i18n="3pUpdateNow">_</span><span class="hover"></span></button>
</div>
</p>

<div>
<div class="li">
Expand Down
12 changes: 8 additions & 4 deletions src/_locales/ar/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,18 @@
"message": "حدث خطأ في الشبكة منع تحديث المورد.",
"description": "used as a tooltip for error icon beside a list"
},
"1pFormatHint": {
"message": "فلتر واحد في كل سطر. يمكن ان يكون الفلتر رابط موقع او فلتر متوافق مع EasyList-compatible. السطور المسبوقة بـ<code>!</code> سوف يتم تجاهلها.",
"description": "Short information about how to create custom filters"
},
"1pTrustWarning": {
"message": "لا تضف مرشحات من مصادر غير موثوقة.",
"description": "Warning against copy-pasting filters from random sources"
},
"1pEnableMyFiltersLabel": {
"message": "Enable my custom filters",
"description": "Label for the checkbox use to enable/disable 'My filters' list"
},
"1pTrustMyFiltersLabel": {
"message": "Allow custom filters requiring trust",
"description": "Label for the checkbox use to trust the content of 'My filters' list"
},
"1pImport": {
"message": "استيراد و إضافة",
"description": "Button in the 'My filters' pane"
Expand Down
12 changes: 8 additions & 4 deletions src/_locales/az/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,18 @@
"message": "Şəbəkə xətası üzündən yeniləmə mümkün olmadı.",
"description": "used as a tooltip for error icon beside a list"
},
"1pFormatHint": {
"message": "Hər sətirdə yalnız bir filtr. Bu, ya domen adı, ya da Adblock Plus formatında yazılmış filtr ola bilər. Əvvəli <code>!</code> ilə başlayan sətirlər nəzərə alınmayacaqdır.",
"description": "Short information about how to create custom filters"
},
"1pTrustWarning": {
"message": "Etibarsız mənbələrdən filtrlər əlavə etməyin.",
"description": "Warning against copy-pasting filters from random sources"
},
"1pEnableMyFiltersLabel": {
"message": "Enable my custom filters",
"description": "Label for the checkbox use to enable/disable 'My filters' list"
},
"1pTrustMyFiltersLabel": {
"message": "Allow custom filters requiring trust",
"description": "Label for the checkbox use to trust the content of 'My filters' list"
},
"1pImport": {
"message": "İdxal və əlavə et",
"description": "Button in the 'My filters' pane"
Expand Down
12 changes: 8 additions & 4 deletions src/_locales/be/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,18 @@
"message": "Памылка сеткі не дазволіла абнавіць рэсурс.",
"description": "used as a tooltip for error icon beside a list"
},
"1pFormatHint": {
"message": "Адзін фільтр на радок. Фільтрам можа быць адрас сайта або сумяшчальны з EasyList фільтр. Радкі, што пачынаюцца з <code>!</code>, будуць праігнараваны.",
"description": "Short information about how to create custom filters"
},
"1pTrustWarning": {
"message": "Не дадавайце фільтры з крыніц, якім не давяраеце.",
"description": "Warning against copy-pasting filters from random sources"
},
"1pEnableMyFiltersLabel": {
"message": "Enable my custom filters",
"description": "Label for the checkbox use to enable/disable 'My filters' list"
},
"1pTrustMyFiltersLabel": {
"message": "Allow custom filters requiring trust",
"description": "Label for the checkbox use to trust the content of 'My filters' list"
},
"1pImport": {
"message": "Імпартаваць і дадаць",
"description": "Button in the 'My filters' pane"
Expand Down
12 changes: 8 additions & 4 deletions src/_locales/bg/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,18 @@
"message": "Грешка в мрежата възпрепятства обновяването на ресурса.",
"description": "used as a tooltip for error icon beside a list"
},
"1pFormatHint": {
"message": "Един филтър на ред. Това може да бъде обикновен адрес или филтър, съвместим с EasyList. Редовете с представка <code>!</code> ще бъдат игнорирани.",
"description": "Short information about how to create custom filters"
},
"1pTrustWarning": {
"message": "Не добавяйте филтри от ненадеждни източници.",
"description": "Warning against copy-pasting filters from random sources"
},
"1pEnableMyFiltersLabel": {
"message": "Enable my custom filters",
"description": "Label for the checkbox use to enable/disable 'My filters' list"
},
"1pTrustMyFiltersLabel": {
"message": "Allow custom filters requiring trust",
"description": "Label for the checkbox use to trust the content of 'My filters' list"
},
"1pImport": {
"message": "Внасяне и добавяне...",
"description": "Button in the 'My filters' pane"
Expand Down
12 changes: 8 additions & 4 deletions src/_locales/bn/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,18 @@
"message": "একটি নেটওয়ার্ক ত্রুটি রিসোর্স বা তথ্য হালনাগাদ হওয়া রোধ করেছে।",
"description": "used as a tooltip for error icon beside a list"
},
"1pFormatHint": {
"message": "লাইন প্রতি একটি ফিল্টার। একটি ফিল্টার শুধু হোস্টনেম বা অ্যাডব্লক প্লাস-এর সাথে সামঞ্জস্যপূর্ণ ফিল্টার হতে পারে। <code>!</code> দিয়ে শুরু হওয়া লাইন উপেক্ষা করা হবে।",
"description": "Short information about how to create custom filters"
},
"1pTrustWarning": {
"message": "সন্দেহজনক উৎস থেকে ফিল্টারে কোন কিছু যোগ করবেন না।",
"description": "Warning against copy-pasting filters from random sources"
},
"1pEnableMyFiltersLabel": {
"message": "Enable my custom filters",
"description": "Label for the checkbox use to enable/disable 'My filters' list"
},
"1pTrustMyFiltersLabel": {
"message": "Allow custom filters requiring trust",
"description": "Label for the checkbox use to trust the content of 'My filters' list"
},
"1pImport": {
"message": "আমদানি করে পরিশেষে যোগ করুন",
"description": "Button in the 'My filters' pane"
Expand Down
12 changes: 8 additions & 4 deletions src/_locales/br_FR/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,18 @@
"message": "Ur fazi rouedad en deus miret an danvez da vezañ hizivaet.",
"description": "used as a tooltip for error icon beside a list"
},
"1pFormatHint": {
"message": "Ur sil dre linenn. Ur sil a c'hall bezañ un anv ostiz hepken pe ur sil hag a glot gant EasyList.\nAl linennoù a grog gant <code>!</code> a vo dilezet.",
"description": "Short information about how to create custom filters"
},
"1pTrustWarning": {
"message": "Arabat ouzhpennañ siloù a zeu diouzh mammennoù douetus.",
"description": "Warning against copy-pasting filters from random sources"
},
"1pEnableMyFiltersLabel": {
"message": "Enable my custom filters",
"description": "Label for the checkbox use to enable/disable 'My filters' list"
},
"1pTrustMyFiltersLabel": {
"message": "Allow custom filters requiring trust",
"description": "Label for the checkbox use to trust the content of 'My filters' list"
},
"1pImport": {
"message": "Enporzhiañ hag ouzhpennañ",
"description": "Button in the 'My filters' pane"
Expand Down
12 changes: 8 additions & 4 deletions src/_locales/bs/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,18 @@
"message": "Mrežna greška je spriječila ažuriranje resursa.",
"description": "used as a tooltip for error icon beside a list"
},
"1pFormatHint": {
"message": "Jedan filter po redu. Filter može biti običan naziv domaćina/hosta ili filter kompatibilan sa EasyList-om. Redovi sa prefiksom <code>!</code> će biti ignorisani.",
"description": "Short information about how to create custom filters"
},
"1pTrustWarning": {
"message": "Nemojte dodavati filtere iz nepouzdanih izvora.",
"description": "Warning against copy-pasting filters from random sources"
},
"1pEnableMyFiltersLabel": {
"message": "Enable my custom filters",
"description": "Label for the checkbox use to enable/disable 'My filters' list"
},
"1pTrustMyFiltersLabel": {
"message": "Allow custom filters requiring trust",
"description": "Label for the checkbox use to trust the content of 'My filters' list"
},
"1pImport": {
"message": "Uvezi i dodaj",
"description": "Button in the 'My filters' pane"
Expand Down
12 changes: 8 additions & 4 deletions src/_locales/ca/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,18 @@
"message": "Un error de xarxa va impedir que s'actualitzés el recurs.",
"description": "used as a tooltip for error icon beside a list"
},
"1pFormatHint": {
"message": "Un filtre per línia. Un filtre pot ser un domini, o un filtre compatible amb l'Adblock Plus. S'ignoraran les línies amb el símbol &lsquo;!&rsquo;.",
"description": "Short information about how to create custom filters"
},
"1pTrustWarning": {
"message": "No afegiu filtres de fonts no confiables.",
"description": "Warning against copy-pasting filters from random sources"
},
"1pEnableMyFiltersLabel": {
"message": "Enable my custom filters",
"description": "Label for the checkbox use to enable/disable 'My filters' list"
},
"1pTrustMyFiltersLabel": {
"message": "Allow custom filters requiring trust",
"description": "Label for the checkbox use to trust the content of 'My filters' list"
},
"1pImport": {
"message": "Importa i annexa",
"description": "Button in the 'My filters' pane"
Expand Down
12 changes: 8 additions & 4 deletions src/_locales/cs/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,18 @@
"message": "Chyba sítě znemožnila aktualizaci tohoto zdroje.",
"description": "used as a tooltip for error icon beside a list"
},
"1pFormatHint": {
"message": "Jeden filtr na řádek. Filtr může být prostý název hostitele nebo filtr kompatibilní s EasyList. Řádky začínající vykřičníkem <code>!</code> budou ignorovány.",
"description": "Short information about how to create custom filters"
},
"1pTrustWarning": {
"message": "Nepřidávejte filtry z nedůvěryhodných zdrojů.",
"description": "Warning against copy-pasting filters from random sources"
},
"1pEnableMyFiltersLabel": {
"message": "Enable my custom filters",
"description": "Label for the checkbox use to enable/disable 'My filters' list"
},
"1pTrustMyFiltersLabel": {
"message": "Allow custom filters requiring trust",
"description": "Label for the checkbox use to trust the content of 'My filters' list"
},
"1pImport": {
"message": "Importovat a připojit…",
"description": "Button in the 'My filters' pane"
Expand Down
12 changes: 8 additions & 4 deletions src/_locales/cv/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,18 @@
"message": "A network error prevented the resource from being updated.",
"description": "used as a tooltip for error icon beside a list"
},
"1pFormatHint": {
"message": "One filter per line. A filter can be a plain hostname, or an EasyList-compatible filter. Lines prefixed with <code>!</code> will be ignored.",
"description": "Short information about how to create custom filters"
},
"1pTrustWarning": {
"message": "Do not add filters from untrusted sources.",
"description": "Warning against copy-pasting filters from random sources"
},
"1pEnableMyFiltersLabel": {
"message": "Enable my custom filters",
"description": "Label for the checkbox use to enable/disable 'My filters' list"
},
"1pTrustMyFiltersLabel": {
"message": "Allow custom filters requiring trust",
"description": "Label for the checkbox use to trust the content of 'My filters' list"
},
"1pImport": {
"message": "Import and append…",
"description": "Button in the 'My filters' pane"
Expand Down
12 changes: 8 additions & 4 deletions src/_locales/cy/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,18 @@
"message": "A network error prevented the resource from being updated.",
"description": "used as a tooltip for error icon beside a list"
},
"1pFormatHint": {
"message": "One filter per line. A filter can be a plain hostname, or an EasyList-compatible filter. Lines prefixed with <code>!</code> will be ignored.",
"description": "Short information about how to create custom filters"
},
"1pTrustWarning": {
"message": "Do not add filters from untrusted sources.",
"description": "Warning against copy-pasting filters from random sources"
},
"1pEnableMyFiltersLabel": {
"message": "Enable my custom filters",
"description": "Label for the checkbox use to enable/disable 'My filters' list"
},
"1pTrustMyFiltersLabel": {
"message": "Allow custom filters requiring trust",
"description": "Label for the checkbox use to trust the content of 'My filters' list"
},
"1pImport": {
"message": "Import and append…",
"description": "Button in the 'My filters' pane"
Expand Down
12 changes: 8 additions & 4 deletions src/_locales/da/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,18 @@
"message": "En netværksfejl forhindrede opdatering af ressourcen.",
"description": "used as a tooltip for error icon beside a list"
},
"1pFormatHint": {
"message": "Ét filter pr. linje. Et filter kan være et almindeligt værtsnavn eller et EasyList-kompatibelt filter. Linjer startende med <code>!</code> ignoreres.",
"description": "Short information about how to create custom filters"
},
"1pTrustWarning": {
"message": "Tilføj ikke filtre fra ikke-betroede kilder.",
"description": "Warning against copy-pasting filters from random sources"
},
"1pEnableMyFiltersLabel": {
"message": "Enable my custom filters",
"description": "Label for the checkbox use to enable/disable 'My filters' list"
},
"1pTrustMyFiltersLabel": {
"message": "Allow custom filters requiring trust",
"description": "Label for the checkbox use to trust the content of 'My filters' list"
},
"1pImport": {
"message": "Importer og tilføj…",
"description": "Button in the 'My filters' pane"
Expand Down
12 changes: 8 additions & 4 deletions src/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,18 @@
"message": "Ein Netzwerkfehler verhinderte die Aktualisierung der Ressource.",
"description": "used as a tooltip for error icon beside a list"
},
"1pFormatHint": {
"message": "Ein Filter pro Zeile. Ein Filter kann ein einfacher Hostname oder ein EasyList-kompatibler Filter sein. Zeilen mit vorangestelltem <code>!</code> werden ignoriert.",
"description": "Short information about how to create custom filters"
},
"1pTrustWarning": {
"message": "Verwenden Sie keine Filter aus unseriösen Quellen.",
"description": "Warning against copy-pasting filters from random sources"
},
"1pEnableMyFiltersLabel": {
"message": "Enable my custom filters",
"description": "Label for the checkbox use to enable/disable 'My filters' list"
},
"1pTrustMyFiltersLabel": {
"message": "Allow custom filters requiring trust",
"description": "Label for the checkbox use to trust the content of 'My filters' list"
},
"1pImport": {
"message": "Importieren und anfügen …",
"description": "Button in the 'My filters' pane"
Expand Down
12 changes: 8 additions & 4 deletions src/_locales/el/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,18 @@
"message": "Ένα σφάλμα δικτύου εμπόδισε την ενημέρωση του πόρου.",
"description": "used as a tooltip for error icon beside a list"
},
"1pFormatHint": {
"message": "Ένα φίλτρο ανά γραμμή. Ένα φίλτρο μπορεί να είναι ένα απλό όνομα κεντρικού υπολογιστή ή ένα φίλτρο συμβατό με την EasyList. Οι γραμμές με πρόθεμα <code>!</code> θα παραβλέπονται.",
"description": "Short information about how to create custom filters"
},
"1pTrustWarning": {
"message": "Να μην προστίθενται φίλτρα από μη αξιόπιστες πηγές.",
"description": "Warning against copy-pasting filters from random sources"
},
"1pEnableMyFiltersLabel": {
"message": "Enable my custom filters",
"description": "Label for the checkbox use to enable/disable 'My filters' list"
},
"1pTrustMyFiltersLabel": {
"message": "Allow custom filters requiring trust",
"description": "Label for the checkbox use to trust the content of 'My filters' list"
},
"1pImport": {
"message": "Εισαγωγή και προσάρτηση",
"description": "Button in the 'My filters' pane"
Expand Down
12 changes: 8 additions & 4 deletions src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,18 @@
"message": "A network error prevented the resource from being updated.",
"description": "used as a tooltip for error icon beside a list"
},
"1pFormatHint": {
"message": "One filter per line. A filter can be a plain hostname, or an EasyList-compatible filter. Lines prefixed with <code>!</code> will be ignored.",
"description": "Short information about how to create custom filters"
},
"1pTrustWarning": {
"message": "Do not add filters from untrusted sources.",
"description": "Warning against copy-pasting filters from random sources"
},
"1pEnableMyFiltersLabel": {
"message": "Enable my custom filters",
"description": "Label for the checkbox use to enable/disable 'My filters' list"
},
"1pTrustMyFiltersLabel": {
"message": "Allow custom filters requiring trust",
"description": "Label for the checkbox use to trust the content of 'My filters' list"
},
"1pImport": {
"message": "Import and append…",
"description": "Button in the 'My filters' pane"
Expand Down
Loading

0 comments on commit 46ea551

Please sign in to comment.