Greasy Fork is available in English.

liaoxuefeng.com 方向键翻页

liaoxuefeng.com 教程 Ctrl+左/右 翻页

// ==UserScript==
// @name         liaoxuefeng.com 方向键翻页
// @version      0.0.2
// @description  liaoxuefeng.com 教程 Ctrl+左/右 翻页
// @author       nku100
// @match        *://www.liaoxuefeng.com/wiki/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @require      https://code.jquery.com/jquery-3.6.0.min.js
// @namespace https://greasyfork.org/users/190286
// ==/UserScript==

(function () {
    $(document).keydown(function (e) {
        if (e.ctrlKey && e.keyCode == 39) {
            var url = document.querySelector("#x-content > div.x-wiki-prev-next.uk-clearfix > a.uk-float-right").href
            location.assign(url)
        }
        if (e.ctrlKey && e.keyCode == 37) {
            var url = document.querySelector("#x-content > div.x-wiki-prev-next.uk-clearfix > a:nth-child(1)").href
            location.assign(url)
        }
    })
})()