Skip to content

Instantly share code, notes, and snippets.

@Prof9
Last active June 16, 2017 02:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Prof9/759bee65f05238bf481dd661239de6c8 to your computer and use it in GitHub Desktop.
Save Prof9/759bee65f05238bf481dd661239de6c8 to your computer and use it in GitHub Desktop.
Mixer No Shadow
// ==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