Skip to content

Instantly share code, notes, and snippets.

@happiness801
Last active January 24, 2021 01:35
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 happiness801/fffeb640fad7154d83d53fddc1a0ca40 to your computer and use it in GitHub Desktop.
Save happiness801/fffeb640fad7154d83d53fddc1a0ca40 to your computer and use it in GitHub Desktop.
Navigation conveniences for Sports24
// ==UserScript==
// @name Sports24 Navigation Improvements
// @namespace http://onai.net/
// @version 0.1
// @description Navigation conveniences for Sports24 (especially for Jazz fans)
// @author Kevin Gwynn
// @match https://sports24.club/*/
// @match https://sports24.stream/*/
// @grant none
// ==/UserScript==
(function() {
// Make sure jQuery is available
var gen = 0;var act=function(){gen=1;var script=document.createElement('script');script.src='//code.jquery.com/jquery-1.11.0.min.js';script.type='text/javascript';document.getElementsByTagName('head')[0].appendChild(script);};(!window.jQuery)?act():1;setTimeout(function(){console.log('jQuery '+(gen?'loaded: ':'existing: ')+(window.jQuery?jQuery().jquery:'no jQuery/load failed'));}, 500);
var improveNav = function() {
console.log('KAG: Sports24 Improve Nav...');
let jQuery = $ || jQuery;
// Remove pointless NBA TV card
jQuery('.card-title:contains("NBA TV")').closest('.btn').remove();
// Remove silly "Watch in HD" ad buttons
jQuery('A.btn:contains("Watch HD")').remove();
// Move any Utah Jazz game to the very top
jQuery('img[alt="Utah Jazz"]').closest('.play').prependTo('BODY');
// Make team logos a little bigger
jQuery('.card-title IMG').css('height', '150px');
}
improveNav();
setTimeout(improveNav, 2000);
setTimeout(improveNav, 5000);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment