Skip to content

Add Adblock Filter List UDL (light & dark) - #412

Open
Stevoisiak wants to merge 1 commit into
notepad-plus-plus:masterfrom
Stevoisiak:adblock-filter-list
Open

Stevoisiak wants to merge 1 commit into
notepad-plus-plus:masterfrom
Stevoisiak:adblock-filter-list

Conversation

@Stevoisiak

Copy link
Copy Markdown
Contributor

Adds User Defined Languages for Adblock Filter List files (light mode and dark mode).

This file format contains a list of filters for Adblockers such as uBlock Origin, AdGuard, and Adblock Plus. These are typically saved as .txt files, hence why no file extension was specified in the UDLs. Formatted colors are based on the colors GitHub uses to highlight Adblock files.

Descriptions of Adblock file format:

Example files:

Adds User Defined Languages for Adblock Filter List files (light mode and dark mode).

This file format contains a list of filters for Adblockers such as uBlock Origin, AdGuard, and Adblock Plus. These are typically saved as .txt files, hence why no file extension was specified in the UDLs. Formatted colors are based on the colors GitHub uses to highlight Adblock files.

Descriptions of Adblock file format:
* [AdGuard: How to create your own ad filters](https://adguard.com/kb/general/ad-filtering/create-own-filters/)
* [Adblock Plus: How to write filters](https://help.adblockplus.org/adblock-plus-help-center/how-to-write-filters)
* [uBlock Origin: Static filter syntax](https://github.com/gorhill/ublock/wiki/static-filter-syntax)

Example files:

* https://github.com/Stevoisiak/Stevos-AI-Blocklist/blob/main/GenAI-Blocklist.txt
* https://github.com/easylist/easylist/blob/master/easylist/easylist_specific_hide.txt
* https://github.com/DandelionSprout/adfilt/blob/master/I%20Don't%20Want%20to%20Download%20Your%20Browser.txt
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<NotepadPlus>
<UserLang name="Adblock Filter List (Dark)" ext="" udlVersion="2.1">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add darkModeTheme="yes" attribute here: if a user were to add extensions (ad, for example) so they could auto-add the highlighting, that would allow it to work with dark/light mode, as discussed in another issue. As mentioned there, it won't work if the file has no matching extension... but if a user does choose ad or similar, having this already here would make it automatically work for them, which they might appreciate.

Comment thread udl-list.json
"id-name": "Adblock-Filter-List-Dark-by-Stevoisiak",
"display-name": "Adblock Filter List (Dark)",
"version": "2025-09-17",
"repository": "https://raw.githubusercontent.com/Stevoisiak/Adblock-UDL-for-NotepadPlusPlus/refs/heads/main/Adblock-Filter-List-Dark.udl.xml",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you've uploaded the files to this repo, you should just use "repository": ""

https://github.com/notepad-plus-plus/userDefinedLanguages/blob/master/CONTRIBUTING.md#edit-udl-listjson:

requirement: Attribute must be left blank for UDL files uploaded to this repository ("repository": "")

Comment thread udl-list.json
"id-name": "Adblock-Filter-List-Light-by-Stevoisiak",
"display-name": "Adblock Filter List (Light)",
"version": "2025-09-17",
"repository": "https://raw.githubusercontent.com/Stevoisiak/Adblock-UDL-for-NotepadPlusPlus/refs/heads/main/Adblock-Filter-List-Light.udl.xml",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you've uploaded the files to this repo, you should just use "repository": ""

https://github.com/notepad-plus-plus/userDefinedLanguages/blob/master/CONTRIBUTING.md#edit-udl-listjson:

requirement: Attribute must be left blank for UDL files uploaded to this repository ("repository": "")

@pryrt pryrt added the needs improvement will be rejected if requested improvement isn't made label Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs improvement will be rejected if requested improvement isn't made

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants