Skip to content

Instantly share code, notes, and snippets.

@nathanprocks
Created April 18, 2016 13:32
Show Gist options
  • Save nathanprocks/2ff27a52c0872752924fbfb42f414575 to your computer and use it in GitHub Desktop.
Save nathanprocks/2ff27a52c0872752924fbfb42f414575 to your computer and use it in GitHub Desktop.
Scratch Username Hash Userscript
// ==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(" ");
});
@scratchyone
Copy link

Please convert the "forEach" loop to a for loop. Chrome doesn't seem to support them.

@nathanprocks
Copy link
Author

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