Skip to content

Instantly share code, notes, and snippets.

@SMUsamaShah
Last active April 24, 2025 18:16
Show Gist options
  • Select an option

  • Save SMUsamaShah/32a4e29f9bd29e1b86db4ecc85bf4883 to your computer and use it in GitHub Desktop.

Select an option

Save SMUsamaShah/32a4e29f9bd29e1b86db4ecc85bf4883 to your computer and use it in GitHub Desktop.
Skip Disliked YouTube Videos automatically
// ==UserScript==
// @name Skip Disliked Videos
// @namespace http://tampermonkey.net/
// @version 0.21
// @description Skip disliked videos. Just press dislike to skip to next one!
// @match https://www.youtube.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
(function() {
'use strict';
let interval;
function isDislikeButtonPressed(){
if(document.querySelector("#top-level-buttons-computed > segmented-like-dislike-button-view-model > yt-smartimation > div > div > dislike-button-view-model > toggle-button-view-model > button-view-model > button").ariaPressed === 'true') {
document.querySelector("#movie_player > div.ytp-chrome-bottom > div.ytp-chrome-controls > div.ytp-left-controls > a.ytp-next-button.ytp-button").click();
}
}
// start looking for disliked video
function startMonitoring(){
interval = setInterval(isDislikeButtonPressed, 1000);
}
startMonitoring();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment