var uaContains = function (key) {
return navigator.userAgent.toLowerCase().indexOf(key.toLowerCase()) >= 0;
};
// can't just try "Android" as it might catch Windows Phone
var ANDROID = ['Linux', 'Android'].every(uaContains);
// can't just try "iPhone" as it might catch Windows Phone
var IOS = ['(iPhone;', '(iPod touch;', '(iPad;', '(iPod;'].some(uaContains);
var useragent = navigator.userAgent.toLowerCase();
var isWeixin = /micromessenger/i.test(useragent);
if (!IOS) {
document.getElementById('android').style.display = 'block';
document.getElementById('ios').style.display = 'none';
}
var androidBTN = document.getElementById('android');
androidBTN.addEventListener('click', function (e) {
if (isWeixin && ANDROID) {
document.getElementById('tipDiv').style.display = 'block';
document.getElementById('tipimg').style.display = 'block';
document.getElementById('tipDiv').style.height = document.documentElement.scrollHeight + 'px';
}
});