Squirtfilter is a powerful ruleset language developed for Siyuan AdBlocker, a successor to AdBlock Plus and uBlock Origin. It is a more performant filter than any other available filter to date. With Squirtfilter, you can block advertisements, popups, and unwanted content on any website, all while enjoying a smooth and uninterrupted browsing experience.
Before we delve into the syntax and use cases of Squirtfilter, let's talk about its unique name. The name Squirtfilter was inspired by the "squirt" sound that is made when a water pistol or squirt gun is fired. The idea behind the name is to represent the speed and precision of the filter, just like a water pistol that quickly and accurately squirts water.
The syntax of Squirtfilter is similar to that of other popular filter syntaxes like Adblock Plus, uBlock Origin, and EasyList. Here's an example of a Squirtfilter rule that blocks all ads on a website:
||example.com^$document
In this example, the ||
prefix signifies that the rule should be applied to the domain that follows, which is example.com
. The $document
suffix indicates that the rule should apply to the entire document of the website.
Squirtfilter also supports more advanced syntax, such as regular expressions, wildcards, and exceptions. Here's an example of a more complex rule that blocks all images on a website, except those with a specific URL pattern:
example.com##img[src$=".jpg"]:not([src*="specific-url"])
In this example, example.com
is the domain to which the rule should be applied. The ##
prefix signifies that the rule should apply to an HTML element, which in this case is the img
element. The :not
pseudo-class is used to exclude images that contain the specified URL pattern.
Squirtfilter is a powerful tool for customizing and enhancing your browsing experience. Here are some of the common use cases of Squirtfilter:
Blocking ads: Squirtfilter is especially useful for blocking ads on websites. By using Squirtfilter rules, you can remove annoying and distracting advertisements and enjoy a clean and clutter-free browsing experience.
Blocking popups: Popups can be a major annoyance when browsing the web. Squirtfilter can help you block popups and other unwanted content from appearing on your screen.
Customizing website layouts: With Squirtfilter, you can customize the layout of any website by removing or hiding certain elements. For example, you can hide the sidebar of a news website to focus on the main content.
Blocking malicious content: Squirtfilter can help protect your computer from malicious content on websites by blocking ads and other elements that are known to contain malware.
Squirtfilter is a powerful and easy-to-use ruleset language that can enhance your browsing experience and protect your computer from malicious content. With its simple syntax, advanced features, and unique naming, Squirtfilter is the most performant filter to date. If you're looking for an easy and effective way to customize your browsing experience, give Squirtfilter a try.
For more information and to download Siyuan AdBlocker, check out the project's GitHub repository at https://github.com/siyuan-group/siyuan. You can also find the Chrome webstore link, the Firefox extensions link, and Siyuan Ding's personal webpage at https://siyuanw.cn/.