anka-213 / webcomic_reader

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

Implement drop-down menu #1

Closed anka-213 closed 8 years ago

anka-213 commented 8 years ago

It would be nice to have a drop-down menu of all cached pages for quick navigation. Perhaps something like the one on http://www.mangatown.com.

anka-213 commented 8 years ago

@DCTest1 Now that you are here, can you take a look at this latest addition? I've added a drop-down menu for quick navigation, but I'm unsure about where to place it.

DCTest1 commented 8 years ago

@anka-213 I don't know how or why I landed here, but nothing works now. Not even the hiveworks comics that worked yesterday. with the update "2016.08.30-1" the script seems to be dissabled from working while "2016.08.29-1" worked fine.

on the drop-down-menu: I never cared for such a feature.

anka-213 commented 8 years ago

Huh, strange. It works for me (both firefox and chrome). Which sites doesn't work? Also, do you get any messages in the console (Press Ctrl-Shift-J to open)?

Sorry for dragging you into this, I just wanted some feedback and grabbed the first person available. :P

DCTest1 commented 8 years ago

I downgraded back to 29-1 , sorry but that works for me now. Now I'm worried that the next update will break it for me again.

anka-213 commented 8 years ago

Perhaps I should start using a beta-version for potentially breaking changes, so that not all users are affected. I try to test the code on beforehand, but sometimes I miss something. Sorry, again.

anka-213 commented 8 years ago

