Skip to content

Instantly share code, notes, and snippets.

@szechyjs
Created May 20, 2021 14:46
Show Gist options
  • Save szechyjs/57d6ae5cb14eefb70d8deca19be736b9 to your computer and use it in GitHub Desktop.
Save szechyjs/57d6ae5cb14eefb70d8deca19be736b9 to your computer and use it in GitHub Desktop.
F1TV Large Video
// ==UserScript==
// @name F1TV Large Video
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Makes the video scale to the size of the browser window
// @author szechyjs
// @match https://f1tv.formula1.com/detail/*
// @icon https://www.google.com/s2/favicons?domain=formula1.com
// @grant none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// ==/UserScript==
waitForKeyElements('main.vod-detail-page > div.container-lg:first-child', changeContainer);
waitForKeyElements('div.inset-video-item-image-container', changeVideo);
function changeContainer(node) {
node.attr('class', 'container-fluid');
}
function changeVideo(node) {
node.css('height', '70vh');
node.css('min-height', '720px');
node.parent().removeClass('mt-4');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment