weiqi auto jump

按下方向键右,可直接跳到下一题

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         weiqi auto jump
// @namespace    https://www.101weiqi.com/qday/
// @version      1.0
// @description  按下方向键右,可直接跳到下一题
// @author       Lennon
// @match        https://*.101weiqi.com/*
// @require      http://code.jquery.com/jquery-2.1.1.min.js
// @run-at       document-end
// @icon         https://deepmind.com/static/v0.0.0/appIcons/favicon.png
// ==/UserScript==
(function() {
    'use strict';

    var elementButton = $('a.btn-info');
    $(document).keyup(function(e) {
        switch (e.keyCode) {
                // arrow left
            case 37:
                elementButton[0].click();
                break;
                // arrow right
            case 39:
                if($('div[ng-click="startnext()"]').length) {
                    $('div[ng-click="startnext()"]').click();
                } else if ($(elementButton[1]).length) {
                    elementButton[1].click();
                } else if ($('div.huati_lei > span > a').attr('href').length) {
                    location.href = $('div.huati_lei > span > a').attr('href');
                }
                break;
        }

        return !0
    })
})();