Created
April 18, 2016 13:32
-
-
Save nathanprocks/2ff27a52c0872752924fbfb42f414575 to your computer and use it in GitHub Desktop.
Scratch Username Hash Userscript
This file contains hidden or 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 Scratch Username Hash | |
// @namespace nathanprocks.scratchusernamehash | |
// @version 0.1 | |
// @description Kaj was here | |
// @author nathanprocks | |
// @match https://scratch.mit.edu/discuss/topic/* | |
// @grant none | |
// @require https://cdn.rawgit.com/jupiterio/466bbd644eb3d4b680326da15520071a/raw/be552d004ab21ab8b3bb04e687bb85d231c20554/4096mostFrequentEnglishWords.js | |
// @require https://cdn.rawgit.com/emn178/js-sha3/master/build/sha3.min.js | |
// ==/UserScript== | |
document.querySelectorAll(".black.username").forEach(function(i) { | |
i.title = sha3_512(i.innerText).slice(0,12).match(/.{1,3}/g).map(s=>words[parseInt(s,16)]).join(" "); | |
}); |
It works fine for me on Chrome. I'm using the dev channel, so it might be new?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please convert the "forEach" loop to a for loop. Chrome doesn't seem to support them.