debug: log JS console to /tmp/skeledance_console.log via QML handler
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
458c90fb30
commit
8e8bccebe8
2 changed files with 11 additions and 2 deletions
|
|
@ -1067,8 +1067,12 @@ function fetchTheme() {
|
||||||
if (d.rgb) applyTheme(d.rgb);
|
if (d.rgb) applyTheme(d.rgb);
|
||||||
if (d.art_url && d.art_url !== lastArtUrl) {
|
if (d.art_url && d.art_url !== lastArtUrl) {
|
||||||
lastArtUrl = d.art_url;
|
lastArtUrl = d.art_url;
|
||||||
document.getElementById('albumArtImg').src =
|
const artSrc = 'file:///tmp/skeledance_art.jpg?' + Date.now();
|
||||||
'file:///tmp/skeledance_art.jpg?' + Date.now();
|
const artImg = document.getElementById('albumArtImg');
|
||||||
|
console.log('setting art src:', artSrc, 'img el:', !!artImg, 'container opacity:', document.getElementById('albumArt').style.opacity);
|
||||||
|
artImg.onerror = e => console.log('art img error:', e.type, artImg.src);
|
||||||
|
artImg.onload = () => console.log('art img loaded OK, naturalSize:', artImg.naturalWidth, artImg.naturalHeight);
|
||||||
|
artImg.src = artSrc;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,11 @@ WallpaperItem {
|
||||||
onContextMenuRequested: function(request) {
|
onContextMenuRequested: function(request) {
|
||||||
request.accepted = true
|
request.accepted = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onJavaScriptConsoleMessage: function(level, message, lineNumber, sourceID) {
|
||||||
|
var logDs = Qt.createQmlObject('import org.kde.plasma.plasma5support as P5S; P5S.DataSource { engine: "executable" }', webView)
|
||||||
|
logDs.connectSource("echo '[skeledance] " + message.replace(/'/g, '') + " (line " + lineNumber + ")' >> /tmp/skeledance_console.log")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start CAVA on load
|
// Start CAVA on load
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue