Greasy Fork

Greasy Fork is available in English.

动画疯自动同意

动画疯自动同意限制

当前为 2024-01-06 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         动画疯自动同意
// @namespace    http://tampermonkey.net/
// @version      0.1
// @license MIT
// @description  动画疯自动同意限制
// @author       You
// @match        https://ani.gamer.com.tw/animeVideo.php?sn=*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=gamer.com.tw
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    //同意限制
    const i = setInterval(()=>document.querySelector('#adult') && (document.querySelector('#adult').click() || clearInterval(i) || console.log('click')),20)
    //自动下集
    const j = setInterval(()=>document.querySelector('video') &&((document.querySelector('video').onended = () => setTimeout(()=>$('.replay > a').eq(1)[0].click(),3000)) && console.log("自动下集") || clearInterval(j) ),20)
    //移除广告跳转
    /*const j = setInterval(()=>$('.vast-blocker')[0] && ($('.vast-blocker')[0].remove() || clearInterval(j) || console.log('remove')),100)
    //30秒后跳过广告
    const k = setInterval(()=>$('#adSkipButton')?.hasClass('enabled') && ($('#adSkipButton')[0].click() || clearInterval(k) || console.log('skip')),100)
    //广告静音
    const m = setInterval(()=>{
        if($('.vjs-mute-control.vjs-control.vjs-button')[0] && $('#adSkipButton')[0]){
            $('.vjs-mute-control.vjs-control.vjs-button')[0].click()
            clearInterval(m)
            console.log('muted')
            const m2 = setInterval(()=>{
                if(!$('#adSkipButton')[0]){
                    $('.vjs-mute-control.vjs-control.vjs-button')[0].click()
                    clearInterval(m2)
                    console.log('cancel muted')
                }
            },20)
        }
    },100)*/
})();