Javascript one-liners
Posted
by
peoro
on Stack Overflow
See other posts from Stack Overflow
or by peoro
Published on 2011-01-16T11:26:02Z
Indexed on
2011/01/16
11:53 UTC
Read the original article
Hit count: 233
Often I find some really cool javascript one liners that you can copy and paste into your browser address bar in order to get some fancy effects or even useful ones.
This, for example, will let you edit anything on the page.
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0
What is your favorite?
EDIT:
I know that technically all these snippets are just javascript scripts that gets evaluated by the browser as if they were defined in the page.
I also know that many browsers have got extensions to let you run javascript code (also letting you store scripts somewhere, providing a good editor etc etc).
However that's not so practical; I'm not a javascript developer, haven't got firebug installed, and I can't install it anywhere I go. My idea idea is that of collecting the best "mini-scripts" that whoever can just copy and paste in his browser without the need of installing extensions and stuff.
© Stack Overflow or respective owner