Skip to content

Instantly share code, notes, and snippets.

@teamblubee
Forked from Yonezpt/YT RMV-AP-UN.user.js
Created December 17, 2016 10:31
Show Gist options
  • Save teamblubee/ffb147719a5b55deed6db204d352c1f6 to your computer and use it in GitHub Desktop.
Save teamblubee/ffb147719a5b55deed6db204d352c1f6 to your computer and use it in GitHub Desktop.
Removes the autoplay up next feature
// ==UserScript==
// @version 1.0.2
// @name Removes the autoplay up next feature
// @match *://www.youtube.com/*
// @run-at document-start
// @grant none
// @noframes
// ==/UserScript==
(function () {
'use strict';
function removeAPUN() {
var autoplaybar = document.getElementsByClassName('autoplay-bar')[0];
if (autoplaybar) {
autoplaybar.removeAttribute('class');
document.getElementsByClassName('checkbox-on-off')[0].remove();
}
}
window.addEventListener('readystatechange', removeAPUN, true);
window.addEventListener('spfdone', removeAPUN);
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment