summaryrefslogtreecommitdiff
path: root/.uzbl/scripts/adblock.js
diff options
context:
space:
mode:
Diffstat (limited to '.uzbl/scripts/adblock.js')
-rwxr-xr-x.uzbl/scripts/adblock.js28
1 files changed, 0 insertions, 28 deletions
diff --git a/.uzbl/scripts/adblock.js b/.uzbl/scripts/adblock.js
deleted file mode 100755
index b581f9b..0000000
--- a/.uzbl/scripts/adblock.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var blocklist = new Array();
-blocklist["IMG"] = [["src", /.*doubleclick.net.*/],
- ["src", /.*last.fm\/adserver.*/]];
-
-blocklist["SCRIPT"] = [["src", /.*doubleclick.net.*/]];
-
-blocklist["IFRAME"] = [["name", /.*google_ads.*/],
- ["id", /.*ad-google.*/]];
-
-
-
-
-function adblock(event)
-{
- var tag = event.target.tagName;
- if (!blocklist[tag])
- return;
- for(var i = 0; i < blocklist[tag].length; i++) {
- if (event.target.getAttribute(blocklist[tag][i][0])) {
- if (event.target.getAttribute(blocklist[tag][i][0]).match(blocklist[tag][i][1])) {
- event.preventDefault();
- return;
- }
- }
- }
-}
-
-document.addEventListener("beforeload", adblock, true);