added function to detect touch-devices

This commit is contained in:
Philipp Schaefer 2013-11-08 19:50:59 +01:00
parent a595c2f11d
commit 8a8aa1b4d3

View File

@ -459,6 +459,11 @@ window.showPortalPosLinks = function(lat, lng, name) {
}
}
window.isTouchDevice = function() {
return 'ontouchstart' in window // works on most browsers
|| 'onmsgesturechange' in window; // works on ie10
};
window.androidCopy = function(text) {
if(typeof android === 'undefined' || !android || !android.copy)
return true; // i.e. execute other actions