Don't like the tables design broken by shrinking the cells to few pixels width?
Don't want to scroll the code examples?
Want to make use of your 24"+ screen?
Don't want to wait 5 seconds after clicking "View full screen" and back?
Demo: Copy the URL below to your address bar. Then press enter (wiki goes wide), then again (restores).
"Installation": Drag and drop the link to your bookmark toolbar (enable it first if necessary).
Usage: Click it to make the wiki wider. Click again to restore the original proportions.
Note: Newer Firefox versions do not allow dragging of javascript: URLs. You have to create the bookmark manually.
Note: This does no permanent changes to anything (except your bookmark toobar .-)
javascript:(function%20makeWikiFullscreen(){var%20bDebug=false;if(bDebug)alert("Begin...");var%20isFullscreen=document.body.className.indexOf("ozizkaFullscreen")!=-1;if(!isFullscreen)%20document.body.className+="%20ozizkaFullscreen";else%20document.body.className=document.body.className.replace("%20ozizkaFullscreen","");var%20data=[{id:"contentcontainer",props:{width:"1200px"}},{id:"jive-wrapper",props:{width:"1200px"}},{id:"jive-body",props:{width:"1180px"}},{id:"jive-body-maincol",props:{width:"1150px"}},{id:"jive-body-sidebarcol-container",props:{display:"none"}},];for(i%20in%20data){var%20change=data[i];if(undefined==change.id||!change.id)continue;if(bDebug)alert(change+":%20"+change.id);var%20elm=document.getElementById(change.id);{for(propName%20in%20change.props){if(!isFullscreen)%20elm.style[propName]=change.props[propName];else%20elm.style[propName]=(propName=="display"?"block":null);}}}%20if(bDebug)alert("End.");})();
Enjoy!
Here's the code:
// javascript:
(function makeWikiFullscreen(){
var bDebug = false;
if( bDebug ) alert("Begin...");
var isFullscreen = document.body.className.indexOf( "ozizkaFullscreen" ) != -1;
if( !isFullscreen )
document.body.className += " ozizkaFullscreen";
else
document.body.className = document.body.className.replace(" ozizkaFullscreen", "");
var data = [
{ id: "contentcontainer", props: { width: "1200px" } },
{ id: "jive-wrapper", props: { width: "1200px" } },
{ id: "jive-body", props: { width: "1180px" } },
{ id: "jive-body-maincol", props: { width: "1150px" } },
{ id: "jive-body-sidebarcol-container", props: { display: "none" } },
];
for( i in data ){
var change = data[i];
if( undefined == change.id || ! change.id ) continue;
if( bDebug ) alert( change + ": " + change.id );
var elm = document.getElementById( change.id );
/*if( isFullscreen )
elm.style.cssText = ""; Does not restore display: block.
else*/
{
for( propName in change.props ){
if( ! isFullscreen )
elm.style[propName] = change.props[propName];
else
elm.style[propName] = ( propName == "display" ? "block" : null );
}
}
}
if( bDebug ) alert("End.");
})();
Comments