MHScans Custom Reader

Best Reader Mod for MHScans

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         MHScans Custom Reader
// @namespace    http://tampermonkey.net/
// @version      2024-07-20
// @description  Best Reader Mod for MHScans
// @author       AngelXex
// @match        https://mh.twobluescans.com/series/*/*/
// @icon         https://mh.twobluescans.com/wp-content/uploads/2017/10/512X512-150x150.png
// @grant        none
// ==/UserScript==


var zNode = document.createElement ('div');
zNode.innerHTML = '<button id="myButton" type="button">'
                + 'FullScreen</button>'
                ;
zNode.setAttribute ('id', 'myContainer');
const collection = document.getElementsByClassName("action-icon");
collection[0].appendChild(zNode);

const paddedit = document.getElementsByClassName("reading-content");
paddedit[0].style.padding = "0px";

const deltop = document.getElementsByClassName("go-to-top active");
deltop[0].remove();

//--- Activate the newly added button.
document.getElementById ("myButton").addEventListener (
    "click", ButtonClickAction, false
);

function ButtonClickAction (zEvent) {
openFullscreen();
}

/* Get the documentElement (<html>) to display the page in fullscreen */
var elem = document.documentElement;

/* View in fullscreen */
function openFullscreen() {
  if (elem.requestFullscreen) {
    elem.requestFullscreen();
  } else if (elem.webkitRequestFullscreen) { /* Safari */
    elem.webkitRequestFullscreen();
  } else if (elem.msRequestFullscreen) { /* IE11 */
    elem.msRequestFullscreen();
  }
}