I might have given you my experimental version of v97 - Sorry.
I can confirm that's working as intended in 98 onwards. I aim to test this on different browsers today at some point.

- 2025-03-12-06-12-55.png (16.27 KiB) Viewed 16065 times

- 2025-03-12-06-13-19.png (13.88 KiB) Viewed 16065 times
Thank you for the dark mode / light mode detection. I'll add that in, and include it in "testing2.html" as well.
edit:
line 129 of interpreter.js
Code: Select all
detectAppearance() {
// Check if the browser supports the prefers-color-scheme media query
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
return 'dark';
} else {
return 'light';
}
}
Then I added the appearance handler at line 1360
Code: Select all
// Handle "the appearance"
if (expr.trim().toLowerCase() === 'the appearance') {
return this.detectAppearance();
}
Then I added the test for it in test-suite-2.js at line 192
Code: Select all
// Test appearance function
await this.runTest("Appearance function test", [
'put the appearance into tResult',
'put tResult'
], "Testing the appearance function to detect dark/light mode");
Much appreciated:

- appearance.png (3.11 KiB) Viewed 16033 times
so, did a bit of testing. I thought (just for a laugh), I'd test this on an old version of MacOS (10.9 Mavericks).

- testing_Mac OS Mavericks.png (355.98 KiB) Viewed 15979 times
Ended up running it in Waterfox, which is based on Firefox, but with older OS-compatible APIs. Safari chokes on the CSS styling, before I even get to the script, and then refuses to run anything as it can't understand the javascript classes. Ho-hum, I did think that might be the case.
In fact, I could probably start a related-rant on the state of Safari on earlier versions of MacOS now. Just shows how much the web (and related technologies) has moved on. Can't even get to download waterfox on MacOS 10.11 El-Capitan, before Safari crashes.

- Safari-El Capitan 10.11.png (140.52 KiB) Viewed 15961 times
Working fine in Safari on MacOS 12 though:

- safari-macos12.png (248.69 KiB) Viewed 15915 times