Created
October 1, 2010 15:20
-
-
Save davecowart/606343 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name No Comment | |
// @namespace http://daveandbritney.com/greasemonkey | |
// @description hides ALL comments on AL.com | |
// @include http://*.al.com/* | |
// ==/UserScript== | |
var allComments, thisComment, allReplies; | |
allComments = document.evaluate("//div[@class='comment']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = 0; i < allComments.snapshotLength; i++) { | |
thisComment = document.getElementById(allComments.snapshotItem(i).id) | |
if (thisComment) { | |
thisComment.parentNode.removeChild(thisComment); | |
} | |
} | |
allReplies = document.evaluate("//div[@class='comment reply']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | |
for (var i = 0; i < allReplies.snapshotLength; i++) { | |
thisComment = document.getElementById(allReplies.snapshotItem(i).id) | |
if (thisComment) { | |
thisComment.parentNode.removeChild(thisComment); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment