Anonymous

MediaWiki:Common.js: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 847: Line 847:


function showIOSAppDownloadLink() {
function showIOSAppDownloadLink() {
    if (window.navigator.userAgent.match(/iPhone|iPad|iPod/i) && !window.navigator.userAgent.includes('gonative melvorwiki')) {
const shouldShowDownload = window.navigator.userAgent.match(/iPhone|iPad|iPod/i) && !window.navigator.userAgent.includes('gonative melvorwiki');
        const els = document.getElementsByClassName('ios-app-download');
    const els = document.getElementsByClassName('ios-app-download');
        els.forEach((el) => {
    els.forEach((el) => {
        el.style.display = 'block';
    if(shouldShowDownload) {
        });
    el.style.display = 'block';
     }
    }
    else {
    el.style.display = 'none';
    }
     });
}
}