Greasy Fork is available in English.

Manga Loader (unmaintained)

Support for over 70 sites! Loads manga chapter into one page in a long strip format, supports switching chapters, minimal script with no dependencies, easy to implement new sites, loads quickly and works on mobile devices through bookmarklet

< Feedback on Manga Loader (unmaintained)

مراجعة: Good - script works

§
Posted: 21-05-2017

[Request] Next/Previous page keybindings (code included)

Next/Previous page keybindings would be great and is quite easy to implement with Element.scrollIntoView, which all browsers partially support.

I actually replaced the scroll keybinds to test this. The final ones could be b and n (for back and next). I tried to use the page up/down and the spacebar, but they don't work properly in Chrome.

var scrollToImage = function(next) {
  var propName = (next) ? 'nextElementSibling' : 'previousElementSibling';
  var ele = getCurrentImage();

  if (ele === null) {
    return;
  }

  do {
    ele = ele[propName];
  } while (ele !== null && ele.tagName !== 'IMG');

  if (ele !== null) {
    ele.scrollIntoView();
  }
};

Works great if the images are resized to fit the screen:

.ml-images img {
  max-height: 100vh;
}

.ml-counter {
  margin-top: -18px;
}

Post reply

تسجيل الدخول إلى مرحلة ما بعد الرد.