Fix bugs.

This commit is contained in:
Bruce
2025-12-22 23:58:53 +08:00
parent 4cf0a0a55d
commit 621c6fcfd3
5 changed files with 31 additions and 7 deletions

View File

@@ -74,7 +74,7 @@
</ul>
</nav>
</aside>
<iframe class="main right"></iframe>
<iframe class="main right" defer loading="lazy" async></iframe>
</div>
</div>
</body>

View File

@@ -329,7 +329,15 @@
iframe.contentWindow.Theme.currentColor = color;
iframe.contentWindow.Theme.currentTheme = id;
};*/
iframe.src = previewHtml + "?color=" + color + "&id=" + id;
setTimeout(function(iframenode, iframesrc) {
iframenode.src = iframesrc;
}, 0, iframe, previewHtml + "?color=" + color + "&id=" + id);
// iframe.src = previewHtml + "?color=" + color + "&id=" + id;
try {
iframe.defer = true;
iframe.loading = "lazy";
iframe.async = true;
} catch (e) {}
item.appendChild(iframe);
var colorstr = "light";
if (color === Theme.ColorType.dark) colorstr = "dark";
@@ -467,7 +475,7 @@
<br>
<h3 data-res-fromfile="publicRes (174)"></h3>
<label data-res-fromfile="publicRes (175)"></label><br>
<iframe src="../../preview.html" id="theme-custom-preview"></iframe>
<iframe src="../../preview.html" id="theme-custom-preview" defer loading="lazy" async></iframe>
<br><br>
<button id="jump-editpage" data-res-fromfile="publicRes (176)"></button>
<script>

View File

@@ -46,7 +46,7 @@
</ul>
</nav>
</aside>
<iframe class="main right"></iframe>
<iframe class="main right" defer loading="lazy" async></iframe>
</div>
</div>
</body>