From ed11a572c92300ed148572149e3be807d250179e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=95=E5=B1=82=E7=94=A8=E6=88=B7?= Date: Thu, 4 Aug 2022 10:41:47 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=8E=BB?= =?UTF-8?q?=E9=99=A4=E9=BC=A0=E6=A0=87=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/main.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/js/main.js b/js/main.js index 437d6ca..da4eb3e 100644 --- a/js/main.js +++ b/js/main.js @@ -40,11 +40,7 @@ body.addEventListener('mousemove', (e) => { }); }); -//移动端去除鼠标样式 -switch (true) { - case navigator.userAgent.indexOf('Mobile') > 0: - $('#g-pointer-2').css("display", "none"); -} + //加载完成后执行 window.addEventListener('load', function () { @@ -79,6 +75,11 @@ window.addEventListener('load', function () { // ); // document.fonts.add(font); + //移动端去除鼠标样式 + if (Boolean(window.navigator.userAgent.match(/AppWebKit.*Mobile.*/))) { + $('#g-pointer-2').css("display", "none"); + } + }, false) setTimeout(function () { @@ -388,7 +389,7 @@ document.oncontextmenu = function () { } //控制台输出 -console.clear(); +//console.clear(); let styleTitle1 = ` font-size: 20px; font-weight: 600;