mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-12 07:55:11 +08:00
Update index.html
This commit is contained in:
36
index.html
36
index.html
@@ -13,9 +13,39 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
<!-- 统计勿删 -->
|
<!-- 统计勿删 - 异步加载避免阻塞页面 -->
|
||||||
<script charset="UTF-8" id="LA_COLLECT" src="https://sdk.51.la/js-sdk-pro.min.js"></script>
|
<script>
|
||||||
<script>LA.init({ id: "L298GYqn6JhAO0VU", ck: "L298GYqn6JhAO0VU", autoTrack: true, hashMode: true })</script>
|
// 异步加载外部脚本,不阻塞页面渲染
|
||||||
|
(function() {
|
||||||
|
// 51.la 统计
|
||||||
|
var la = document.createElement('script');
|
||||||
|
la.charset = 'UTF-8';
|
||||||
|
la.id = 'LA_COLLECT';
|
||||||
|
la.src = 'https://sdk.51.la/js-sdk-pro.min.js';
|
||||||
|
la.async = true;
|
||||||
|
la.onload = function() {
|
||||||
|
if (typeof LA !== 'undefined') {
|
||||||
|
LA.init({ id: "L298GYqn6JhAO0VU", ck: "L298GYqn6JhAO0VU", autoTrack: true, hashMode: true });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
la.onerror = function() { console.warn('51.la analytics failed to load'); };
|
||||||
|
document.body.appendChild(la);
|
||||||
|
|
||||||
|
// vConsole - 仅在开发环境或调试时加载
|
||||||
|
if (location.hostname === 'localhost' || location.search.includes('debug=1')) {
|
||||||
|
var vc = document.createElement('script');
|
||||||
|
vc.src = 'https://cdn.bootcdn.net/ajax/libs/vConsole/3.15.1/vconsole.min.js';
|
||||||
|
vc.async = true;
|
||||||
|
vc.onload = function() {
|
||||||
|
if (typeof VConsole !== 'undefined') {
|
||||||
|
window.vConsole = new VConsole();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
vc.onerror = function() { console.warn('vConsole failed to load'); };
|
||||||
|
document.body.appendChild(vc);
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user