Skip to content

Instantly share code, notes, and snippets.

@fabiosantoscode
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabiosantoscode/1cc89f451e60440653e0 to your computer and use it in GitHub Desktop.
Save fabiosantoscode/1cc89f451e60440653e0 to your computer and use it in GitHub Desktop.
A simple JSBin-ish clone for debugging things in tiny or low-performance devices
Copy and paste this URL to your URL bar:
data:text/html,<meta%20charset=utf-8><main><script></script><iframe%20id=iframe></iframe><hr><pre%20id=pad%20onkeyup=update()%20contenteditable></pre><script>function%20update()%20{iframe.src="data:text/html,"+pad.textContent;location.hash=pad.textContent};if(location.hash){pad.textContent=(location.hash+'').replace("%23","")}update();pad.focus();</script><style>*{box-sizing:border-box}%23pad{background:%23333;color:white;padding:2em}iframe%20{%20width:%20100%;%20}@media%20screen%20and%20(min-width:1000px){iframe,pre{width:50%;float:right;margin:0;height:100%}hr{display:none}}</style>#<h1>Hello world!</h1>
To share this, use this HTML:
<a href='data:text/html,&lt;meta%20charset=utf-8&gt;&lt;main&gt;&lt;script&gt;&lt;/script&gt;&lt;iframe%20id=iframe&gt;&lt;/iframe&gt;&lt;hr&gt;&lt;pre%20id=pad%20onkeyup=update()%20contenteditable&gt;&lt;/pre&gt;&lt;script&gt;function%20update()%20{iframe.src="data:text/html,"+pad.textContent;location.hash=pad.textContent};if(location.hash){pad.textContent=(location.hash+"").replace("%23","")}update();pad.focus();&lt;/script&gt;&lt;style&gt;*{box-sizing:border-box}%23pad{background:%23333;color:white;padding:2em}iframe%20{%20width:%20100%;%20}@media%20screen%20and%20(min-width:1000px){iframe,pre{width:50%;float:right;margin:0;height:100%}hr{display:none}}&lt;/style&gt;#&lt;h1&gt;Hello world!&lt;/h1&gt;'>Offline mobile-friendly JSBin bookmarklet</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment