// 检测是否为移动端
function isMobile() {
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
}
// 如果是移动端且当前不是 mobile 页面,则重定向到移动端页面
// if (isMobile()) {
// // 如果是移动端,将 xxx.html 替换为 xxx-mob.html
// var currentPath = window.location.pathname;
// if (currentPath.endsWith('.html') && !currentPath.includes('-mob.html')) {
// var newPath = currentPath.replace(/\.html$/, '-mob.html');
// window.location.href = newPath;
// }
// } else {
// // 如果是桌面端,将 xxx-mob.html 替换为 xxx.html
// var currentPath = window.location.pathname;
// if (currentPath.endsWith('-mob.html')) {
// var newPath = currentPath.replace(/-mob\.html$/, '.html');
// window.location.href = newPath;
// }
// }
setTimeout(function () {
isMobile() && toggleNav('close');
},1000);
function toggleNav(status) {
$('.download-footer, .nav-links, .assets-banner, .sidenav').hide();
$(".article-pc").addClass("article").removeClass("article-pc");
$(".content-pc").addClass("content").removeClass("content-pc");
var elements = document.getElementsByClassName('common-navbar-wrapper');
if(status == 'open') {
elements[0].innerHTML = `