Webtoon Next/Prev

Allows usage of Left & Right Arrows key for chapter navigation on WebToon

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name Webtoon Next/Prev
// @author Ew0345
// @namespace ew0345
// @description Allows usage of Left & Right Arrows key for chapter navigation on WebToon
// @version 1.1
// @homepage https://www.youtube.com/user/ew0345
// @include *://www.webtoons.com/*/*/*/*/*
// @grant none
// ==/UserScript==

var names = ["._prevEpisode", "._nextEpisode"];

window.onkeydown = function (e) {
  switch (e.keyCode) {
	case 37: document.querySelector(names[0]) != null ? document.location = document.querySelector(names[0]).href : console.log('Already on first chapter');
      break;
	case 39: document.querySelector(names[1]) != null ? document.location = document.querySelector(names[1]).href : console.log('Aready on most recent chapter');
      break;
    default: break;
  }
};