diff options
author | Özgür Kesim <oec@codeblau.de> | 2017-11-27 09:40:31 -0800 |
---|---|---|
committer | Özgür Kesim <oec@codeblau.de> | 2017-11-27 09:40:31 -0800 |
commit | 3256e0bbb5a077e16d2548b837b3d1e62346e6e3 (patch) | |
tree | 24fabc268cb3d29c9d2da6ae68d088e105d6b234 | |
parent | cdb8e9cb03051123f21c9fdb50d9e3ac1ebc5e7d (diff) |
added ctrl-s -> share()
-rw-r--r-- | index.html | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -92,8 +92,8 @@ svg { {{ .Cur.Example }} </textarea> <div id="mid"> - <button id="run" class="button" onclick="run()" title="or ctrl-enter in editor">run</button> - <button id="save" class="button" onclick="share()">share</button><span id="link"></span> + <button id="run" class="button" onclick="run()" title="or ctrl-enter in editor">run</button> + <button id="save" class="button" onclick="share()" title="or ctrl-s in editor">share</button><span id="link"></span> <input id="file" type="file" name="file" class="button"/> <input id="scale" type ="range" min ="0.5" max="3" step ="0.1" value ="1"/> <span id="doc"> @@ -121,6 +121,9 @@ window.onkeydown=function(e) { if (e.ctrlKey && e.key == "Enter") { e.preventDefault(); run(); + } else if (e.ctrlKey && e.key == "s") { + e.preventDefault(); + share(); } } @@ -131,6 +134,7 @@ filein.onchange=function() { editor.setValue(e.target.result); }; reader.readAsText(file); + filein.value=""; window.location.hash=""; } |