打开链接

打开链接...

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         打开链接
// @namespace    ddd
// @description  打开链接...
// @version      0.0.3.7
// @author       ddd
// @match        *66y.com/*
// @require      https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js
// @require      https://code.jquery.com/jquery-latest.js
// @run-at       document-start
// ==/UserScript==
$(document).ready(function() {
        let $tableArea = $('body > #main > .t #ajaxtable');
        if($tableArea.length > 0) {
            $tableArea.before('<div style="position: fixed; transform: translate(-100%, 100px);">点击数大于 >= <input type="number" id="open-all-alink-hit-number" style="width: 40px;"></div>');
            $tableArea.before('<button id="open-all-alink" style="position: fixed; transform: translate(-100%, 150px);">打开所有正文链接</button>');
            let $leastHit = $('#open-all-alink-hit-number');
            $('#open-all-alink').click(function() {
                let leastHit = isNaN(parseInt($leastHit.val())) ? 0 : parseInt($leastHit.val());
                let trs = $tableArea.find('tr.tr3.t_one.tac');
                for (let i = 0; i < trs.length; i++) {
                    if (parseInt(trs.eq(i).find('td').eq(3).text()) > leastHit) {
                    	/*if (trs.eq(i).find('.tal a').eq(0).text().indexOf('[歐美]') === 0) {
                    		continue;
                    	}
                    	if (trs.eq(i).find('.tal a').eq(0).text().indexOf('[動漫]') === 0) {
                    		continue;
                    	}*/
                        window.open(trs.eq(i).find('.tal a').eq(0).attr('href'));
                    }
                }
            });
        }
});