Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // JAVASCIPT
- // Manager hotkey
- $(document).keyup(function(e) {
- // Media-play/pause key
- if (e.which == 179)
- $('.ytp-play-button').click();
- });
- // Youtube autoplay
- /// Add button controler class style-scope ytd-compact-autoplay-renderer
- $('.ytp-chrome-controls').append('<button class="ytp-autoplay-next ytp-button" style="font-size: 2em; text-align: center;"> ⇲</button>');
- /// Colorize at start
- if ($('#toggle').attr('checked', 'true'))
- {
- $('.ytp-autoplay-next').css('color','red');
- }
- else
- {
- $('.ytp-autoplay-next').css('color','white');
- }
- /// Control
- $('.ytp-autoplay-next').click(function() {
- if ($('#toggle').attr('checked'))
- {
- $('#toggle').removeAttr('checked');
- $(this).css('color','white');
- }
- else
- {
- $('#toggle').attr('checked', true)
- $(this).css('color','red');
- }
- });
- // CSS STYLES
- #related, .adDisplay.wide-overlay-ad, .ytp-endscreen-content {display: none !important;}
- #container, #player {margin-left: 15%;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement