Spaces:
Paused
Paused
Update index.html
Browse files- index.html +3 -1
index.html
CHANGED
|
@@ -72,7 +72,7 @@
|
|
| 72 |
</div>
|
| 73 |
</div>
|
| 74 |
|
| 75 |
-
<script
|
| 76 |
function loadScript() {
|
| 77 |
var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) && !/Edg/.test(navigator.userAgent);
|
| 78 |
var isDesktop = window.innerWidth > 768;
|
|
@@ -81,6 +81,7 @@
|
|
| 81 |
existingScript.remove();
|
| 82 |
}
|
| 83 |
var script = document.createElement('script');
|
|
|
|
| 84 |
if (isChrome && isDesktop) {
|
| 85 |
script.src = 'script1.js';
|
| 86 |
} else {
|
|
@@ -93,5 +94,6 @@
|
|
| 93 |
}
|
| 94 |
document.addEventListener('DOMContentLoaded', loadScript);
|
| 95 |
</script>
|
|
|
|
| 96 |
</body>
|
| 97 |
</html>
|
|
|
|
| 72 |
</div>
|
| 73 |
</div>
|
| 74 |
|
| 75 |
+
<script>
|
| 76 |
function loadScript() {
|
| 77 |
var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) && !/Edg/.test(navigator.userAgent);
|
| 78 |
var isDesktop = window.innerWidth > 768;
|
|
|
|
| 81 |
existingScript.remove();
|
| 82 |
}
|
| 83 |
var script = document.createElement('script');
|
| 84 |
+
script.type = 'module'; // Set the script type to module
|
| 85 |
if (isChrome && isDesktop) {
|
| 86 |
script.src = 'script1.js';
|
| 87 |
} else {
|
|
|
|
| 94 |
}
|
| 95 |
document.addEventListener('DOMContentLoaded', loadScript);
|
| 96 |
</script>
|
| 97 |
+
|
| 98 |
</body>
|
| 99 |
</html>
|