Skip to content

Instantly share code, notes, and snippets.

@etshy
Last active September 25, 2025 17:59
Show Gist options
  • Select an option

  • Save etshy/22fbd80963df84afaf732a2fcf764a04 to your computer and use it in GitHub Desktop.

Select an option

Save etshy/22fbd80963df84afaf732a2fcf764a04 to your computer and use it in GitHub Desktop.
show-next-video-button.user.js
// ==UserScript==
// @name Bring back next button
// @license GNU GPLv3
// @namespace http://tampermonkey.net/
// @version 1.1
// @author Etshy
// @match *://www.youtube.com/watch*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
function waitForElm(selector) {
return new Promise(resolve => {
//If the element already exists, resolve the Promise
if (document.querySelector(selector)) {
return resolve(document.querySelector(selector));
}
//Or observe document.body
const observer = new MutationObserver(mutations => {
//as soon as the element exists, resolve the Promise
if (document.querySelector(selector)) {
observer.disconnect();
resolve(document.querySelector(selector));
}
});
observer.observe(document.body, {
childList: true,
subtree: true
});
});
}
waitForElm('.ytp-next-button').then(elm => {
elm.style.removeProperty("display");
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment