JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
youtube: refactor, handle embeds
[userscripts.git] / digg_sponsered.user.js
1 /*\r
2 *   written by JasonWoof 2009 public domain\r
3 */\r
4 \r
5 // ==UserScript==\r
6 // @name          kill digg "sponsored digg"\r
7 // @namespace     http://patcavit.com/greasemonkey\r
8 // @description   digg's sponsored diggs look way too much like content\r
9 // @include       http://digg.com/*\r
10 // ==/UserScript==\r
11 \r
12 (function() \r
13 {\r
14         var divTags;\r
15         if((divTags = document.getElementsByTagName("DIV"))) {\r
16                 for(var a=0; a<divTags.length; a++) {\r
17                         for(var x=0; x<divTags[a].attributes.length; x++) {\r
18                                 if(divTags[a].attributes[x].nodeName.toLowerCase()=='rel') {\r
19                                         if(divTags[a].attributes[x].nodeValue.indexOf("digg-ad:")!=-1) {\r
20                                                 // divTags[a].innerHTML = '';\r
21                                                 divTags[a].parentNode.removeChild(divTags[a]);\r
22                                         }\r
23                                 }\r
24                         }\r
25                 }\r
26         }\r
27 })();\r