Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AndreiTelteu/6fb075439af80e287d562db231f8e690 to your computer and use it in GitHub Desktop.
Save AndreiTelteu/6fb075439af80e287d562db231f8e690 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name YouTube InstantView customization
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Andrei Telteu
// @match https://www.youtube.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
addGlobalStyle(
'#iv-panels {'+
' position: relative !important;'+
'}'+
'#iv-visualizer {'+
' position: absolute !important;'+
' top: 0 !important;'+
' left: 0 !important;'+
' right: 0 !important;'+
' bottom: -40px !important;'+
' height: calc(100% + 40px) !important;'+
' z-index: 1 !important;'+
' opacity: 1 !important;'+
' --iv-visualizer-background-color: rgba(0,0,0,0) !important;'+
' pointer-events: none !important;'+
'}'+
'#iv-video-info *,'+
'#iv-video-actions * {'+
' z-index: 2 !important;'+
'}'+
'#iv-visualizer #iv-visualizer-canvas {'+
' opacity: 0.6 !important;'+
'}'+
'#iv-visualizer #iv-visualizer-footer {'+
' pointer-events: auto !important;'+
' visibility: visible !important;'+
' opacity: 1 !important;'+
' padding: 0 !important;'+
' flex-direction: row !important;'+
' flex-flow: row !important;'+
' height: auto !important;'+
' overflow: hidden !important;'+
' bottom: 0 !important;'+
'}'+
'#iv-modal[data-visualizer] #iv-video-panel {'+
' display: flex !important;'+
'}'+
'.iv-visualizer-module {'+
' min-width: unset !important;'+
' width: 100% !important;'+
' margin: 0 !important;'+
' padding: 0 !important;'+
' border-radius: 0 !important;'+
' opacity: 1 !important;'+
' height: auto !important;'+
'}'+
'.iv-visualizer-module .iv-visualizer-module-icon {'+
' display: none !important;'+
'}'+
'.iv-visualizer-module .iv-visualizer-module-title {'+
' margin: 0 auto !important;'+
'}'
);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment