Skip to content

Instantly share code, notes, and snippets.

@kirbysayshi
Created January 30, 2011 00:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save kirbysayshi/802357 to your computer and use it in GitHub Desktop.
Save kirbysayshi/802357 to your computer and use it in GitHub Desktop.
Want some more space for JSFiddle? Use this bookmarklet!
// javascript:(function(){if(typeof(MOAR)%20===%20%27undefined%27)%20{MOAR%20=%20{%20backPocket:%20{},%20tastedGood:%20false%20};}MOAR.dontBlameMe%20=%20function%20undo(){var%20prop,%20style;for(prop%20in%20MOAR.backPocket){for(style%20in%20MOAR.backPocket[prop]){$(prop).style[style]%20=%20MOAR.backPocket[prop][style];}}MOAR.tastedGood%20=%20false;};MOAR.nomNom%20=%20function%20moar(){MOAR.backPocket.header%20=%20{display:%20$(%27header%27).style.display};MOAR.backPocket.sidebar%20=%20{display:%20$(%27sidebar%27).style.display};MOAR.backPocket.content%20=%20{marginLeft:%20$(%27content%27).style.marginLeft%20=%20%27%27};$(%27header%27).style.display%20=%20%27none%27;$(%27sidebar%27).style.display%20=%20%27none%27;$(%27content%27).style.marginLeft%20=%20%2715px%27;MOAR.tastedGood%20=%20true;};if(MOAR.tastedGood%20===%20false){MOAR.nomNom();}%20else%20{MOAR.dontBlameMe();}})();
(function(){
if(typeof(MOAR) === 'undefined') {
MOAR = { backPocket: {}, tastedGood: false };
}
MOAR.dontBlameMe = function undo(){
var prop, style;
for(prop in MOAR.backPocket){
for(style in MOAR.backPocket[prop]){
$(prop).style[style] = MOAR.backPocket[prop][style];
}
}
MOAR.tastedGood = false;
};
MOAR.nomNom = function moar(){
MOAR.backPocket.header = {
display: $('header').style.display
};
MOAR.backPocket.sidebar = {
display: $('sidebar').style.display
};
MOAR.backPocket.content = {
marginLeft: $('content').style.marginLeft = ''
};
$('header').style.display = 'none';
$('sidebar').style.display = 'none';
$('content').style.marginLeft = '15px';
MOAR.tastedGood = true;
};
if(MOAR.tastedGood === false){
MOAR.nomNom();
} else {
MOAR.dontBlameMe();
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment