From: Soren Stoutner Date: Thu, 14 May 2026 20:46:30 +0000 (-0700) Subject: Add filter list documentation. https://redmine.stoutner.com/issues/1209 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=e860be1d043105ddec81f08776ec48bc10795206;p=PrivacyBrowserPC.git Add filter list documentation. https://redmine.stoutner.com/issues/1209 --- diff --git a/COPYING b/COPYING index ab33dc1..edb51ff 100644 --- a/COPYING +++ b/COPYING @@ -1,5 +1,5 @@ SPDX-License-Identifier: GPL-3.0-or-later -SPDX-FileCopyrightText: 2016-2017, 2021-2026 Soren Stoutner +SPDX-FileCopyrightText: 2016-2018, 2020-2026 Soren Stoutner This file is part of Privacy Browser PC . diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index e807217..aaa72a8 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-3.0-or-later -# SPDX-FileCopyrightText: 2023 Soren Stoutner +# SPDX-FileCopyrightText: 2023, 2026 Soren Stoutner # # This file is part of 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 index 0000000..5eb51af Binary files /dev/null and b/doc/filter-lists.png differ diff --git a/doc/index.docbook b/doc/index.docbook index bcac573..2533901 100644 --- a/doc/index.docbook +++ b/doc/index.docbook @@ -2,7 +2,7 @@ - 2026-04-25 + 2026-05-14 &privacybrowser; version 0.9 @@ -313,6 +313,86 @@ + + + Requests + + + 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 . + The URL toolbar has a button that displays how many requests were block. Clicking on the button also opens the Requests dialog. + + + + Clicking on a request in the list opens the Request Details dialog. + + + + + + + + + Request Details + + + + + Before a web page loads a resource, it is checked against the filter lists that are enabled in the following order: + + + + UltraPrivacy + UltraList + EasyPrivacy + EasyList + Fanboy’s Annoyance List + + + + These lists are based on the Adblock syntax. + UltraPrivacy and + UltraList are maintained by Stoutner. + The last three filter lists come from the EasyList project. + + + + The raw entries from the filter lists are processed into 6 sublists. + + + + Main Allow List + Initial Domain Allow List + Regular Expression Allow List + Main Block List + Initial Domain Block List + Regular Expression Block List + + + + 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 regular expression syntax. + + + + The contents of the filter lists may be viewed by selecting . + + + + + + + + + Filter Lists + + + + + A more detailed description of how the filter list entries are processed is available at stoutner.com. + + + Spell Checking @@ -321,7 +401,7 @@ Privacy Browser uses the binary .bdic Hunspell dictionary format utilized by Qt WebEngine which was created by Google for Chromium. - Debian’s Hunspell dictionary language packages are slowly adding support for the .bdic 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. @@ -1359,7 +1439,7 @@ - + @@ -1380,7 +1460,7 @@ - + diff --git a/doc/request-details.png b/doc/request-details.png new file mode 100644 index 0000000..c8369cb Binary files /dev/null and b/doc/request-details.png differ diff --git a/src/dialogs/FilterListsDialog.cpp b/src/dialogs/FilterListsDialog.cpp index f30dfb6..c23fc21 100644 --- a/src/dialogs/FilterListsDialog.cpp +++ b/src/dialogs/FilterListsDialog.cpp @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: GPL-3.0-or-later - * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner + * SPDX-FileCopyrightText: 2024-2026 Soren Stoutner * * This file is part of 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 diff --git a/src/main.cpp b/src/main.cpp index 06331a2..c558065 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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 ")); + aboutData.setCopyrightStatement(i18nc("Copyright", "Copyright 2016-2018, 2020-2026 Soren Stoutner ")); aboutData.setDesktopFileName(QLatin1String("com.stoutner.privacybrowser")); aboutData.setHomepage(QLatin1String("https://www.stoutner.com/privacy-browser-pc/")); //aboutData.setLicense(KAboutLicense::GPL_V3, KAboutLicense::OrLaterVersions);