Anonymous

MediaWiki:Common.js: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 772: Line 772:
     } else {
     } else {
     $('.ios-app-download').addClass('d-none');
     $('.ios-app-download').addClass('d-none');
    }
}
function showAndroidAppDownloadLink() {
    var shouldShowDownload = /Android/i.test(window.navigator.userAgent) && window.navigator.userAgent.indexOf('gonative melvorwiki') === -1;
    if (shouldShowDownload) {
    $('.android-app-download').removeClass('d-none');
    } else {
    $('.android-app-download').addClass('d-none');
     }
     }
}
}
Line 782: Line 791:
// Show iOS App download link
// Show iOS App download link
showIOSAppDownloadLink();
showIOSAppDownloadLink();
// Show Android App download link
showAndroidAppDownloadLink();
});
});