Hacker News new | ask | show | jobs
by chrismorgan 2206 days ago
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'
1 comments

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';})()