Manganato Reader Enhancer

Enhancements for the Manganato manga reader for a better reading experience

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        Manganato Reader Enhancer
// @name:es     Manganato Lector Mejorado
// @namespace   Violentmonkey Scripts
// @match       https://readmanganato.com/*
// @version     1.0
// @author      donkikote
// @description Enhancements for the Manganato manga reader for a better reading experience
// @description:es Mejoras al lector de mangas de Manganato para una mejor experiencia de lectura
// 
// @license MIT
// ==/UserScript==


var pagesDiv = document.body.getElementsByClassName("container-chapter-reader")[0];
var pages = pagesDiv.getElementsByTagName("img");
for (var i=0;i<pages.length;i++) {
  var image = pages.item(i)
  image.id="page"+i
  
  var imgA = document.createElement("a");
  imgA.href="#page"+(i+1);
  image.parentNode.replaceChild(imgA, image);
  imgA.appendChild(image);
}
var nextChapButton = document.body.getElementsByClassName("navi-change-chapter-btn-next")[0];
nextChapUrl = nextChapButton.href;
imgA.href=nextChapUrl;