Skip to content

Instantly share code, notes, and snippets.

@hadronix
Last active August 29, 2015 13:57
Show Gist options
  • Save hadronix/9636918 to your computer and use it in GitHub Desktop.
Save hadronix/9636918 to your computer and use it in GitHub Desktop.
Skygo (Ger) Fullscreen Bookmarkelt
(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