]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/commitdiff
Add filter list documentation. https://redmine.stoutner.com/issues/1209 master
authorSoren Stoutner <soren@stoutner.com>
Thu, 14 May 2026 20:46:30 +0000 (13:46 -0700)
committerSoren Stoutner <soren@stoutner.com>
Thu, 14 May 2026 20:46:45 +0000 (13:46 -0700)
COPYING
doc/CMakeLists.txt
doc/filter-lists.png [new file with mode: 0644]
doc/index.docbook
doc/request-details.png [new file with mode: 0644]
src/dialogs/FilterListsDialog.cpp
src/main.cpp

diff --git a/COPYING b/COPYING
index ab33dc1ea08890fa2cf96328489250d78142b08c..edb51ff898999da327562112229bf33178f7959f 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -1,5 +1,5 @@
 SPDX-License-Identifier: GPL-3.0-or-later
-SPDX-FileCopyrightText: 2016-2017, 2021-2026 Soren Stoutner <soren@stoutner.com>
+SPDX-FileCopyrightText: 2016-2018, 2020-2026 Soren Stoutner <soren@stoutner.com>
 
 This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>.
 
index e80721712de95dfc55f8701a6e075e1ce3cbde0f..aaa72a8c81f29d749c1caf9e7f8a3f43f5b4177f 100644 (file)
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-3.0-or-later
-# SPDX-FileCopyrightText: 2023 Soren Stoutner <soren@stoutner.com>
+# SPDX-FileCopyrightText: 2023, 2026 Soren Stoutner <soren@stoutner.com>
 #
 # This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>.
 #
@@ -20,4 +20,5 @@
 kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR privacybrowser)
 
 # Install extra graphic files (the automatic installer doesn't pick up .gif files).
+# When PNG files are added, prune the build before rebuilding to detect and automatically add them.
 install(FILES loading.gif DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en/privacybrowser)
diff --git a/doc/filter-lists.png b/doc/filter-lists.png
new file mode 100644 (file)
index 0000000..5eb51af
Binary files /dev/null and b/doc/filter-lists.png differ
index bcac573bbcb745d3aa63d952b9e7df990862ac13..2533901036ea2c104014f3052abdd63c0ca1a204 100644 (file)
@@ -2,7 +2,7 @@
 
 <!--
   SPDX-License-Identifier: GFDL-1.3-no-invariants-or-later
-  SPDX-FileCopyrightText: 2023-2026 Soren Stoutner <soren@stoutner.com>
+  SPDX-FileCopyrightText: 2018, 2020, 2022-2026 Soren Stoutner <soren@stoutner.com>
 
   This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>.
 
@@ -37,7 +37,7 @@
         </authorgroup>
 
         <copyright>
-            <year>2016-2017, 2021-2026</year>
+            <year>2016-2018, 2020-2026</year>
             <holder>&Soren.Stoutner;</holder>
         </copyright>
 
@@ -45,7 +45,7 @@
         <legalnotice>&FDLNotice;</legalnotice>
 
         <!-- Last update. -->
-        <date>2026-04-25</date>
+        <date>2026-05-14</date>
 
         <!-- The version of Privacy Browser this documentation is written for. -->
         <releaseinfo>&privacybrowser; version 0.9</releaseinfo>
             </para>
         </sect1>
 
+        <!-- Requests. -->
+        <sect1 id="requests">
+            <title>Requests</title>
+
+            <para>
+                When a URL is loaded, it typically makes a number of resource requests for CCS, JavaScript, image, and other files.
+                Details about these requests can be viewed in <xref linkend="filter-lists-requests"/>.
+                The URL toolbar has a button that displays how many requests were block.  Clicking on the button also opens the Requests dialog.
+            </para>
+
+            <para>
+                Clicking on a request in the list opens the Request Details dialog.
+            </para>
+
+            <mediaobject>
+                <imageobject>
+                    <imagedata fileref="request-details.png" format="PNG"/>
+                </imageobject>
+
+                <textobject>
+                    <phrase>Request Details</phrase>
+                </textobject>
+            </mediaobject>
+
+            <para>
+                Before a web page loads a resource, it is checked against the filter lists that are enabled in the following order:
+            </para>
+
+            <orderedlist>
+                <listitem><para>UltraPrivacy</para></listitem>
+                <listitem><para>UltraList</para></listitem>
+                <listitem><para>EasyPrivacy</para></listitem>
+                <listitem><para>EasyList</para></listitem>
+                <listitem><para>Fanboy’s Annoyance List</para></listitem>
+            </orderedlist>
+
+            <para>
+                These lists are based on the <ulink url="https://adblockplus.org/filters">Adblock syntax</ulink>.
+                <ulink url="https://www.stoutner.com/privacy-browser-android/filter-lists/ultraprivacy/">UltraPrivacy</ulink> and
+                <ulink url="https://www.stoutner.com/privacy-browser-android/filter-lists/ultralist/">UltraList</ulink> are maintained by Stoutner.
+                The last three filter lists come from the <ulink url="https://easylist.to/">EasyList project</ulink>.
+            </para>
+
+            <para>
+                The raw entries from the filter lists are processed into 6 sublists.
+            </para>
+
+            <orderedlist>
+                <listitem><para>Main Allow List</para></listitem>
+                <listitem><para>Initial Domain Allow List</para></listitem>
+                <listitem><para>Regular Expression Allow List</para></listitem>
+                <listitem><para>Main Block List</para></listitem>
+                <listitem><para>Initial Domain Block List</para></listitem>
+                <listitem><para>Regular Expression Block List</para></listitem>
+            </orderedlist>
+
+            <para>
+                Initial domain lists check against the beginning of the domain. These are very common and placing them in their own sublist allows for more CPU-efficient checking of resource requests.
+                Regular expression lists follow the <ulink url="https://en.wikipedia.org/wiki/Regular_expression">regular expression syntax</ulink>.
+            </para>
+
+            <para>
+                The contents of the filter lists may be viewed by selecting <xref linkend="filter-lists-view-filter-lists"/>.
+            </para>
+
+            <mediaobject>
+                <imageobject>
+                    <imagedata fileref="filter-lists.png" format="PNG"/>
+                </imageobject>
+
+                <textobject>
+                    <phrase>Filter Lists</phrase>
+                </textobject>
+            </mediaobject>
+
+            <para>
+                A more detailed description of how the filter list entries are processed is available at <ulink url="https://www.stoutner.com/privacy-browser-pc/filter-lists/">stoutner.com</ulink>.
+            </para>
+        </sect1>
+
         <!-- Spell Checking. -->
         <sect1 id="spell-checking">
             <title>Spell Checking</title>
                 Privacy Browser uses the binary <filename>.bdic</filename> Hunspell dictionary format
                 <ulink url="https://doc.qt.io/qt-5/qtwebengine-features.html#spellchecker">utilized by Qt WebEngine</ulink>
                 which was <ulink url="https://sites.google.com/a/chromium.org/dev/developers/how-tos/editing-the-spell-checking-dictionaries">created by Google for Chromium</ulink>.
-                Debian’s Hunspell dictionary language packages are slowly adding support for the <filename>.bdic</filename> format. Those which have are listed by Privacy Browser as suggested packages.
+                On Debian, these dictionaries are provided by the Hunspell and sometimes the MySpell packages.
             </para>
 
             <para>
 
                 <variablelist>
                     <!-- Requests. -->
-                    <varlistentry id="requests">
+                    <varlistentry id="filter-lists-requests">
                         <term>
                             <menuchoice>
                                 <shortcut>
                     </varlistentry>
 
                     <!-- View Filter Lists. -->
-                    <varlistentry id="view-filter-lists">
+                    <varlistentry id="filter-lists-view-filter-lists">
                         <term>
                             <menuchoice>
                                 <shortcut>
diff --git a/doc/request-details.png b/doc/request-details.png
new file mode 100644 (file)
index 0000000..c8369cb
Binary files /dev/null and b/doc/request-details.png differ
index f30dfb6f5e60501f240c66e0742abe7c3ab9627c..c23fc219d24f20dc6462c8eb98ced0068cebf00f 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: GPL-3.0-or-later
- * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner <soren@stoutner.com>
+ * SPDX-FileCopyrightText: 2024-2026 Soren Stoutner <soren@stoutner.com>
  *
  * This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>.
  *
@@ -118,41 +118,42 @@ void FilterListsDialog::populateFilterListTextEdit(int filterListComboBoxIndex)
     // Get the filter list file.
     QFile filterListFile(filterListStructPointer->filePath);
 
-    // Open the filter list file.
-    filterListFile.open(QIODevice::ReadOnly);
-
-    // Create a filter list text stream.
-    QTextStream filterListTextStream(&filterListFile);
-
-    // Populate the text edit.
-    filterListTextEditPointer->setText(filterListTextStream.readAll());
-
-    // Clear the sublist combo box.
-    sublistComboBoxPointer->clear();
-
-    // Calculate the size of the filter lists.
-    int mainAllowListSize = distance(filterListStructPointer->mainAllowListPointer->begin(), filterListStructPointer->mainAllowListPointer->end());
-    int initialDomainAllowListSize = distance(filterListStructPointer->initialDomainAllowListPointer->begin(), filterListStructPointer->initialDomainAllowListPointer->end());
-    int regularExpressionAllowListSize = distance(filterListStructPointer->regularExpressionAllowListPointer->begin(), filterListStructPointer->regularExpressionAllowListPointer->end());
-    int mainBlockListSize = distance(filterListStructPointer->mainBlockListPointer->begin(), filterListStructPointer->mainBlockListPointer->end());
-    int initialDomainBlockListSize = distance(filterListStructPointer->initialDomainBlockListPointer->begin(), filterListStructPointer->initialDomainBlockListPointer->end());
-    int regularExpressionBlockListSize = distance(filterListStructPointer->regularExpressionBlockListPointer->begin(), filterListStructPointer->regularExpressionBlockListPointer->end());
-
-    // Get the translated filter list names.
-    QString mainAllowListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::MAIN_ALLOWLIST);
-    QString initialDomainAllowListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::INITIAL_DOMAIN_ALLOWLIST);
-    QString regularExpressionAllowListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::REGULAR_EXPRESSION_ALLOWLIST);
-    QString mainBlockListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::MAIN_BLOCKLIST);
-    QString initialDomainBlockListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::INITIAL_DOMAIN_BLOCKLIST);
-    QString regularExpressionBlockListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::REGULAR_EXPRESSION_BLOCKLIST);
-
-    // Populate the sublist combo box.
-    sublistComboBoxPointer->addItem(i18nc("The main allow list", "%1 - %2", mainAllowListName, mainAllowListSize));
-    sublistComboBoxPointer->addItem(i18nc("The initial domain allow list", "%1 - %2", initialDomainAllowListName, initialDomainAllowListSize));
-    sublistComboBoxPointer->addItem(i18nc("The regular expression allow list", "%1 - %2", regularExpressionAllowListName, regularExpressionAllowListSize));
-    sublistComboBoxPointer->addItem(i18nc("The main block list", "%1 - %2", mainBlockListName, mainBlockListSize));
-    sublistComboBoxPointer->addItem(i18nc("The initial domain block list", "%1 - %2", initialDomainBlockListName, initialDomainBlockListSize));
-    sublistComboBoxPointer->addItem(i18nc("the regular expression block list", "%1 - %2", regularExpressionBlockListName, regularExpressionBlockListSize));
+    // Open the filter list file.  This returns true if the open operation succeeded.
+    if (filterListFile.open(QIODevice::ReadOnly))
+    {
+        // Create a filter list text stream.
+        QTextStream filterListTextStream(&filterListFile);
+
+        // Populate the text edit.
+        filterListTextEditPointer->setText(filterListTextStream.readAll());
+
+        // Clear the sublist combo box.
+        sublistComboBoxPointer->clear();
+
+        // Calculate the size of the filter lists.
+        int mainAllowListSize = distance(filterListStructPointer->mainAllowListPointer->begin(), filterListStructPointer->mainAllowListPointer->end());
+        int initialDomainAllowListSize = distance(filterListStructPointer->initialDomainAllowListPointer->begin(), filterListStructPointer->initialDomainAllowListPointer->end());
+        int regularExpressionAllowListSize = distance(filterListStructPointer->regularExpressionAllowListPointer->begin(), filterListStructPointer->regularExpressionAllowListPointer->end());
+        int mainBlockListSize = distance(filterListStructPointer->mainBlockListPointer->begin(), filterListStructPointer->mainBlockListPointer->end());
+        int initialDomainBlockListSize = distance(filterListStructPointer->initialDomainBlockListPointer->begin(), filterListStructPointer->initialDomainBlockListPointer->end());
+        int regularExpressionBlockListSize = distance(filterListStructPointer->regularExpressionBlockListPointer->begin(), filterListStructPointer->regularExpressionBlockListPointer->end());
+
+        // Get the translated filter list names.
+        QString mainAllowListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::MAIN_ALLOWLIST);
+        QString initialDomainAllowListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::INITIAL_DOMAIN_ALLOWLIST);
+        QString regularExpressionAllowListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::REGULAR_EXPRESSION_ALLOWLIST);
+        QString mainBlockListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::MAIN_BLOCKLIST);
+        QString initialDomainBlockListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::INITIAL_DOMAIN_BLOCKLIST);
+        QString regularExpressionBlockListName = globalFilterListHelperPointer->getSublistName(FilterListHelper::REGULAR_EXPRESSION_BLOCKLIST);
+
+        // Populate the sublist combo box.
+        sublistComboBoxPointer->addItem(i18nc("The main allow list", "%1 - %2", mainAllowListName, mainAllowListSize));
+        sublistComboBoxPointer->addItem(i18nc("The initial domain allow list", "%1 - %2", initialDomainAllowListName, initialDomainAllowListSize));
+        sublistComboBoxPointer->addItem(i18nc("The regular expression allow list", "%1 - %2", regularExpressionAllowListName, regularExpressionAllowListSize));
+        sublistComboBoxPointer->addItem(i18nc("The main block list", "%1 - %2", mainBlockListName, mainBlockListSize));
+        sublistComboBoxPointer->addItem(i18nc("The initial domain block list", "%1 - %2", initialDomainBlockListName, initialDomainBlockListSize));
+        sublistComboBoxPointer->addItem(i18nc("the regular expression block list", "%1 - %2", regularExpressionBlockListName, regularExpressionBlockListSize));
+    }
 }
 
 void FilterListsDialog::populateTableWidget(int sublistComboBoxIndex) const
index 06331a2a3cd2403660f99226436f4cc381fa1bcc..c558065acd8da7ebde2b0fd30dd9b56b08c7273d 100644 (file)
@@ -61,7 +61,7 @@ int main(int argc, char *argv[])
 
     // Populate additional about data info.
     aboutData.setBugAddress("https://redmine.stoutner.com/projects/privacy-browser-pc/issues");
-    aboutData.setCopyrightStatement(i18nc("Copyright", "Copyright 2016-2017, 2021-2026 Soren Stoutner <soren@stoutner.com>"));
+    aboutData.setCopyrightStatement(i18nc("Copyright", "Copyright 2016-2018, 2020-2026 Soren Stoutner <soren@stoutner.com>"));
     aboutData.setDesktopFileName(QLatin1String("com.stoutner.privacybrowser"));
     aboutData.setHomepage(QLatin1String("https://www.stoutner.com/privacy-browser-pc/"));
     //aboutData.setLicense(KAboutLicense::GPL_V3, KAboutLicense::OrLaterVersions);  <https://redmine.stoutner.com/issues/822>