Skip to content

Instantly share code, notes, and snippets.

@jdeerhake
Last active December 13, 2017 01:32
Show Gist options
  • Save jdeerhake/6e767422f53610e9590fcfa5b1c6303a to your computer and use it in GitHub Desktop.
Save jdeerhake/6e767422f53610e9590fcfa5b1c6303a to your computer and use it in GitHub Desktop.
NBA League Pass de-clutterer
var controls = jQuery('#lpControlsBotControls');
controls.hide();
jQuery('body')
.on('mouseover', function() { controls.show(); })
.on('mouseout', function() { controls.hide(); });
jQuery('game-video').css({
position: 'fixed',
left: 0,
top: 0,
width: '100%',
height: '100%',
zIndex: 10001
});
jQuery('#lpVideoScreenView').css({
'margin': 0,
'width': '100%'
});
jQuery('body, html').css({
width: '100%',
height: '100%',
overflow: 'hidden'
});
jQuery('#main').css({
width: 'auto',
transform: 'none'
});
jQuery([
'.headerWrapper',
'aside',
'#main_sidebar',
'#block-homepagefooter',
'.nba-ad-container',
'nav',
'#lpControlsTopControls',
'video-list',
'.nba__billboard'
].join(', ')).remove();
var intervals = window.setInterval('', 10000)
for (var i = 1; i < intervals; i++) { window.clearInterval(i); }
window.setInterval = function() {};
window.setTimeout = function() {};
// Watch ESPN fixes
jQuery('.hero--super').css({
position: 'fixed',
left: 0,
right: 0,
top: 0,
bottom: 0,
zIndex: 10001
});
jQuery([
'#header-wrapper',
'.layout-full--watch',
'.col-c'
].join(', ')).remove();
@jdeerhake
Copy link
Author

Use this as a bookmarklet to make league pass web suck less:

javascript:(function(d,u,s,w){s=d.createElement('script');s.type='text/javascript';s.charset='utf-8';s.src=u;d.body.appendChild(s)})(document,'https://rawgit.com/jdeerhake/6e767422f53610e9590fcfa5b1c6303a/raw/fixlp.js?' + (new Date()).getTime(),null,window)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment