Snd-R / komf-userscript

Komf user script for Komga and Kavita
MIT License
61 stars 7 forks source link

Not working in Safari v17.1 #15

Closed mgrimace closed 6 months ago

mgrimace commented 9 months ago

Hello,

I managed to get the Komf docker working with Komga and Kavita support. I am able to use the userscript in Chrome, but it is not working or appearing for me in Safari.

Here's what I see in the developer console:

Screen Shot 2023-11-30 at 12 47 23 PM

I'm not particularly knowledgeable in userscripts/coding, if there's anything else you need please let me know.

lnlyssg commented 6 months ago

I've found a fix for this based on this post https://stackoverflow.com/questions/40091136/cant-create-duplicate-variable-that-shadows-a-global-property. I changed browser to Browser and it now works OK in Safari.

mgrimace commented 6 months ago

I've found a fix for this based on this post https://stackoverflow.com/questions/40091136/cant-create-duplicate-variable-that-shadows-a-global-property. I changed browser to Browser and it now works OK in Safari.

Thanks! Can I ask which ones/what lines you changed? If I'm understanding correctly the const browser needs to change so it ≠ var value.

lnlyssg commented 6 months ago

As per my reply I changed all instances of browser (lowercase b) to Browser (uppercase B) - I didn't change anything else in the script.

mgrimace commented 6 months ago

As per my reply I changed all instances of browser (lowercase b) to Browser (uppercase B) - I didn't change anything else in the script.

Thanks, ok, from what I can tell the following also works: setting the var as Browser on line 18020 (I only needed to change that line). Thanks for the lead, I'd have never found this otherwise

Screen Shot 2024-03-01 at 11 30 41 AM