Next/Prev Page

Allows you to press ,/. in order to navigate pages.

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Next/Prev Page
// @version      1
// @description  Allows you to press ,/. in order to navigate pages.
// @author       Yoboies
// @match        https://rule34.xxx/index.php?page=post&s=list*
// @match        https://rule34.xxx/index.php?page=favorites&s=view*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=rule34.xxx
// @license      MIT
// @namespace https://greasyfork.org/users/1345312
// ==/UserScript==

(function() {
    'use strict';

    var searchStringNext = ">";
    var searchStringPrev = "<";
    var hotkeyNext = "Period";
    var hotkeyPrev = "Comma";
    var found ="";

    document.addEventListener('keydown', logKey);

    function logKey(e) {
        if(e.code==hotkeyNext){
            var tagNames = Array.from(document.getElementsByTagName('a'))
            for (var i = 0; i < tagNames.length; i++) {
                if (tagNames[i].textContent == (searchStringNext)) {
                    found = tagNames[i];
                    found.click();
                    break;
                }
            }
        }else if (e.code==hotkeyPrev){
            var tagNames = Array.from(document.getElementsByTagName('a'))
            for (var i = 0; i < tagNames.length; i++) {
                if (tagNames[i].textContent == (searchStringPrev)) {
                    found = tagNames[i];
                    found.click();
                    break;
                }
            }
        }
    }
})();