anka-213 / webcomic_reader

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

Add an option to disable Javascript on a site #19

Closed Darayavaush closed 8 years ago

Darayavaush commented 8 years ago

Some sites have scripts that interfere with correct functioning of WCR - for example, mangakoi.com and mangapark.me use their own pagination hotkeys, so the page gets refreshed after WCR goes to the prefetched one, while mangahere.co prevents prefetch of pages under certain circumstances.

anka-213 commented 8 years ago

I don't think it's possible to disable javascript on a site from a userscript, but it's usually possible to negate the effects with some custom scripts for the site.

Darayavaush commented 8 years ago

It is possible using this script, for example - https://gist.github.com/BrockA/2620593 I've used it and it suppresses site hotkeys as expected.

anka-213 commented 8 years ago

@Darayavaush To use that method, I need to change when the script is loaded. I am afraid that the change will break much of the code, and force a major restructuring of the code. It's probably easier to just use an external blocker.

anka-213 commented 8 years ago

The patch 843bd42e238d0792e should fix most issues with page navigation scripts. If there are still any issues, please open a specific bug report about that specific site. For the rest, just use an external blocker.