diff options
Diffstat (limited to 'src/buttons.js')
| -rw-r--r-- | src/buttons.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/buttons.js b/src/buttons.js index 500d56fc..e5e37f52 100644 --- a/src/buttons.js +++ b/src/buttons.js @@ -20,6 +20,13 @@ $('.export a').click(function() { saveAs(blob, filename); }); +$('.url-copy a').click(function() { + var json = rz_core.graph.save_to_json(); + // TODO use jquery BBQ $.param({json: json}); + var encoded = document.location.origin + '/?json=' + encodeURIComponent(json); + window.prompt('Copy to clipboard: Ctrl-C, Enter (or Cmd-C for Mac)', encoded); +}); + var really_load = function() { if (!rz_core.graph.empty()) { return confirm('All unsaved changes will be deleted, are you sure?'); |
