MangaNelo Scripts (Next/Prev Chapter & Image Resize)

Allows arrow key navigation between chapters (left = prev/right = next) & allows reizing of chapter images when you press the up arrow key.

目前為 2020-08-15 提交的版本,檢視 最新版本

// ==UserScript==
// @name        MangaNelo Scripts (Next/Prev Chapter & Image Resize)
// @namespace   ew0345
// @match       *://manganelo.com/chapter/*/*
// @grant       none
// @version     1.0
// @author      ew0345
// @description Allows arrow key navigation between chapters (left = prev/right = next) & allows reizing of chapter images when you press the up arrow key.
// ==/UserScript==

var img = ['.container-chapter-reader img'];
var wper = 100;
function setImageWidth() {
	var inp = prompt('Image Width % (Do not include % sign)');
	wper = inp.valueOf();

	for (var i = 0; i < document.querySelectorAll(img).length; i++) {
		document.querySelectorAll(img)[i].style.width = wper+'%';
	}
}

window.onkeydown = function(e) {
	switch (e.key) {
		case "ArrowLeft":
			if ($('a:contains("PREV CHAPTER")').length > 0) {
				document.location = $('a:contains("PREV CHAPTER")').attr('href');
			} else {
				console.log('no previous chapter');
			}
			break;
		case "ArrowRight":
			if ($('a:contains("NEXT CHAPTER")').length > 0) {
				document.location = $('a:contains("NEXT CHAPTER")').attr('href');
			} else {
				console.log('no next chapter');
			}
			break;
		case "ArrowUp":
			setImageWidth();
			break;
		default: break;
	}
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址