Spaces:
Paused
Paused
Fix: Repositioned renderThemeParticles to correct function scope
Browse files- index.html +1 -1
- src/views/chat/chat-view.js +6 -6
- test.js +3 -10
index.html
CHANGED
|
@@ -52,7 +52,7 @@
|
|
| 52 |
</head>
|
| 53 |
<body class="dark-theme in-chat-view">
|
| 54 |
|
| 55 |
-
<div id="live-version-badge" style="position: fixed; top: 50px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-secondary); opacity: 0.6; z-index: 99999; pointer-events: none; font-weight: 500; font-family: monospace; letter-spacing: 1px; background: rgba(0,0,0,0.2); padding: 2px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.05);">BUILD 1.8.
|
| 56 |
|
| 57 |
<!-- SVG Filters for Liquid Glass Refraction -->
|
| 58 |
<svg width="0" height="0" style="position: absolute; pointer-events: none;">
|
|
|
|
| 52 |
</head>
|
| 53 |
<body class="dark-theme in-chat-view">
|
| 54 |
|
| 55 |
+
<div id="live-version-badge" style="position: fixed; top: 50px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-secondary); opacity: 0.6; z-index: 99999; pointer-events: none; font-weight: 500; font-family: monospace; letter-spacing: 1px; background: rgba(0,0,0,0.2); padding: 2px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.05);">BUILD 1.8.141</div>
|
| 56 |
|
| 57 |
<!-- SVG Filters for Liquid Glass Refraction -->
|
| 58 |
<svg width="0" height="0" style="position: absolute; pointer-events: none;">
|
src/views/chat/chat-view.js
CHANGED
|
@@ -3846,6 +3846,12 @@ body { margin: 0; padding: 0; background: #000; overflow: hidden; display: flex;
|
|
| 3846 |
this.scrollToNewMessage(wrapper);
|
| 3847 |
}
|
| 3848 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3849 |
}
|
| 3850 |
|
| 3851 |
showFeedbackModal(originalText, messageId) {
|
|
@@ -4560,12 +4566,6 @@ body { margin: 0; padding: 0; background: #000; overflow: hidden; display: flex;
|
|
| 4560 |
|
| 4561 |
textNode.replaceWith(...span.childNodes);
|
| 4562 |
});
|
| 4563 |
-
|
| 4564 |
-
if (themeSvgContent) {
|
| 4565 |
-
this.renderThemeParticles(themeSvgContent, wrapper);
|
| 4566 |
-
}
|
| 4567 |
-
|
| 4568 |
-
return wrapper;
|
| 4569 |
}
|
| 4570 |
|
| 4571 |
isBlackAndTransparent(url) {
|
|
|
|
| 3846 |
this.scrollToNewMessage(wrapper);
|
| 3847 |
}
|
| 3848 |
}
|
| 3849 |
+
|
| 3850 |
+
if (themeSvgContent) {
|
| 3851 |
+
this.renderThemeParticles(themeSvgContent, wrapper);
|
| 3852 |
+
}
|
| 3853 |
+
|
| 3854 |
+
return wrapper;
|
| 3855 |
}
|
| 3856 |
|
| 3857 |
showFeedbackModal(originalText, messageId) {
|
|
|
|
| 4566 |
|
| 4567 |
textNode.replaceWith(...span.childNodes);
|
| 4568 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4569 |
}
|
| 4570 |
|
| 4571 |
isBlackAndTransparent(url) {
|
test.js
CHANGED
|
@@ -1,10 +1,3 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
const html = d.contents;
|
| 5 |
-
console.log('Length:', html.length);
|
| 6 |
-
console.log('Results:', (html.match(/class="result /g) || []).length);
|
| 7 |
-
const fs = require('fs');
|
| 8 |
-
fs.writeFileSync('ddg_test.html', html);
|
| 9 |
-
})
|
| 10 |
-
.catch(console.error);
|
|
|
|
| 1 |
+
const content = `[THEME_PARTICLE_SVG: <svg viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"><rect x="230" y="50" width="40" height="400"/></svg>]`;
|
| 2 |
+
const themeSvgRegex = /\[THEME_PARTICLE_SVG:\s*(<svg[\s\S]*?<\/svg>)\s*\]/gi;
|
| 3 |
+
console.log(themeSvgRegex.exec(content));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|