Skip to content

Instantly share code, notes, and snippets.

@stripedpurple
Last active October 9, 2019 15:58
Embed
What would you like to do?
// ==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