Hacker News new | ask | show | jobs
by vldo 2206 days ago
i have a bookmark for it: javascript:(function () %7Bdocument.designMode%3D'on'%7D)()
1 comments

I actually have this one :

javascript:(function () { document.designMode == 'on' ? document.designMode = 'off' : document.designMode = 'on';})()

Just so you know, the immediately-invoked function expression (IIFE) syntax is unnecessary here. This would do:

  javascript:document.designMode=document.designMode=='on'?'off':'on'
Doesn't seem to work in chrome. Clicking it just sends you to a page that says "on"
This works for me in Chrome and Firefox, and is a bit shorter than the others (excluding your parent).

javascript:(function () {document.designMode=document.designMode=='on'?'off':'on';})()