initiate copy on android instead of following links
This commit is contained in:
@ -67,7 +67,7 @@ window.renderPortalDetails = function(guid) {
|
||||
+ '<div class="mods">'+getModDetails(d)+'</div>'
|
||||
+ randDetails
|
||||
+ resoDetails
|
||||
+ '<div class="linkdetails">'+ '<aside><a href="'+perma+'">portal link</a></aside>'
|
||||
+ '<div class="linkdetails"><aside><a href="'+perma+'" onclick="return androidCopy(this.href)" >portal link</a></aside>'
|
||||
+ '<aside><a onclick="'+poslinks+'">poslinks</a></aside>'
|
||||
+ '<aside><a onclick="alert(\''+postcard+'\');">donate</a></aside>'
|
||||
+ '<aside><a onclick="window.reportPortalIssue()">report issue</a></aside>'
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user