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>'
|
+ '<div class="mods">'+getModDetails(d)+'</div>'
|
||||||
+ randDetails
|
+ randDetails
|
||||||
+ resoDetails
|
+ 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="'+poslinks+'">poslinks</a></aside>'
|
||||||
+ '<aside><a onclick="alert(\''+postcard+'\');">donate</a></aside>'
|
+ '<aside><a onclick="alert(\''+postcard+'\');">donate</a></aside>'
|
||||||
+ '<aside><a onclick="window.reportPortalIssue()">report issue</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) {
|
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 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;
|
var d = window.portals[window.selectedPortal].options.details;
|
||||||
|
2
main.js
2
main.js
@ -97,7 +97,7 @@ document.getElementsByTagName('body')[0].innerHTML = ''
|
|||||||
+ ' <div id="portaldetails"></div>'
|
+ ' <div id="portaldetails"></div>'
|
||||||
+ ' <input id="redeem" placeholder="Redeem code…" type="text"/>'
|
+ ' <input id="redeem" placeholder="Redeem code…" type="text"/>'
|
||||||
+ ' <div id="toolbox">'
|
+ ' <div id="toolbox">'
|
||||||
+ ' <a onmouseover="setPermaLink(this)">permalink</a>'
|
+ ' <a onmouseover="setPermaLink(this)" onclick="setPermaLink(this);return androidCopy(this.href)" >permalink</a>'
|
||||||
+ ' <a href="https://github.com/breunigs/ingress-intel-total-conversion#readme" title="IITC = Ingress Intel Total Conversion.\n\nOn the script’s homepage you can:\n– find updates\n– get plugins\n– report bugs\n– and contribute." style="cursor: help">IITC’s page</a></div>'
|
+ ' <a href="https://github.com/breunigs/ingress-intel-total-conversion#readme" title="IITC = Ingress Intel Total Conversion.\n\nOn the script’s homepage you can:\n– find updates\n– get plugins\n– report bugs\n– and contribute." style="cursor: help">IITC’s page</a></div>'
|
||||||
+ ' </div>'
|
+ ' </div>'
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
|
Reference in New Issue
Block a user