Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mangadex's update broke it again #122

Open
SirMrMister opened this issue Aug 16, 2018 · 7 comments
Open

Mangadex's update broke it again #122

SirMrMister opened this issue Aug 16, 2018 · 7 comments

Comments

@SirMrMister
Copy link

Before the update that added the sidebar what worked was what onetimeuser123 posted at #102 .

Not anymore though.

@blindbox
Copy link

@SirMrMister Switch to legacy mode in the settings page of mangadex (as in, the site's settings page, not the userscript's).

@Yoposoc
Copy link

Yoposoc commented Sep 9, 2018

I've tried this too but it's not working. Here are my mangadex settings:
https://my.mixtape.moe/sadhlv.jpg

@blindbox
Copy link

blindbox commented Sep 11, 2018

Here's my settings under Site Settings, see if they're the same as yours.

URL: Beginning of URL


https://mangadex.org/chapter/

Image: CSS selector

img#current_page

Back: function (html, pos)

var backLink = '';
			var page = parseInt(html.match(/data\-page=\"(\d+)\"/)[1]);
			if (page <= 1) {
				var prevChapter = parseInt(html.match(/var prev_chapter_id = (\d+);/)[1]);
				if (prevChapter != "0") {
					var prevPages = parseInt(html.match(/var prev_pages = (\d+);/)[1]);
					backLink = "/chapter/" + prevChapter + "/" + prevPages;
				}
			} else {
				var prevPage = page - 1;
				backLink = decodeURI(link[pos]).split("/").slice(0, -1).join("/") + "/" + prevPage;
			}
			return backLink;

Next: function(html, pos)

var nextLink = '';
			var page = parseInt(html.match(/data\-page=\"(\d+)\"/)[1]);
			var lastPage = parseInt(xpath('//select[@id="jump_page"]/option[last()]/@value', html));
			if (page >= lastPage) {
				var nextChapter = parseInt(html.match(/var next_chapter_id = (\d+);/)[1]);
				if (nextChapter != "0") {
					nextLink = "/chapter/" + nextChapter + "/1";
				}
			} else {
				var nextPage = page + 1;
				nextLink = decodeURI(link[pos]).split("/").slice(0, -1).join("/") + "/" + nextPage;
			}
			return nextLink;

First: function(html)

var chapter = parseInt(html.match(/var chapter_id = (\d+);/)[1]);
			return "/" + chapter + "/1";

Last: function(html)

var chapter = parseInt(html.match(/var chapter_id = (\d+);/)[1]);
			var lastPage = xpath('//select[@id="jump_page"]/option[last()]/@value', html);
			return "/" + chapter + "/" + lastPage;

No change on the others

image

EDIT: Maybe it matters where you set it to Legacy (which I believe is unlikely...) ?

Because here's where I changed it to legacy (Top right dropdown with you username > Settings)

image

@Yoposoc
Copy link

Yoposoc commented Sep 13, 2018

Well, I can't even get to changing the settings of webcomic reader on mangadex because no part of webcomic reader comes up. It's as if it doesn't recognize the site.

My mangadex account settings are the same.

@blindbox
Copy link

You need to add mangadex.org to the user includes list in your script settings.

Then you can get to Webcomic Reader settings here.

image

@Yoposoc
Copy link

Yoposoc commented Sep 20, 2018

@blindbox ah, thanks. With your connect I rechecked my @include and I had a typo.
I included all your custom site settings exactly, but it's still not working
a4yyd67vzcqc_waterfox_2018-09-20_09-52-10 1
Here are my legacy reader settings.

@Yoposoc
Copy link

Yoposoc commented Sep 20, 2018

Ok, I think I know what's happening. After I put in the custom settings, even if I press apply and save, the custom settings aren't saved. When I go back to the site settings page, it's set to default settings.... No idea what to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants