From bc63c47d47116855069b5009f0f4a50033037c18 Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Tue, 12 Mar 2013 00:30:27 +0100 Subject: [PATCH] initiate copy on android instead of following links --- code/portal_detail_display.js | 2 +- code/utils_misc.js | 8 ++++++++ main.js | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/code/portal_detail_display.js b/code/portal_detail_display.js index 8e7a2a71..7405b37a 100644 --- a/code/portal_detail_display.js +++ b/code/portal_detail_display.js @@ -67,7 +67,7 @@ window.renderPortalDetails = function(guid) { + '
'+getModDetails(d)+'
' + randDetails + resoDetails - + '
'+ '' + + '
' + '' + '' + '' diff --git a/code/utils_misc.js b/code/utils_misc.js index 6bc21eb5..e41ab23d 100644 --- a/code/utils_misc.js +++ b/code/utils_misc.js @@ -118,6 +118,14 @@ window.showPortalPosLinks = function(lat, lng) { } } +window.androidCopy = function(text) { + if(typeof android === 'undefined' || !android || !android.copy) + return true; // i.e. execute other actions + else + android.copy(text); + return false; +} + window.reportPortalIssue = function(info) { var t = 'Redirecting you to a Google Help Page.\n\nThe text box contains all necessary information. Press CTRL+C to copy it.'; var d = window.portals[window.selectedPortal].options.details; diff --git a/main.js b/main.js index d8563407..55134df9 100644 --- a/main.js +++ b/main.js @@ -97,7 +97,7 @@ document.getElementsByTagName('body')[0].innerHTML = '' + '
' + ' ' + '
' - + ' permalink' + + ' permalink' + ' IITC’s page
' + '
' + '
'