Last active
August 29, 2015 13:57
-
-
Save hadronix/9636918 to your computer and use it in GitHub Desktop.
Skygo (Ger) Fullscreen Bookmarkelt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
// silverlight dont allow unfocused fullscreen | |
// remove useless elements and resize to browser width | |
var removeableElements = [ | |
'#header', '#stage_nav_block', '.detail_header', | |
'.detail_details', '.detail_credits', '.detail_actions', '#main_footer', '#footer', '#bottom_spacer_block', '.blue_line' | |
]; | |
var $player = $('#playerContainerId'); | |
$(removeableElements.join(",")).remove(); | |
$('.playerArea').parent().children(':not(".playerArea")').remove(); | |
var strechyElements = ['#stage', '#main_wrapper', '.detail_body', '#detail_block', '.container', '.detail_player', '#playerContainerId']; | |
$(strechyElements.join(",")).css({ width: '100%', height: '100%', margin: 0, padding: 0, border: 0, background: 'none' }); | |
$('html, body').css('overflow', 'hidden'); | |
var resize = function() { | |
$player.children('object').css({ width: window.innerWidth, height: window.innerHeight }); | |
} | |
resize(); | |
$(window).bind('resize', function() { | |
resize(); | |
}); | |
})(); | |
// uglified for bookmarkelt | |
javascript:!function(){var a=["#header","#stage_nav_block",".detail_header",".detail_details",".detail_credits",".detail_actions","#main_footer","#footer","#bottom_spacer_block",".blue_line"],b=$("#playerContainerId");$(a.join(",")).remove(),$(".playerArea").parent().children(':not(".playerArea")').remove();var c=["#stage","#main_wrapper",".detail_body","#detail_block",".container",".detail_player","#playerContainerId"];$(c.join(",")).css({width:"100%",height:"100%",margin:0,padding:0,border:0,background:"none"}),$("html, body").css("overflow","hidden");var d=function(){b.children("object").css({width:window.innerWidth,height:window.innerHeight})};d(),$(window).bind("resize",function(){d()})}(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment