LOGAN - 2007-12-04

Logged In: YES
user_id=1242091
Originator: YES

To accomplish this I added this code below to the bootscript page. I know WoaS has already implemented a similar script but I wasn't sure where it's located. (Also if that routine is in front of the bootscript page or not). I only had to add an additional DIV tag for the new page button in the page menu.

I added this to the scriptboot page and not to the wiki code itself because that would branch my copy from the official trunk. (hence updating might be more complicated for future releases of WoaS.)

/* Hide buttons if Online */
myReference = location.href.split('://',1);
if (myReference[0] != 'file'){
document.getElementById('menu_advanced').innerHTML='';
document.getElementById('menu_unlock').innerHTML='';
document.getElementById('menu_lock').innerHTML='';
document.getElementById('menu_edit').innerHTML='';
document.getElementById('menu_edit_button').innerHTML='';

document.getElementById('side_menu_newpage').innerHTML='';
}

Are you planning to standardizing the used tags and functions more in the future? (for example each tag includes a woas_ or sw_ (Shorter alternative for stickWiki) prefix?

I tested this solution on both IE6 and FF2 and it works without a problem. I assume IE7 and FF3 as wel as other browsers would also handle this correct.