Safari Technology Preview got an error: You must enable the 'Allow JavaScript from Apple Events' option in Safari's Develop menu to use 'do JavaScript'.
Once I made that setting change the scripts are working for me in Safari Technology Preview Release 158 (Safari 16.4, WebKit 18615.1.12.110.1).
Oops! I forgot to coordinate that setting when I moved from S to STP.
Thanks for reminding me. (I tried the script many times in STP and never got your pop-up.)
The new Great Equalizer is the SEND button.
In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire