Skip to content

Instantly share code, notes, and snippets.

@herbaldrinkmate
Created June 26, 2026 15:19
  • Select an option

Select an option

Disable YouTube Subtitles
// ==UserScript==
// @name Disable YouTube Subtitles
// @namespace http://tampermonkey.net/
// @description Automatically turns off YouTube subtitles.
// @version 1.0
// @match https://www.youtube.com/*
// @grant none
// @license MIT
// ==/UserScript==
(function() {
'use strict';
const disableSubtitles = () => {
const player = document.querySelector('#movie_player') || document.querySelector('.html5-video-player');
if (player && typeof player.isSubtitlesOn === 'function') {
if (player.isSubtitlesOn()) {
if (typeof player.toggleSubtitles === 'function') {
player.toggleSubtitles();
}
}
}
};
window.addEventListener('yt-navigate-finish', disableSubtitles);
document.addEventListener('yt-player-updated', disableSubtitles);
if (document.querySelector('#movie_player')) {
disableSubtitles();
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment