in Firefox2

Error: wgUserGroups has no properties
Source File: http://eq2.wikia.com/index.php?title=-&action=raw&gen=js
Line: 245

in ie6

Line: 246
char: 1
Error: 'wgUserGroups' is null or not an object
code: 0
url: <doesnt matter, same for all pages while not logged in>

when logged in (atleast for me, milage may vary by user)

var wgUserGroups = ["bureaucrat", "sysop", "*", "user",
"autoconfirmed", "emailconfirmed"];

when not logged in, this varible does not exist, so it its not an array.


from whatever/where ever title=- loads from

// 
************************************************************************************************
// Admin tool displayer
//  If an object has class="adminTools" and style="display:none;",
//  it will be displayed for sysops
if(wgUserGroups.join(' ').indexOf('staff') + wgUserGroups.join('
').indexOf('sysop') > -2) addOnloadHook(addMainPageTools)
function addMainPageTools() {
  var at = 
getElementsByClassName(document.getElementById('bodyContent'),'*','adminTools');
  if(at.length==0) return
  for(var i=0;i<at.length;i++) {
    at[i].style.display = 'block';
    at[i].className += ' plainlinks';
  }
}

the above code need to check that wgUserGroups is an array first, before
attempting to use it like an array

http://www.google.com/search?q=javascript+check+for+array

lots of examples
_______________________________________________
Wikia-l mailing list
[email protected]
http://lists.wikia.com/mailman/listinfo/wikia-l

Reply via email to