index.html 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <link rel="icon" href="./favicon.ico" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <title>管乐迷</title>
  8. <<<<<<< HEAD
  9. <script type="module" crossorigin src="./assets/index.69bf2a50.js"></script>
  10. <link rel="modulepreload" href="./assets/vendor.8df6bc42.js">
  11. =======
  12. <script type="module" crossorigin src="./assets/index.39db2823.js"></script>
  13. <link rel="modulepreload" href="./assets/vendor.fef4890b.js">
  14. >>>>>>> master
  15. <link rel="stylesheet" href="./assets/index.cd9189f2.css">
  16. <script type="module">!function(){try{new Function("m","return import(m)")}catch(o){console.warn("vite: loading legacy build because dynamic import is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}}();</script>
  17. </head>
  18. <body>
  19. <div id="app"></div>
  20. <div id="notification_1" class="el-notification right hide" role="alert" style="top: 16px; z-index: 2011;"><i class="el-icon el-notification__icon el-notification--info"><svg class="icon" width="200" height="200" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a448 448 0 110 896.064A448 448 0 01512 64zm67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344zM590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 01-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 017.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"></path></svg></i><div class="el-notification__group"><h2 class="el-notification__title">提示</h2><div class="el-notification__content"><p>为了保障更好的直播体验,建议使用chrome浏览器</p></div><i id="noClose" class="el-icon el-notification__closeBtn"><svg class="icon" width="200" height="200" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M764.288 214.592L512 466.88 259.712 214.592a31.936 31.936 0 00-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1045.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0045.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 10-45.12-45.184z"></path></svg></i></div></div>
  21. <script>
  22. var win = window;
  23. var nav = win.navigator;
  24. var doc = win.document;
  25. var ieAX = win.ActiveXObject;
  26. var ieMode = doc.documentMode;
  27. var REG_APPLE = /^Apple/;
  28. // var ieVer = _getIeVersion() || ieMode || 0;
  29. var isIe = ieAX || ieMode;
  30. // var chromiumType = _getChromiumType();
  31. /**
  32. * 检测 external 是否包含该字段
  33. * @param reg 正则
  34. * @param type 检测类型,0为键,1为值
  35. * @returns {boolean}
  36. * @private
  37. */
  38. function _testExternal(reg, type) {
  39. var external = win.external || {};
  40. for (var i in external) {
  41. if (reg.test(type ? external[i] : i)) {
  42. return true;
  43. }
  44. }
  45. return false;
  46. }
  47. /**
  48. * 获取 Chromium 内核浏览器类型
  49. * @link http://www.adtchrome.com/js/help.js
  50. * @link https://ext.chrome.360.cn/webstore
  51. * @link https://ext.se.360.cn
  52. * @return {String}
  53. * 360ee 360极速浏览器
  54. * 360se 360安全浏览器
  55. * sougou 搜狗浏览器
  56. * liebao 猎豹浏览器
  57. * chrome 谷歌浏览器
  58. * '' 无法判断
  59. * @version 1.0
  60. */
  61. function _getChromiumType() {
  62. if (isIe || typeof win.scrollMaxX !== 'undefined' || REG_APPLE.test(nav.vendor || '')) {
  63. return '';
  64. }
  65. var _track = 'track' in document.createElement('track');
  66. var webstoreKeysLength = win.chrome && win.chrome.webstore ? Object.keys(win.chrome.webstore).length : 0;
  67. console.log(webstoreKeysLength)
  68. // 搜狗浏览器
  69. if (_testExternal(/^sogou/i, 0)) {
  70. return 'sogou';
  71. }
  72. // 猎豹浏览器
  73. if (_testExternal(/^liebao/i, 0)) {
  74. return 'liebao';
  75. }
  76. // chrome 由于360极速浏览器 内核也是 chrome,所以先判断360极速浏览器
  77. if (win.clientInformation && win.clientInformation.permissions) {
  78. return 'chrome';
  79. }
  80. if (_track) {
  81. // 360极速浏览器
  82. // 360安全浏览器
  83. return webstoreKeysLength > 1 ? '360ee' : '360se';
  84. }
  85. return '';
  86. }
  87. // 获得ie浏览器版本
  88. function _getIeVersion() {
  89. var v = 3,
  90. p = document.createElement('p'),
  91. all = p.getElementsByTagName('i');
  92. while (
  93. p.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
  94. all[0]);
  95. return v > 4 ? v : 0;
  96. }
  97. function getBrowserInfo() {
  98. const userAgent = navigator.userAgent.toLocaleLowerCase();
  99. if (userAgent.match(/chrome/) != null) {
  100. if (userAgent.match(/wow64/) != null) {
  101. return false
  102. } else {
  103. return true
  104. }
  105. }
  106. }
  107. var isChrome = getBrowserInfo()
  108. var isCloseBrowser = sessionStorage.getItem('isCloseBrowser')
  109. console.log(isChrome, isCloseBrowser)
  110. // 如果不是360浏览器会提示
  111. if((!isChrome) && !isCloseBrowser) {
  112. console.log(document.getElementById('notification_1').className)
  113. document.getElementById('notification_1').className = 'el-notification right'
  114. // document.getElementById('notification_1').classList.remove('hide')
  115. sessionStorage.removeItem('isCloseBrowser')
  116. }
  117. document.getElementById('noClose').onclick = function() {
  118. // document.getElementById('notification_1').classList.add('hide')
  119. document.getElementById('notification_1').className = 'el-notification right hide'
  120. sessionStorage.setItem('isCloseBrowser', 1)
  121. }
  122. </script>
  123. <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
  124. <<<<<<< HEAD
  125. <script nomodule id="vite-legacy-polyfill" src="./assets/polyfills-legacy.7f3fc881.js"></script>
  126. <script nomodule id="vite-legacy-entry" data-src="./assets/index-legacy.745a6ab0.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
  127. =======
  128. <script nomodule id="vite-legacy-polyfill" src="./assets/polyfills-legacy.3fc2007f.js"></script>
  129. <script nomodule id="vite-legacy-entry" data-src="./assets/index-legacy.4d72b509.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
  130. >>>>>>> master
  131. </body>
  132. </html>