Changeset 166
- Timestamp:
- 11/17/07 15:04:28 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
facebook-app-spam/trunk/facebookappspamremover.user.js
r164 r166 1 1 // Facebook App Spam Remover 2 // Version 1.0 1-SVN2 // Version 1.02-SVN 3 3 4 4 // This Greasemonkey script removes the application spam which has … … 49 49 50 50 divs = document.getElementsByTagName('div'); 51 pattern = new RegExp("(^|\\s)(ad_capsule|app_story)(\\s|$)"); 51 spampattern = new RegExp("(^|\\s)(ad_capsule|app_story)(\\s|$)"); 52 bumperpattern = new RegExp("(^|\\s)bumper(\\s|$)"); 53 classpattern = new RegExp("(^|\\s)(one_liner|one_liner_cluster)(\\s|$)"); 52 54 for (i = 0; divs && i < divs.length; i ++) { 53 classes = pattern.exec(divs[i].className) 54 if (classes) { 55 if (spampattern.test(divs[i].className)) { 55 56 divs[i].style.display = "none"; 56 linepattern = new RegExp("(^|\\s)(one_liner|one_liner_cluster)(\\s|$)"); 57 if (linepattern.test(divs[i].nextSibling.className)) { 58 if (classes[2] == 'app_story') { 59 divs[i].previousSibling.lastChild.style.display = "none"; 60 } 57 if (bumperpattern.test(divs[i].previousSibling.lastChild.className)) { 58 divs[i].previousSibling.lastChild.style.display = "none"; 59 } 60 if (classpattern.test(divs[i].nextSibling.className)) { 61 61 divs[i].nextSibling.style.padding = 0; 62 62 divs[i].nextSibling.className="clearfix";
