Skip to content

Instantly share code, notes, and snippets.

@xiarahman
Created August 16, 2020 18:12
Show Gist options
  • Save xiarahman/df0babd334eaa35fefea9fbebcfeb8d9 to your computer and use it in GitHub Desktop.
Save xiarahman/df0babd334eaa35fefea9fbebcfeb8d9 to your computer and use it in GitHub Desktop.
Fix Magic Actions for Youtube extension bug where the toolbar gets attached to the top.
// ==UserScript==
// @name MagicActionYouTube
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author XiaRahman
// @match https://*.youtube.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
function fixYT(){
// code to fix the toolbar by bringing it below the video
var b=document.querySelector('#watch7-content span'),a=document.querySelector('ytd-video-primary-info-renderer'),c=a&&a.firstElementChild;b&&a&&c&&a.insertBefore(b,c);
setTimeout(fixYT, 5000);
}
fixYT();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment