User Tools

Site Tools


UZBL-ab is simple ad blocker written in JS. It allows to remove or alter some dom nodes matched by Xpath expressions.


git clone git://

Adding new rules

To add new rule for UZBL-ab, create new file in your @scripts_dir, lets say mylist.js with following content:

    ab_killByXpath("xpath of element to kill");
    ab_killByXpath("xpath of other element to kill");
    ab_applyByXpath("xpath of element to alter", function(a){code that alters a});

and bind this file to LOAD_COMMIT event, see config file for examples.

“ab_s['']=” means that UZBL-ab following function will apply to all domains that ends with ''. So it will work with '', '', ''. If there are more rules that matches current document.domain, shorter rule will take precedence. So if you define runction for ab_s['net'], and some other function for ab_s[''], and then you go to, uzbl will execute 'net' rule first, and then '' rule.

uzbl-ab.txt · Last modified: 2016/08/31 14:10 (external edit)