Skip to content

Instantly share code, notes, and snippets.

@brunobord
Last active December 14, 2015 23:58
Show Gist options
  • Save brunobord/5168994 to your computer and use it in GitHub Desktop.
Save brunobord/5168994 to your computer and use it in GitHub Desktop.
JQuery FNU
/** Yeah, thx to @duboisnicolas */
var jq = document.createElement('script');
jq.src = "http://code.jquery.com/jquery-latest.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
$('*').each(function() { $(this).css({background: "#"+((1<<24)*Math.random()|0).toString(16)});});
$('*').each(function() { $(this).css({background: "#"+((1<<24)*Math.random()|0).toString(16)});});

Usage:

  • open any website using jQuery.
  • in the URL type
    javascript:$('*').each(function() { $(this).css({background: "#"+((1<<24)*Math.random()|0).toString(16)});});

Yes! it's ugly!

@chrisglass
Copy link

Ugly, but fun :)

@wo0dyn
Copy link

wo0dyn commented Mar 15, 2013

Just run:

var jq = document.createElement('script');
jq.src = "http://code.jquery.com/jquery-latest.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);

→ profit on every website! 😉

(source: http://stackoverflow.com/a/7474386/1536081)

@brunobord
Copy link
Author

@duboisnicolas : GENIUS!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment