Merge branch 'crohrer_main'

This commit is contained in:
Manuel Schmid 2024-01-06 12:59:55 +01:00
commit bb57ed452c
No known key found for this signature in database
GPG Key ID: 32C4F7569B40B84B
2 changed files with 5 additions and 1 deletions

View File

@ -45,6 +45,9 @@ function processTextNode(node) {
var tl = getTranslation(text);
if (tl !== undefined) {
node.textContent = tl;
if (text && node.parentElement) {
node.parentElement.setAttribute("data-original-text", text);
}
}
}

View File

@ -159,7 +159,8 @@ function initStylePreviewOverlay() {
label.addEventListener("mouseout", onMouseLeave);
overlayVisible = true;
overlay.style.display = "block";
const name = label.querySelector("span").textContent;
const originalText = label.querySelector("span").getAttribute("data-original-text");
const name = originalText || label.querySelector("span").textContent;
overlay.style.backgroundImage = `url("${samplesPath.replace(
"Fooocus V2",
name