-
Notifications
You must be signed in to change notification settings - Fork 1
Description
I eventually took the bad decision to upgrade both Edge and WebView2 to version 143.0.3650.80 and, as expected, I now have the same drag / context menu issue on YouTube as everybody else, plus I'm being forced to not being able to downgrade either. Yay!
I think the cause might be in the plugin, even if all worked with my old runtime for some reason. To test this, in BangCommand.ini:
- use whatever plugin version and your own newer runtime version
- use an URL like
https://www.youtube.com/watch?v=jZriOPN-VmIto go straight to a YouTube video- use an AllowDualControl of
0to start clean and without any additional Javascript interference- have this basic script executed when pressing the "Execute Script" button in that skin:
[TxtExecuteScript] ... LeftMouseUpAction=[!CommandMeasure "WebView" "ExecuteScript document.body.oncontextmenu = (e) => {if (e.ctrlKey) {console.log('contextmenu'); RainmeterAPI.Bang('[!SkinMenu]');};}; console.log('Script executed!');"]
- save and refresh the skin
- press the "Open DevTools" button and go to the developer tools console
- press the "Execute Script" button to inject the above script, at a time of your choosing after the page was loaded
- clear the console to see better what happens when you do the below
- try to CTRL + RMB for the skin context menu on that YouTube page, and this error should appear:
Let me know if you can reproduce it, know why it happens, or how to fix it if it's a bug (in a way that'll work in older runtimes too).
Also, if possible, there should be a way to forward various syntax errors from the script to the user for debug purposes. Try to use
console.log('Script executed!);(i.e. without the ending single quote) in the script and you'll see that it fails silently - which is not necessarily a bad thing, by the way, except the user will be clueless on how to solve the script not working for him in such a case.P.S. I case you somehow think that fixing this doesn't matter if we move to keyboard hooks for the dual control, you're wrong: it affects custom executing scripts too, as seen above. Reliability, compatiblity and features are key to the plugin, in this order.
Originally posted by @Yincognyto in #9
Apparently, Youtube is avoiding the RainmeterAPI from loading at all. It fails the same way even with a simple RainmeterAPI.Bang('[!Log "Test"]')
I suspect this has to do with iFrames, @NSTechBytes, can you please check this?
