Greasy Fork

Greasy Fork is available in English.

YouTube Auto-DisLike Playlist

Automatically clicks the 'DisLike' and then 'Next' button in a playlist

当前为 2025-11-03 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name           YouTube Auto-DisLike Playlist
// @namespace      http://userscripts.org/users/23652
// @description    Automatically clicks the 'DisLike' and then 'Next' button in a playlist
// @include        http://*.youtube.com/watch*v=*
// @include        http://youtube.com/watch*v=*
// @include        https://*.youtube.com/watch*v=*
// @include        https://youtube.com/watch*v=*
// @copyright      andwan0
// @version        2.2
// @license        GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// @require        http://greasyfork.icu/scripts/1884-gm-config/code/GM_config.js?version=4836
// @require        http://greasyfork.icu/scripts/1885-joesimmons-library/code/JoeSimmons'%20Library.js?version=7915
// @require        http://greasyfork.icu/scripts/2104-youtube-button-container-require/code/YouTube%20-%20Button%20Container%20(@require).js?version=5493
// @grant          GM_getValue
// @grant          GM_setValue
// @grant          GM_registerMenuCommand
// ==/UserScript==

/* CHANGELOG
2025-11-03 fixed working with youtube again!
*/



(function () {
    'use strict';

    var intv, timeStart;

    // Run a function when the page is fully loaded
    JSL.runAt('end', function() {
        // timeouts are in milliseconds
        window.setTimeout(doLike, 3000);//change this to doDislike
        window.setTimeout(doNext, 29000);
        //window.setTimeout(reset, 61000);//reload page to reset the doLike, doNext timers...
    });

    function reset() {
        console.log('reset()');
        location.reload(true);
    }

    function doLike() {
        console.log('doLike()');
        if (document.getElementsByClassName('ytLikeButtonViewModelHost')[1].childNodes[0].childNodes[0].childNodes[0].getAttribute('aria-pressed') != 'true') {
            document.getElementsByClassName('ytLikeButtonViewModelHost')[1].childNodes[0].childNodes[0].childNodes[0].click();
        }
    }

    function doDislike() {
        console.log('doDislike()');
        if (document.getElementsByClassName('ytDislikeButtonViewModelHost')[1].childNodes[0].childNodes[0].childNodes[0].getAttribute('aria-pressed') != 'true') {
            document.getElementsByClassName('ytDislikeButtonViewModelHost')[1].childNodes[0].childNodes[0].childNodes[0].click();
        }
    }

    function doNext() {
        console.log('doNext()');

        window.setTimeout(doLike, 3000);//change this to doDislike
        window.setTimeout(doNext, 29000);

        var nextButton = document.querySelector('.ytp-next-button');
        nextButton.click();
    }

}());