@DCTest1 I have added a beta version now, that can be installed beside the normal versions, no data is shared. (They won't work if you try to run both at the same time of course.) If you want to try it, it's available at https://raw.githubusercontent.com/anka-213/webcomic_reader/beta/webcomic_reader.user.js, if you don't want to, you don't have to.

DCTest1 commented 8 years ago

just checked with commit 15745f9 and exhentai seems to work but all hiveworks sites that i wanted and that already worked, DON'T change pages anymore. on "2016.08.29-1" everything worked.

Here is the console of Firefox: 434jumpbar.js:32:1 Error: set[0]/link[-1]: match: /<a [^>]*href *= *"([^\"]+)"([^<]|<[^\/]|<\/[^a])*(back(?!ground)|prev)/i[1] Stack-Trace: match@chrome://greasemonkey-modules/content/sandbox.js -> file:///C:/Users/<Username>/AppData/Roaming/Mozilla/Firefox/Profiles/<ProfileID>.default/gm_scripts/Webcomic_Reader/Webcomic_Reader.user.js:5407:8 contenido@chrome://greasemonkey-modules/content/sandbox.js -> file:///C:/Users/<Username>/AppData/Roaming/Mozilla/Firefox/Profiles/<ProfileID>.default/gm_scripts/Webcomic_Reader/Webcomic_Reader.user.js:5466:10 getLink@chrome://greasemonkey-modules/content/sandbox.js -> file:///C:/Users/<Username>/AppData/Roaming/Mozilla/Firefox/Profiles/<ProfileID>.default/gm_scripts/Webcomic_Reader/Webcomic_Reader.user.js:4953:16 setear@chrome://greasemonkey-modules/content/sandbox.js -> file:///C:/Users/<Username>/AppData/Roaming/Mozilla/Firefox/Profiles/<ProfileID>.default/gm_scripts/Webcomic_Reader/Webcomic_Reader.user.js:4895:20 iniciar@chrome://greasemonkey-modules/content/sandbox.js -> file:///C:/Users/<Username>/AppData/Roaming/Mozilla/Firefox/Profiles/<ProfileID>.default/gm_scripts/Webcomic_Reader/Webcomic_Reader.user.js:4724:3 run_script@chrome://greasemonkey-modules/content/sandbox.js -> file:///C:/Users/<Username>/AppData/Roaming/Mozilla/Firefox/Profiles/<ProfileID>.default/gm_scripts/Webcomic_Reader/Webcomic_Reader.user.js:4678:18 @chrome://greasemonkey-modules/content/sandbox.js -> file:///C:/Users/<Username>/AppData/Roaming/Mozilla/Firefox/Profiles/<ProfileID>.default/gm_scripts/Webcomic_Reader/Webcomic_Reader.user.js:7699:1 @chrome://greasemonkey-modules/content/sandbox.js -> file:///C:/Users/<Username>/AppData/Roaming/Mozilla/Firefox/Profiles/<ProfileID>.default/gm_scripts/Webcomic_Reader/Webcomic_Reader.user.js:1:2 Webcomic_Reader.user.js:5774:29 Error: first: match: /<a [^>]*href *= *"([^\"]+)"([^<]|<[^\/]|<\/[^a])*first/i[1] Stack-Trace: match@chrome://greasemonkey-modules/content/sandbox.js -> file:///C:/Users/<Username>/AppData/Roaming/Mozilla/Firefox/Profiles/<ProfileID>.default/gm_scripts/Webcomic_Reader/Webcomic_Reader.user.js:5407:8 contenido@chrome://greasemonkey-modules/content/sandbox.js -> file:///C:/Users/<Username>/AppData/Roaming/Mozilla/Firefox/Profiles/<ProfileID>.default/gm_scripts/Webcomic_Reader/Webcomic_Reader.user.js:5466:10 getLink@chrome://greasemonkey-modules/content/sandbox.js -> file:///C:/Users/<Username>/AppData/Roaming/Mozilla/Firefox/Profiles/<ProfileID>.default/gm_scripts/Webcomic_Reader/Webcomic_Reader.user.js:4953:16 iniciar@chrome://greasemonkey-modules/content/sandbox.js -> file:///C:/Users/<Username>/AppData/Roaming/Mozilla/Firefox/Profiles/<ProfileID>.default/gm_scripts/Webcomic_Reader/Webcomic_Reader.user.js:4728:16 run_script@chrome://greasemonkey-modules/content/sandbox.js -> file:///C:/Users/<Username>/AppData/Roaming/Mozilla/Firefox/Profiles/<ProfileID>.default/gm_scripts/Webcomic_Reader/Webcomic_Reader.user.js:4678:18 @chrome://greasemonkey-modules/content/sandbox.js -> file:///C:/Users/<Username>/AppData/Roaming/Mozilla/Firefox/Profiles/<ProfileID>.default/gm_scripts/Webcomic_Reader/Webcomic_Reader.user.js:7699:1 @chrome://greasemonkey-modules/content/sandbox.js -> file:///C:/Users/<Username>/AppData/Roaming/Mozilla/Firefox/Profiles/<ProfileID>.default/gm_scripts/Webcomic_Reader/Webcomic_Reader.user.js:1:2

anka-213 commented 8 years ago

I think I know what caused it. It should be fixed in the latest update, that I just uploaded.

DCTest1 commented 8 years ago

also the dropdownmenu doesn't work. it shows just one entry: Prefetched Pages.

will check the new version.

DCTest1 commented 8 years ago

just checked the new version. http://www.marycagle.com/letsspeakenglish/132-paint-the-town <-- doesn't work http://www.kiwiblitz.com/comic/track-01-02 <-- doesn't work http://www.sleeplessdomain.com/comic/chapter-1-page-1 <-- works

i don't know why but one of the three works, and I know for sure that all three used to work. I read the first one with the script already.

anka-213 commented 8 years ago

Thanks. This time I actually checked with both firefox and chrome before committing, so it really should work now.

tallos commented 7 years ago

I seem to be having an issue with this, after updating the script completely ceases to function for me, even the "Webcomic Reader - Settings" and "Webcomic Reader - Disable for this site" are missing from the tampermonkey button menu. Through trial and error i found the problem started at commit 68d56dc9c688eeedb19ab5a9fcd5d9427de4a85e which is when the drop-down menu was added, with a syntax error in console. The last working commit for me was commit 4a5127fe448e7b655dd97d6bd9c9356a0295c98c

console from current commit is below:

Syntax error @ "Webcomic Reader"!
##########################
JSHINT output:
script: (W093) Did you mean to return a conditional instead of an assignment on line: 845 at character: 38
script: (W004) 'sel' is already defined on line: 1213 at character: 41
script: (W004) 'j' is already defined on line: 1214 at character: 45
script: (W093) Did you mean to return a conditional instead of an assignment on line: 1225 at character: 59
script: (W004) 'page' is already defined on line: 1351 at character: 35
script: (W038) 'page' used out of scope on line: 1352 at character: 85
script: (W107) Script URL on line: 2187 at character: 52
script: (W038) 'chap' used out of scope on line: 2646 at character: 25
script: (W038) 'chap' used out of scope on line: 2647 at character: 61
script: (W038) 'chap' used out of scope on line: 2658 at character: 25
script: (W038) 'chap' used out of scope on line: 2659 at character: 61
script: (W004) 'x' is already defined on line: 2851 at character: 30
script: (W004) 'num' is already defined on line: 3198 at character: 36
script: (W004) 'num' is already defined on line: 3211 at character: 36
script: (W041) Use '===' to compare with '0' on line: 3282 at character: 76
script: (W032) Unnecessary semicolon on line: 3282 at character: 108
script: (W004) 'code' is already defined on line: 3292 at character: 25
script: (W032) Unnecessary semicolon on line: 3311 at character: 109
script: (W004) 'code' is already defined on line: 3321 at character: 25
script: (W032) Unnecessary semicolon on line: 3341 at character: 109
script: (W004) 'code' is already defined on line: 3351 at character: 25
script: (W004) 'chap' is already defined on line: 3395 at character: 29
script: (W004) 'pag' is already defined on line: 3397 at character: 29
script: (W004) 'chap' is already defined on line: 3420 at character: 29
script: (W004) 'pag' is already defined on line: 3422 at character: 29
script: (W082) Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function on line: 3540 at character: 25
script: (W004) 'page' is already defined on line: 3812 at character: 29
script: (W004) 'ch' is already defined on line: 3813 at character: 29
script: (W038) 'ch' used out of scope on line: 3815 at character: 35
script: (W038) 'page' used out of scope on line: 3815 at character: 47
script: (W004) 'page' is already defined on line: 3822 at character: 29
script: (W004) 'ch' is already defined on line: 3823 at character: 29
script: (W038) 'ch' used out of scope on line: 3825 at character: 35
script: (W038) 'page' used out of scope on line: 3825 at character: 47
script: (W030) Expected an assignment or function call and instead saw an expression on line: 3908 at character: 18
script: (W087) Forgotten 'debugger' statement on line: 4055 at character: 30
script: (W061) eval can be harmful on line: 4062 at character: 15
script: (W030) Expected an assignment or function call and instead saw an expression on line: 4172 at character: 58
script: (W061) eval can be harmful on line: 4372 at character: 21
script: (W009) The array literal notation [] is preferable on line: 4428 at character: 23
script: (W009) The array literal notation [] is preferable on line: 4430 at character: 25
script: (W009) The array literal notation [] is preferable on line: 4431 at character: 25
script: (W009) The array literal notation [] is preferable on line: 4432 at character: 23
script: (W009) The array literal notation [] is preferable on line: 4433 at character: 21
script: (W009) The array literal notation [] is preferable on line: 4434 at character: 22
script: (W009) The array literal notation [] is preferable on line: 4439 at character: 29
script: (W004) 'i' is already defined on line: 4491 at character: 21
script: (W087) Forgotten 'debugger' statement on line: 4711 at character: 9
script: (W004) 'i' is already defined on line: 4933 at character: 21
script: (W107) Script URL on line: 4970 at character: 34
script: (W038) 'i' used out of scope on line: 5407 at character: 31
script: (W038) 'i' used out of scope on line: 5407 at character: 36
script: (W038) 'i' used out of scope on line: 5407 at character: 50
script: (W038) 'i' used out of scope on line: 5407 at character: 72
script: (W033) Missing semicolon on line: 5790 at character: 48
script: (W032) Unnecessary semicolon on line: 5790 at character: 49
script: (W107) Script URL on line: 5800 at character: 55
script: (W041) Use '===' to compare with '' on line: 5865 at character: 12
script: (W069) ['url'] is better written in dot notation on line: 5872 at character: 75
script: (W069) ['url'] is better written in dot notation on line: 5872 at character: 98
script: (W069) ['title'] is better written in dot notation on line: 5872 at character: 114
script: (W038) 'i' used out of scope on line: 6928 at character: 25
script: (W038) 'i' used out of scope on line: 6928 at character: 30
script: (W038) 'i' used out of scope on line: 6928 at character: 47
script: (W038) 'i' used out of scope on line: 6929 at character: 40
script: (W038) 'i' used out of scope on line: 6932 at character: 48
script: (W038) 'seltipo' used out of scope on line: 6938 at character: 17
script: (W038) 'seltipo' used out of scope on line: 6939 at character: 62
script: (W038) 'seltipo' used out of scope on line: 6940 at character: 28
script: (W041) Use '===' to compare with '' on line: 6948 at character: 34
script: (W038) 'i' used out of scope on line: 6950 at character: 9
script: (W038) 'i' used out of scope on line: 6950 at character: 14
script: (W038) 'i' used out of scope on line: 6950 at character: 31
script: (W038) 'i' used out of scope on line: 6951 at character: 26
script: (W038) 'i' used out of scope on line: 6956 at character: 9
script: (W038) 'i' used out of scope on line: 6956 at character: 14
script: (W038) 'i' used out of scope on line: 6956 at character: 32
script: (W038) 'i' used out of scope on line: 6957 at character: 17
script: (W038) 'h' used out of scope on line: 7076 at character: 25
script: (W038) 'h' used out of scope on line: 7076 at character: 30
script: (W038) 'h' used out of scope on line: 7076 at character: 48
script: (W038) 'h' used out of scope on line: 7077 at character: 55
script: (W038) 'h' used out of scope on line: 7077 at character: 79
script: (W041) Use '!==' to compare with '' on line: 7285 at character: 24
script: (W041) Use '===' to compare with '' on line: 7292 at character: 17
script: (W004) 'i' is already defined on line: 7303 at character: 33
script: (W004) 'x' is already defined on line: 7315 at character: 29
script: (W061) eval can be harmful on line: 7354 at character: 17
script: (W038) 'num' used out of scope on line: 7385 at character: 21
script: (W038) 'num' used out of scope on line: 7386 at character: 67
script: (W038) 'num' used out of scope on line: 7390 at character: 37
script: (W061) eval can be harmful on line: 7399 at character: 18
script: (W061) eval can be harmful on line: 7424 at character: 18
script: (W038) 're' used out of scope on line: 7423 at character: 29
script: (W038) 're' used out of scope on line: 7425 at character: 46
script: (W061) eval can be harmful on line: 7475 at character: 36
script: (W038) 'pag' used out of scope on line: 7486 at character: 21
script: (W038) 'pag' used out of scope on line: 7487 at character: 26
script: (W038) 'pag' used out of scope on line: 7490 at character: 25
script: (W038) 'pag' used out of scope on line: 7491 at character: 32
script: (W038) 'pu' used out of scope on line: 7487 at character: 21
script: (W038) 'pu' used out of scope on line: 7488 at character: 21
script: (W038) 'pu' used out of scope on line: 7488 at character: 34
script: (W038) 'pu' used out of scope on line: 7488 at character: 67
script: (W038) 'pu' used out of scope on line: 7489 at character: 24
script: (W061) eval can be harmful on line: 7502 at character: 29
script: (W038) 'pu' used out of scope on line: 7501 at character: 13
script: (W038) 'pu' used out of scope on line: 7502 at character: 40
script: (W038) 'pu' used out of scope on line: 7503 at character: 18
script: (W038) 'pu' used out of scope on line: 7503 at character: 35
script: (W038) 'pu' used out of scope on line: 7505 at character: 26
script: (W038) 'pu' used out of scope on line: 7516 at character: 13
script: (W038) 'pu' used out of scope on line: 7517 at character: 23
script: (W038) 'pu' used out of scope on line: 7517 at character: 38
script: (W038) 'pu' used out of scope on line: 7517 at character: 55
script: (W038) 'pu' used out of scope on line: 7519 at character: 26
script: (W038) 'pag' used out of scope on line: 7506 at character: 17
script: (W038) 'pag' used out of scope on line: 7507 at character: 17
script: (W038) 'pag' used out of scope on line: 7508 at character: 35
script: (W038) 'pag' used out of scope on line: 7515 at character: 13
script: (W038) 'pag' used out of scope on line: 7516 at character: 18
script: (W038) 'pag' used out of scope on line: 7520 at character: 29
script: (W038) 'pag' used out of scope on line: 7520 at character: 67
script: (W038) 'pag' used out of scope on line: 7521 at character: 17
script: (W038) 'pag' used out of scope on line: 7522 at character: 35
script: (W038) 'i' used out of scope on line: 7514 at character: 13
script: (W038) 'i' used out of scope on line: 7514 at character: 20
script: (W038) 'i' used out of scope on line: 7514 at character: 40
script: (W038) 'i' used out of scope on line: 7515 at character: 27
script: (W061) eval can be harmful on line: 7609 at character: 13
script: (W061) eval can be harmful on line: 7613 at character: 13
script: (W061) eval can be harmful on line: 7682 at character: 13
script: (W061) eval can be harmful on line: 7690 at character: 17
script: (W061) eval can be harmful on line: 7696 at character: 17
##########################

SyntaxError: Unexpected identifier
    at Window.Function (native)
    at C (eval at <anonymous> (unknown source), <anonymous>:57:186)
    at Object.Oa.create (eval at <anonymous> (unknown source), <anonymous>:65:282)
    at u (eval at <anonymous> (unknown source), <anonymous>:14:88) VM1044:58
Uncaught SyntaxError: Unexpected identifier 
anka-213 commented 7 years ago

@tallos What browser version are you using?

anka-213 commented 7 years ago

@tallos Oops, I thought I removed all code that required EcmaScript 6 (the latest version of Javascript), but I had missed a part which used a "for ... of" loop. Sorry. It should be fixed now.

Thanks for bisecting the bug btw. :)

tallos commented 7 years ago

That fixed it, thanks.