Browse Source

新增调试模式

zhuf 1 year ago
parent
commit
d837914d60
1 changed files with 20 additions and 18 deletions
  1. 20 18
      index.html

+ 20 - 18
index.html

@@ -1,22 +1,24 @@
 <!doctype html>
 <html lang="zh-CN">
-  <head>
-    <meta charset="UTF-8" />
-    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>数字教师</title>
-    <script>
-      {
-        const search = new URLSearchParams(location.search)
-        if (search.get('debug')) {
-          var vConsole = new window.VConsole();
-        }
+
+<head>
+  <meta charset="UTF-8" />
+  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
+  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+  <title>数字教师</title>
+  <script>
+    {
+      if (location.href.includes('debug')) {
+        var vConsole = new window.VConsole();
       }
-    </script>
-  </head>
-  <body class="m-0 p-0">
-    <div id="app" class="h-screen w-screen bg-hex-22252f flex flex-col text-white overflow-y-scroll"></div>
-    <script src="/config.js"></script>
-    <script type="module" src="/src/main.ts"></script>
-  </body>
+    }
+  </script>
+</head>
+
+<body class="m-0 p-0">
+  <div id="app" class="h-screen w-screen bg-hex-22252f flex flex-col text-white overflow-y-scroll"></div>
+  <script src="/config.js"></script>
+  <script type="module" src="/src/main.ts"></script>
+</body>
+
 </html>