v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "User:Lethosor/fullpage.js"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(Created page)
 
m (fix)
Line 1: Line 1:
 
// Enables full-page mode (like full-screen, but only in-browser)
 
// Enables full-page mode (like full-screen, but only in-browser)
 
jQuery(function($){
 
jQuery(function($){
var show=function(){$('#mw-page-base, #mw-head-base, #mw-navigation').show(200);$('.mw-body').css({width:'', margin:''})};
+
var show=function(){$('body').children().not('.mw-body').show(200);$('.mw-body').css({width:'', margin:''})};
var hide=function(){$('#mw-page-base, #mw-head-base, #mw-navigation').hide(200);$('.mw-body').animate({width:'100%', margin:0}, 200)};
+
var hide=function(){$('body').children().not('.mw-body').hide(200);$('.mw-body').animate({width:'100%', margin:0}, 200)};
 
var toggle=function(){if(hidden)show();else hide();hidden=!hidden;}
 
var toggle=function(){if(hidden)show();else hide();hidden=!hidden;}
 
var count=0, hidden=false;
 
var count=0, hidden=false;
 
$(window).keydown(function(e){if(e.keyCode==18){count++;if(count>=3){toggle();count=0}}else count=0;});
 
$(window).keydown(function(e){if(e.keyCode==18){count++;if(count>=3){toggle();count=0}}else count=0;});
 
});
 
});

Revision as of 22:48, 19 September 2013

// Enables full-page mode (like full-screen, but only in-browser)
jQuery(function($){
var show=function(){$('body').children().not('.mw-body').show(200);$('.mw-body').css({width:'', margin:''})};
var hide=function(){$('body').children().not('.mw-body').hide(200);$('.mw-body').animate({width:'100%', margin:0}, 200)};
var toggle=function(){if(hidden)show();else hide();hidden=!hidden;}
var count=0, hidden=false;
$(window).keydown(function(e){if(e.keyCode==18){count++;if(count>=3){toggle();count=0}}else count=0;});
});