SoraHjort / webcomic_reader

Webcomic Reader userscript at
https://openuserjs.org/scripts/anka-213/Webcomic_Reader
MIT License
11 stars 1 forks source link

Change in implementation for previous xpath fix #35

Closed SoraHjort closed 1 year ago

SoraHjort commented 1 year ago

In reference to the xpath fix here https://github.com/SoraHjort/webcomic_reader/commit/6da2272cda37dde78425d7c3f472efa41a184705

Reasoning: Most if not all updated browsers to modern standards have along the lines of (KHTML, like Gecko) in their user agents to trick scripts to not exclude them. Most JS scripts see that Gecko exists and go "ok!". But because WCR is checking for Gecko/, it's allowing it.

This is what this commit does. It undoes the changes that commented out the offending lines, and instead change the isFirefox function to just check if Gecko is in the useragent, and nothing more.

Also some minor stuff: I left several commentated notes in there to remind me to delete some comments I made as reminders of what I did.