mo пре 1 година
родитељ
комит
c3d1a987cd
1 измењених фајлова са 20 додато и 70 уклоњено
  1. 20 70
      index.html

+ 20 - 70
index.html

@@ -106,23 +106,6 @@
         window.open('https://appstore.ks3-cn-beijing.ksyuncs.com/googlechrome-mac.dmg');
       }
     }
-    const check360 = () => {
-      console.log(navigator)
-      const result = false;
-      for (const key in navigator.plugins) {
-        // np-mswmp.dll只在360浏览器下存在
-        // if (navigator.plugins[key].filename == 'internal-nacl-plugin') {
-        //   console.log('来到插件')
-        //   return !result;
-        // }
-        if (navigator.plugins[key].filename == 'np-mswmp.dll') {
-          console.log('来到插件')
-          return !result;
-        }
-
-      }
-      return result;
-    };
     function getChromeVersion() {
       var arr = navigator.userAgent.split(' ');
       var chromeVersion = '';
@@ -144,57 +127,21 @@
       return false;
     }
 
-    const isChrome = () => {
-
-      const isChromium = window.chrome,
-        winNav = window.navigator,
-        vendorName = winNav.vendor,
-        isOpera = winNav.userAgent.indexOf('OPR') > -1,
-        isIEedge = winNav.userAgent.indexOf('Edge') > -1,
-        isIOSChrome = winNav.userAgent.match('CriOS');
-      // // QQ
-      // isQQBriwser =
-      //   winNav.userAgent.indexOf('QQBrowser') > -1 ||
-      //   winNav.userAgent.indexOf('QQ') > -1,
-      // // 搜狗
-      // isSouggou =
-      //   winNav.userAgent.indexOf('se 2.x') > -1 ||
-      //   winNav.userAgent.indexOf('MetaSr') > -1,
-      // // 360
-      // is360 = check360(),
-      // // 遨游
-      // isMaxthon = winNav.userAgent.indexOf('Maxthon') > -1,
-      // // 是否为2345浏览器
-      // is2345Explorer = winNav.userAgent.includes('2345Explorer'),
-      // // 世界之窗
-      // isTheWorld = winNav.userAgent.indexOf('TheWorld') > -1,
-      // // 猎豹
-      // isLiebao = winNav.userAgent.indexOf('LBBROWSER') > -1;
-      // console.log(winNav.userAgent)
-
-      /*
-            isQQBriwser === false &&
-        isSouggou === false &&
-        is360 === false &&
-        isMaxthon === false &&
-        is2345Explorer === false &&
-        isTheWorld === false &&
-        isLiebao === false
-      */
-      if (isIOSChrome) {
-        return true;
-      } else if (
-        isChromium !== null &&
-        typeof isChromium !== 'undefined' &&
-        vendorName === 'Google Inc.' &&
-        isOpera === false &&
-        isIEedge === false
-
-      ) {
-        return true;
-      } else {
-        return false;
-      }
+    function isChrome() {
+      var isChromium = window.chrome;
+      var winNav = window.navigator;
+      var vendorName = winNav.vendor;
+      var isOpera = typeof window.opr !== 'undefined';
+      var isIEedge = winNav.userAgent.indexOf('Edge') > -1;
+      var isIOSChrome = winNav.userAgent.match('CriOS');
+      return (
+        isIOSChrome ||
+        (isChromium !== null &&
+          typeof isChromium !== 'undefined' &&
+          vendorName === 'Google Inc.' &&
+          isOpera === false &&
+          isIEedge === false)
+      );
     };
     function IEVersion() {
       var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
@@ -227,17 +174,20 @@
     (function (window) {
       if (!isChrome()) {
         // document.writeln("<div class='imgWrap'><img src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699993534.png' class='bgImg' alt=''><img src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699779209.png' class='btnImg' alt=''></div>");
+
+
         if (IEVersion() < 9 && IEVersion() != -1) {
+
           document.writeln(" <div class='textWrap'><h1>当前浏览器版本过低</h1><p class='subMsg'>为了保证良好的上课体验,推荐您使用谷歌浏览器</p> <button class='subBtn' onclick='gotoLinlk()'>下载谷歌浏览器</button>");
           document.execCommand("Stop");
         } else {
           document.writeln(" <div class='imgWrap'><img onabort='this.src=this.src' src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699993534.png' class='bgImg' alt=''><img src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699779209.png'  onabort='this.src=this.src' onclick='gotoLinlk()' class='btnImg' alt=''></div>");
           document.execCommand("Stop");
-          window.stop()
         }
       } else {
         if (getChromeVersion() < 90) {
-          document.writeln(" <div class='imgWrap'><img onabort='this.src=this.src' src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699993534.png' class='bgImg' alt=''><img src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699779209.png' onclick='gotoLinlk()' onabort='this.src=this.src' class='btnImg' alt=''></div>");
+
+          document.writeln(" <div class='imgWrap'><img src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699993534.png' class='bgImg' alt=''><img src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699779209.png' onclick='gotoLinlk()' class='btnImg' alt=''></div>");
           document.execCommand("Stop");
           window.stop()
           console.log('Stop')