Point like and spit bad Adblock plus~ Advanced Tutorial

Source: Internet
Author: User
Tags script tag

Preface: Adblock Plus is referred to as ABP, this is an ABP advanced tutorial! Implement Flashblock and NoScript with ABP. Recommended to have a fairly basic reading! Beginners first understand here: Http://adblockplus.org/zh_CN/filters

First boast ABP, it is the most popular, the most sophisticated syntax and rigorous filtering software, other similar to it as the standard! It divided the network resources into several categories according to the following options:
script--external script, loaded by HTML script tag
image--normal picture, usually loaded by the HTML img tag
stylesheet--external CSS style files
object--content processed by the browser plugin, such as Flash or Java
Xmlhttprequest--xmlhttprequest Object
object-subrequest--plug-in requests, such as Flash
subdocument--embedded pages, usually embedded in HTML frame style
MEDIA--HTML5 the Audio,video tag specifies the multimedia resource
document--the Web page itself (applies to exception rules only)
elemhide--applies only to exception rules, similar to document but disables hidden rules on the page instead of all rules (requires ABP1.2 or later)
other--other types of requests that are not in the above

This classification, in order to more targeted filtering ads!

The most powerful syntax for ABP is: third-party, domain two options and ~ antisense, note ~ can be used for domain names and options (~stylesheet is very common).
For example |https://$third-party,domain=greasyfork.org , all third-party ads in Greasyfork.org are blocked with just one statement. |http://$script,domain=ty2016.com|eywedu.com|365essay.comThis statement implements NoScript to prohibit n multi-site scripts.

Third-party,domain option combination is an artifact! As
|http://$script,third-party,domain=dy1000.com|yatu.tv

Yatu.tv ad Script is embedded in the Web page, so there is no way to filter directly, and its call to the advertising platform is also a frequent change, but the previous statement status quo, a statement to deal with N multi-site third resources (more than the specified script)! Interested can be tested: all the other rules are deleted, only the last one, yatu.tv or clean!

A statement implements Flashblock:

|http://$object,domain=~youku.com|~tudou.com|~iqiyi.com|~pps.tv|~yatu.tv|~1ting.com

There are Flashblock can be deleted!!

Write filter rules feel inconvenient, want to add a similar ^ substitution symbol, such as
Use the ' refer to./-_ and other connectors.

Below the ABP, or look forward to ABP!
Things you can't do with ABP:
1. Modifying the DOM
2, $third-party option for three-segment domain name does not work (this is the ABP bug, from the source, this feature is easy to implement), but there are alternative ways, such as |http://live.ali213.net/$domain=~live.ali213.net
3, can not filter the script embedded in the Web page, this is very good understanding ~ because the first article
4, do not implement the blacklist, such as some harmful sites, set the URL can not prohibit access, only indirectly with the $popup option, but also can not prevent directly from the address bar access.

ABP for Chrome features flaws, or not as a place for Firefox edition:
1, similar syntax | | Cnzz. [BUG] is not supported and can only be replaced by multiple matching statements:
|http://cnzz.
|http://*.cnzz.*^

If you want to support the HTTPS protocol will change four!
2, to o b j e c t , Object-subrequest two option support is not enough, workaround, carefully set the URL, such as:|http://*.swf^$domain=youku.com
,firefox:|http://$object,domain=youku.com
, but the difference is obvious, Firefox completely masks the player, and chrome shows that the movie can't be loaded.
3, [BUG] $domain set up a number of domain names, if there are three segments of the domain name, there will be a failure situation. This situation is evident in Windows 6 and 360, the built-in ABP of the world's fastest browser!

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Point like and spit bad Adblock plus~ Advanced Tutorial

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.