Skip to content

Instantly share code, notes, and snippets.

@stripedpurple
Last active October 9, 2019 15:58
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 stripedpurple/a0a275ff79c92b0ce621eeeb6511ac03 to your computer and use it in GitHub Desktop.
Save stripedpurple/a0a275ff79c92b0ce621eeeb6511ac03 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Hulu Record Mode
// @version 1.0.1
// @grant none
// @match https://www.hulu.com/*
// ==/UserScript==
function addCss(rule) {
let css = document.createElement('style');
css.type = 'text/css';
if (css.styleSheet) css.styleSheet.cssText = rule; // Support for IE
else css.appendChild(document.createTextNode(rule)); // Support for the rest
document.getElementsByTagName("head")[0].appendChild(css);
}
let rule = '.metadata-area, .player-mask.player-mask__scrim, .rating-bug, .network-bug, .play-pause-ad, .controls-bar-container--fadeIn, .controls-bar-container, .widgets-container { visibility: hidden !important; } .controls-bar-container--fadeIn, .controls-bar-container{ display: none !important; }'
// Load the rules and execute after the DOM loads
addCss(rule)
window.onload = function() {addCss('.netadata-area, .player-mask.player-mask__scrim, .rating-bug, .network-bug, .play-pause-ad, .control-bar-container, .widget-container { visibility: hidden !important; }')};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment