Next/Prev Page

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

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==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;
                }
            }
        }
    }
})();