Last active
June 2, 2017 13:44
-
-
Save BlainMaguire/839e79d44d02dcf45efda0a103ae6991 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:text/html,<body style=margin:0><canvas id=c><script>var a,d=document,e=c.getContext("2d");c.width=innerWidth;c.height=innerHeight;e.lineWidth=9;e.lineJoin=e.lineCap="round";d.onmousedown=function(b){e.beginPath();a=!e.moveTo(b.clientX,b.clientY)};d.onmousemove=function(b){return a&&(e.lineTo(b.clientX,b.clientY),e.stroke())};d.onmouseup=function(){return a=0};d.onkeyup=function(b){switch(b.keyCode){case 32:e.strokeStyle=prompt("Enter new colour",e.strokeStyle);case 189:e.lineWidth--;break;case 187:e.lineWidth++}};</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instant Whiteboard Anywhere
Paste into browser address bar to get a whiteboard.
Left click and drag will draw.
Space will prompt you to change colour.
'-' and '=' keys will make the stroke size bigger or smaller.
Right click to copy to the clipboard or save as an image.
You can also create a 'notepad' by pasting the following into your browser:
data:text/html, <html contenteditable>
Both can be added to your browser bookmarks so you can use them at your convenience.