From f87e1621fdfc6827e77a7815449eba479e43561e Mon Sep 17 00:00:00 2001 From: Philipp Schaefer Date: Wed, 29 Jan 2014 09:44:00 +0100 Subject: [PATCH] iitcm: use share interface on draw tools copy --- plugins/draw-tools.user.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/plugins/draw-tools.user.js b/plugins/draw-tools.user.js index 3b909d7d..55aaf01b 100644 --- a/plugins/draw-tools.user.js +++ b/plugins/draw-tools.user.js @@ -290,12 +290,16 @@ window.plugin.drawTools.optAlert = function(message) { } window.plugin.drawTools.optCopy = function() { - dialog({ - html: '

Select all and press CTRL+C to copy it.

', - width: 600, - dialogClass: 'ui-dialog-drawtoolsSet-copy', - title: 'Draw Tools Export' - }); + if (typeof android !== 'undefined' && android && android.shareString) { + android.shareString(localStorage['plugin-draw-tools-layer']); + } else { + dialog({ + html: '

Select all and press CTRL+C to copy it.

', + width: 600, + dialogClass: 'ui-dialog-drawtoolsSet-copy', + title: 'Draw Tools Export' + }); + } } window.plugin.drawTools.optPaste = function() {