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.
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 thatGecko
exists and go "ok!". But because WCR is checking forGecko/
, 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.