Spaces:
Running
Running
Update index.html
Browse files- index.html +1 -1
index.html
CHANGED
@@ -106,7 +106,6 @@
|
|
106 |
const isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) && !/Edg/.test(navigator.userAgent);
|
107 |
const isDesktop = window.innerWidth > 768;
|
108 |
let scriptSrc;
|
109 |
-
|
110 |
if (isChrome && isDesktop) {
|
111 |
scriptSrc = 'script1.js';
|
112 |
} else {
|
@@ -120,6 +119,7 @@
|
|
120 |
|
121 |
const script = document.createElement('script');
|
122 |
script.src = scriptSrc;
|
|
|
123 |
script.async = true;
|
124 |
script.setAttribute('data-custom', 'true');
|
125 |
script.onerror = () => console.error('Error loading script:', scriptSrc);
|
|
|
106 |
const isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) && !/Edg/.test(navigator.userAgent);
|
107 |
const isDesktop = window.innerWidth > 768;
|
108 |
let scriptSrc;
|
|
|
109 |
if (isChrome && isDesktop) {
|
110 |
scriptSrc = 'script1.js';
|
111 |
} else {
|
|
|
119 |
|
120 |
const script = document.createElement('script');
|
121 |
script.src = scriptSrc;
|
122 |
+
script.type = 'module';
|
123 |
script.async = true;
|
124 |
script.setAttribute('data-custom', 'true');
|
125 |
script.onerror = () => console.error('Error loading script:', scriptSrc);
|