JoeGandy / ShareX-Custom-Upload

A little PHP script created for uploading custom sharex files to your own webserver
MIT License
165 stars 50 forks source link

Fix Firefox theme loading #132

Closed theaquarium closed 3 years ago

theaquarium commented 3 years ago

Fixes #128.

For future reference (and maybe this'll show up in a Google search for someone someday): In Firefox, the onload listener in link tags appears to be run not just when the tag is loaded, but also whenever the tag is marked as myTag.disabled = false.

In our case, this caused an infinite loop whenever dark mode was loaded, since the onload listener would mark the tag as disabled and then would be reenabled by the updateTheme function.

theaquarium commented 3 years ago

141 does this better.