Viewer: Option to adjust gap between double spread pages

Joined
Aug 21, 2023
Messages
4
Microsoft Surface Duos have become relatively cheap, and I picked one up to use as a Mangadex viewer. It works great for viewing in double spread mode, but the bezel between the two screens is rendered but not shown. (ie. Android draws to one continuous canvas, and a column in the middle is occluded.)

Thus, the double spread mode of the reader causes the edges to be slightly cut off, where the two pages meet.

As a feature request, it would be great to be able to:
  • Set a customizable buffer gap in pixels between pages of a spread
  • Optionally, force centering of pages to the 25% points from the edge. Note that the gap may have to be specified still - pages may get resized into the bezel otherwise.
  • For single pages in offset spread mode, option to add a 'ghost' page to force the page to be displayed on a single screen.
Thanks for all the great work put into Mangadex!
 
Upvote 0
Joined
Aug 21, 2023
Messages
4
Here are a couple pictures to illustrate the issue.

Scans without enough bleed area get cut off:
https://files.catbox.moe/wd8nts.jpeg
wd8nts.jpeg


Single pages are centered:
https://files.catbox.moe/kieihr.jpeg
kieihr.jpeg
 
Head Contributor Wrangler
Staff
Super Moderator
Joined
Jan 18, 2018
Messages
1,938
What browser are you using, and have you tested Edge? The Duo isn't meant to draw content behind the hinge, afaik, wondering if it's a software issue with that specific browser.
 
Joined
Aug 21, 2023
Messages
4
What browser are you using, and have you tested Edge? The Duo isn't meant to draw content behind the hinge, afaik, wondering if it's a software issue with that specific browser.
I’m using Firefox, but Edge behaves the same. It’s unfortunately a system-level behavior that can’t be turned off, and there are lots of complaints about it online. For example, MahjongSoul is also unplayable with both screens, as the center of the board gets cut off.

It makes it visually consistent when you scroll content spanning the screens, but cutting off content is a poor tradeoff, IMO.
 
Last edited:
Joined
Aug 21, 2023
Messages
4
Update: I was able to get the behavior I wanted with this userscript. Firefox Nightly for Android supports the Tampermonkey add-on, and I used that to load the script. Apologies for the terrible code; this was my first time attempting to write JS. Hopefully this will be helpful to anyone else with a similar device.

// ==UserScript== // @name Mangadex CSS Inject // @version 0.1 // @match *://*mangadex.org/* // @run-at document-body // ==/UserScript== function inject() { if (document.querySelectorAll('.dp:not([style*="display: none"])').length == 1) { for (var e of document.getElementsByClassName('mx-auto')) { e.style['margin-left'] = '10px'; e.style['margin-right'] = 'auto'; } Array.from(document.querySelectorAll('.dp')).forEach( (el) => el.classList.remove('mx-auto') ); } else { Array.from(document.querySelectorAll('.dp')).forEach( (el) => el.classList.add('mx-auto') ); for (var f of document.getElementsByClassName('mx-auto')) { f.style['margin-left'] = 'auto'; f.style['margin-right'] = 'auto'; } for (var g of document.getElementsByClassName('dp')) { g.style['margin-left'] = '30px'; g.style['margin-right'] = '30px'; } } } (function() { 'use strict'; window.setInterval(inject, 20); })();
 

Users who are viewing this thread

Top