anka-213/webcomic_reader

Can’t navigate forward/back on www.egscomics.com subdomain of El Goonish Shive

Closed this issue · 1 comments

If you visit the root http://www.egscomics.com/ or a specific comic such as http://www.egscomics.com/comic/tlod-001, then the previous and next image never finish loading, so Back and Next don’t work.

In contrast, if you visit http://egscomics.com/ (without the “www.” subdomain) or a specific comic such as http://egscomics.com/comic/tlod-001, then Back/Next work as expected. Thus, one workaround is to manually remove “www.” from the URL whenever you find yourself visiting a “www.” page on the site.

The current code for this site:

// @include http://www.egscomics.com/*
// @include http://egscomics.com/*

{
url: 'egscomics.com',
img: 'http://egscomics.com/comics/',
back: '@rel="prev"',
next: '@rel="next"',
first: '@rel="first"',
last: '@rel="last"',
extra: ['<div id="wrapper"><div id="leftarea" style="text-align: left">',[['#news']],'</div></div>'],
},

All links on www.egscomics.com pages use a URL starting with http://egscomics.com – this may be related to the issue.

Because of that property of links on the site, you will notice while testing that if you disable the script, click any link, and enable the script, then page navigation will work again.

The HTML of the pages at http://www.egscomics.com/ and http://egscomics.com/ are identical. The only difference between those pages is the URL, and possibly other headers.

I blindly tried changing the url property in the code to 'www.egscomics.com', changing url to /(www\.)?egscomics.com/, commenting out the extra property, and commenting out the img property, but none of those changes made navigation work on “www.” pages.

This got fixed in my pull last night. Didn't even see this issue till now though. It required the use of the fixurl.

edit: spoke too soon, the fix broke the non-www. Looking into it

Edit 2: Alright, fixed for sure this time. Needed two seperate entries in paginas. One to handle the fixurl for the www, and the other for non-www.