Community Central

Admin Forum:Checking if you're anonymous


Admin Forum:Checking if you're anonymous

19,790pages on
this wiki
Add New Page
Talk0 Share

This Forum has been archived

Forums: Admin Central Index Technical Help Checking if you're anonymous
Central's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 1540 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

Hi. I'm trying to get more editors on my wiki with this itsy bitsy hunk of code I was working on yesterday:

/****** Edit button popup for anons (experimental) ******/
if(jQuery.inArray('user', wgUserGroups) == -1) {
  function AirhogsChangeURL() {
    window.location.href = "" + wgPageName + "&action=edit";
  $('#WikiaPageHeader .wikia-menu-button').css('height', '18px');
  $('#WikiaPageHeader .wikia-menu-button').css('width', '75px');
  $('#WikiaPageHeader .wikia-menu-button').append('<div id="AirhogsEditBoxContainer" style="width: 120px; margin-top: 5px; position: relative; right: 15px;" onClick="AirhogsChangeURL()" onMouseOut="$(this).fadeOut(\'200\')">&nbsp;</div>');
  $('#AirhogsEditBoxContainer').append('<img src="" style="margin-bottom: 0px; position: relative; left: 25px; top: 3px;"/>');
  $('#AirhogsEditBoxContainer').append('<div id="AirhogsEditBox" style="background: #228b22; opacity: .9; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; color: white; padding: 10px; white-space: normal; margin-top: 0px; text-align: center;">Have something to add? You can edit this page!</div>');

I know the code inside the if statement works, but something's wrong with the if statement itself, so it doesn't display for anybody. It's supposed to check that you're anonymous and only then run the code. If anyone can help, I would really be thankful. Also, I was trying to get fadeIn() working, but that's not really that big a deal. Any help is appreciated! —Airhogs777 WCB WS 21:15, February 5, 2012 (UTC)

Hm... seems to be working now. Weird. Well, thanks for reading. —Airhogs777 WCB WS 00:12, February 7, 2012 (UTC)