Created
November 8, 2016 12:33
-
-
Save andrewiankidd/f25f813f241554bb2b13686483e62146 to your computer and use it in GitHub Desktop.
Replaces Fardad Farahzad with randomly generated names, using WaitforKeyElements and Chance
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 Fardad Farahzad is the first to like everything on facebook | |
// @namespace http://www.mozilla.org/keymast.....s.only.xul); | |
// @include https://www.facebook.com/* | |
// @version 1 | |
// @require http://chancejs.com/chance.js | |
// @require http://code.jquery.com/jquery-latest.js | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js | |
// ==/UserScript== | |
//name to filter | |
var oldname = 'Fardad Farahzad'; | |
//wait for any spans containing old name | |
waitForKeyElements("span:contains('"+oldname+"')", namereplacer); | |
//take passed node, replace any instances of oldname with a rand name | |
function namereplacer(jNode) { | |
jNode.html(jNode.html().toString().replace(oldname, chance.name())); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The script does not seem to work anymore, unfortunately.