Created
August 16, 2020 18:12
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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