Last active
June 16, 2017 02:50
-
-
Save Prof9/759bee65f05238bf481dd661239de6c8 to your computer and use it in GitHub Desktop.
Mixer No Shadow
This file contains 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 Mixer No Shadow | |
// @description Makes the stream title, loading overlay and controls invisible on mixer. Ctrl+M toggles visibility of the controls. | |
// @author Prof. 9 | |
// @version 0.1 | |
// @match https://mixer.com/embed/player/* | |
// @run-at document-body | |
// @namespace prof9.mixernoshadow | |
// ==/UserScript== | |
var style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.innerHTML = "light-desktop-controls { box-shadow: none !important; } .control-container, light-desktop-controls .toolbar::before, bui-tooltip, .initial-loading-overlay, .navbar, .user-area { opacity: 0 !important; } light-desktop-controls .toolbar { transform: translateY(0) !important; } body, b-player-embed-page { background: #000000 !important; }"; | |
document.getElementsByTagName('head')[0].appendChild(style); | |
var style2 = document.createElement('style'); | |
style2.type = 'text/css'; | |
style2.innerHTML = ".control-container, .initial-loading-overlay { opacity: 1 !important; }"; | |
var visible = false; | |
document.addEventListener('keydown', function(event) { | |
console.log(event.keyCode); | |
if (event.ctrlKey && event.keyCode == 77) { | |
if (visible) { | |
document.getElementsByTagName('head')[0].removeChild(style2); | |
} else { | |
document.getElementsByTagName('head')[0].appendChild(style2); | |
} | |
visible = !visible; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment