Anti-bot links solver (pitasks.com)

Anti-nut links Auto mode

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Anti-bot links solver (pitasks.com)
// @namespace    Anti-bot links Auto solver
// @version      0.4
// @description  Anti-nut links Auto mode
// @author       Shnethan
// @match        *://pitasks.com/*
// @icon         https://api.dicebear.com/7.x/avataaars/svg?seed=blackrider&backgroundColor=b6e3f4
// @license      GPL-3.0-or-later
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function() {
    'use strict';

    const e = () => {
        const p = document.querySelector('p[class*="text-"][class*="uppercase"][class*="font-black"]') ||
                  document.querySelector('p.mb-4') ||
                  [...document.querySelectorAll('p')].find(x => /order\s*:/i.test(x.textContent));
        if (!p) return null;
        const m = p.textContent.match(/order\s*[:]\s*([\d\s,]+)/i);
        const n = m ? m[1].split(/[\s,]+/).filter(y => /^\d{3}$/.test(y)) : [];
        return n.length >= 3 ? n : null;
    };

    const c = v => {
        for (const s of document.querySelectorAll('span.nut-link')) {
            if (s.textContent.trim() === v) {
                (typeof s.onclick === 'function' ? s.onclick : s.click).call(s);
                return true;
            }
        }
        return false;
    };

    const r = () => {
        const o = e();
        if (!o) return;
        let i = 0;
        const n = () => {
            if (i >= o.length) return;
            if (c(o[i])) i++;
            setTimeout(n, i ? 750 : 400);
        };
        setTimeout(n, 1500);
    };

    setTimeout(r, 1000);

    const z = new MutationObserver(() => {
        if (document.querySelector('span.nut-link')) r();
    });
    z.observe(document.body, { childList: true, subtree: true, characterData: true });

})();