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

Resize scans option does not work #126

Open
southrop opened this issue Nov 3, 2014 · 4 comments
Open

Resize scans option does not work #126

southrop opened this issue Nov 3, 2014 · 4 comments

Comments

@southrop
Copy link

southrop commented Nov 3, 2014

The resize scans option doesn't seem to make a difference whether it is turned on or off. I'm not sure if this is because the calculation for whether to resize an image uses incorrect values or simply doesn't do it. To illustrate, here are some screenshots.

My computer is a 2560x1440 iMac, and according to Chrome dev tools, my Chrome window is 1309 px wide.

document.documentElement.clientWidth
1309
window.innerWidth
1309

The two images in my screenshots are 1732px (Saki) and 1800px (Hayate) wide, yet they don't get resized. This makes reading rather difficult because some websites (like the RedHawk Reader) horizontal scrolling seems to be disabled.

This occurs for me using both the latest stable (1.5.6) and the latest dev (1.5.7) version.

@braiam
Copy link
Member

braiam commented Nov 5, 2014

I can't reproduce this. I read both manga in RHS and I didn't see the issue. Deactivate all your other extensions and check again.

@southrop
Copy link
Author

southrop commented Nov 6, 2014

I tried it in an incognito window with only AMR enabled: Screenshot. Just in case, I also tried reinstalling from scratch, but it didn't seem to have made a difference. Also tried on a fresh Chrome profile with only AMR installed, but it still made no difference: [1] [2]

I also tried it on my Windows computer and encountered the same issue: [1] [2]

I did notice that on Batoto, when reading Shokugeki no Souma on my windows machine, a minor resize did occur, but it only happened a minute or so after the page was fully loaded, and it was possibly triggered by me opening the console and/or because the size of the scan was close enough to my screen resolution. The same did not occur on RHS, and does not occur when I open the site on my Mac machine.

Could the issue be because I installed the extension using the "Load unpacked extension" option, and somehow my settings aren't taking effect because of that? Because my bookmark syncing doesn't work at all either. Seems that's not the case. Asked my friend who installed via the same method to try it out and it resizes fine for him

Looking at forum bug reports, this looks related to these two unresolved bugs.

@braiam
Copy link
Member

braiam commented Nov 6, 2014

Could you check the CSS rules for the images? It should have a max-width
rule.

2014-11-05 21:53 GMT-04:00 Southrop [email protected]:

I tried it in an incognito window with only AMR enabled: Screenshot
http://puu.sh/cF02g.png

I also tried it on my Windows computer and encountered the same issue: 1
http://puu.sh/cETNL.jpg 2 http://puu.sh/cETI8.jpg

I did notice that on Batoto, when reading Shokugeki no Souma, a minor
resize http://puu.sh/cETZZ.jpg did occur, but it only happened after a
minute or so after the page was fully loaded. The same did not occur on RHS.


Reply to this email directly or view it on GitHub
#126 (comment)
.

Braiam Peguero

@southrop
Copy link
Author

southrop commented Nov 6, 2014

I see a max-width of 1720px on all the images, but this seems to get applied via JavaScript after all the images have finished loading. e.g.

<img class="imageAMR" src="http://img.bato.to/comics/2014/11/05/s/read5459b5d7c3440/img000004.jpg" style="margin-right: 10px; border: 5px solid white; margin-bottom: 50px;">

becomes

<img class="imageAMR" src="http://img.bato.to/comics/2014/11/05/s/read5459b5d7c3440/img000004.jpg" style="margin-right: 10px; border: 5px solid white; margin-bottom: 50px; max-width: 1720px;">

I actually didn't notice this until my internet slowed down today, and images actually took a while to load. On Batoto, this didn't seem to make a difference, as the images seem to still load at source resolution (with a max-width of 1720px I guess). But on MangaStream, the behaviour is different. The images actually are resized down but once all images are finished loading, they get resized back up again. Screenshots to demonstrate (from Naruto 699 so possible minor spoilers):

  • When loading, images are resized correctly [1]
  • Once load is complete, images are no longer resized down. [2]

As for the value of 1720px, it seems the .AMRtable has a width: 100% applied to it (but its parent doesn't have a defined width, perhaps this is the problem?), and even when my window is resized, it has a width of 1746px. As such, .spanForImg is 1740px and then .imageAMR is 1720px.

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

2 participants