Created
July 23, 2012 16:23
-
-
Save nsheridan/3164546 to your computer and use it in GitHub Desktop.
Vastly improve the readability of youtube comments
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 Youtube Moroniser | |
// @namespace nsheridan | |
// @include http://www.youtube.com/* | |
// ==/UserScript== | |
var thisComment; | |
var comments = document.evaluate("//div[@class='comment-text']", document, null, | |
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, | |
null); | |
if (comments) { | |
for (var i = 0; i < comments.snapshotLength; i++) { | |
thisComment = comments.snapshotItem(i); | |
comments.snapshotItem(i).innerHTML = thisComment.innerHTML + | |
'<p>But then, I\'m a fucking moron</p>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment