Hi, welcome to Fandom Developers Wiki! Thanks for your edit to the CustomToolbarLinks page. If you need help, read through our help pages or contact a local admin. If there are no active admins here, stop by Community Central and check out our forums.

Looking for live help? Then join us for an upcoming webinar to chat with staff and other Wikia editors. You can also check our Staff blog to keep up-to-date with the latest news and events around Wikia. Lastly, check out the Wikia Video Library, where you can find premium licensed videos to add to the wiki.

All of these links are a great way to start exploring Wikia.

Happy editing, Grunny@fandom (help forum | blog) 08:39, April 30, 2013 (UTC)


Hey, I'd strongly recommend wrapping your code in either an Immediately-Invoked-Function-Expression or an extension of the global Window object so as to not create global variables. Also, you might want to make some eye-candy changes as well with indentation and coding style. See for more info.TK-999 (talk) 16:20, April 30, 2013 (UTC)

Thanks for the information, I think I've addressed most of it. ~Bobogoobo (talk) 22:53, April 30, 2013 (UTC)

Semi-colon and closure

The semi colon is there to as a failsafe, in case someone forgot to add one at the end of of a script that is being imported before yours. There's more informaton on it here. It looks a little odd, but when you don't know what other scripts are being imported you can never be too safe. I actually had it happen to me last week with the importArticles() statement on RuneScape Wiki and it broke the ~10 scripts after the script with the error.

As for the globals in the closure, it's better described by plugging it into something like jshint. Remove the globals from the closure and you'll notice it comes back with $ and mw being undefined. These aren't standard javascript objects and the symbols/letters can be used by other libraries (Mootools is an example). If another library was to be imported there could be issues with what $ now means. Does it mean jQuery or this other library? Adding jQuery into the parens at the end of the function makes sure it always means jQuery. cqm 08:10, 22 Jun 2013 (UTC)

I believe Pecoes uses semi-colons at the start of his scripts, if you want more examples of it (one is SexyUserPage/code.js). It's not in the coding conventions because scripts should never need to fix other scripts failures, but as most of the script here are designed to be imported it's not hard to imagine there might be other scripts also being imported.
The other libraries may not be included by standard (jQuery is ported with MediaWiki since 1.16 or something), but you can just import them if you find a need for them. For instance at RuneScape Wiki we import tundra. In this case there's no confusion, but it shows how other libraries can be imported if you find a need for them. cqm 08:35, 22 Jun 2013 (UTC)


Hellow Bobo! I wanted to tell you about your script created, I talking about of "HighlightUsers". Works great, of course. The problem is that the script is not right when you want to highlight links users to have the AjaxRC enabled. When the RC is not auto-reload, the script works fine, but when used AjaxRC, colors are normal links to wiki's default color. Is there any solution for this? Thank you! ɥsɐD ʎʇooɔS 23:30, November 22, 2013 (UTC)

Add the following code above the importation of AjaxRC:
window.ajaxCallAgain = window.ajaxCallAgain || [];
~Bobogoobo (talk) 05:38, November 23, 2013 (UTC)
Bobogoobo wrote:
apparently I was asked about this before, might as well add this here since I guess people don't check the AjaxRC documentation or know what to do
Bobogoobo, U see, what happens is that the code you showed me in the top ONLY works only with wikis in English, because I inserted my global.js correctly, but when inserting the AjaxRC longer work for me, so I guess the problem is that I use different wikis into English. That's what I believe, and if I'm wrong, you can correct me. FluttershyWinkEmote.pngScooty Dash (talk) 16:57, December 4, 2013 (UTC)
That was a bug that I had meant to fix. It should be working now, thanks for reminding me. ~Bobogoobo (talk) 02:04, December 5, 2013 (UTC)

just reminding, how is progress on matching color code to user rights with only the highest user right displaying?Nerfmaster8 (talk) 04:45, December 26, 2013 (UTC)

I'm sorry for the delay! I have a lot of projects and things have been very busy. I tried coding a fix for this; does it work correctly now? (Keep in mind that higher user rights should be specified later in the setup code.) Let me know if there are any remaining issues and I'll try to fix them as soon as possible. Thanks, ~Bobogoobo (talk) 08:25, December 26, 2013 (UTC)

TopEditors Namespaces

Hi Bobogoobo! I have a question about the TopEditors extension. For the namespaces section, I looked on this page to find the namespace numbers I could use. But I could not find the number for the Thread namespace and that is something I am looking for. Do you know where I can find the namespace number for namespaces unlisted like Thread? Thanks! :)

{{SUBST:TheMattChatter}} 00:37, February 3, 2014 (UTC)

The easiest way is to go a page in that namespace, open the source code, and search for "wgNamespaceNumber". It's the number next to that. ~Bobogoobo (talk) 01:43, February 3, 2014 (UTC)
There's also runescape:MediaWiki:Namespace numbers. Everything from 112 to 121 are custom, non-standard namespaces that are only found on RuneScape Wiki. All others should be standard across Wikia. The only one I know of that it's missing is Board (2000) which is probably because we never installed the wikiaforum extension. cqm 02:31, 3 Feb 2014 (UTC)
Thank you so much! But I'm having a hard time finding the namespace for user blog and user blog comments.
{{SUBST:TheMattChatter}} 19:15, February 9, 2014 (UTC)
Try 500 and 501. ~Bobogoobo (talk) 00:36, February 10, 2014 (UTC)

TopEditors Usernames

Hello there,

For users who have ranks (and have different colored usernames), if they have a space in their name it will not show their username as the color it should be. For example, I'm an admin on the Club Penguin Wiki, and instead of my name showing as green, it shows up as if I have no rank. If you could fix this, that would be really great. Thank you :) —Preceding unsigned comment added by Kallie Jo (talkcontribs) 22:25, 9 February 2014‎ (UTC). Please sign your posts with ~~~~!

Could you link me to an example of what you're talking about? ~Bobogoobo (talk) 00:36, February 10, 2014 (UTC)
Try adding an underscore (_) instead of a space. Lil' Miss Rarity ]Open Source[ (talk) 12:44, February 10, 2014 (UTC)
What Lil' Miss Rarity said. Also, for an example of what I'm talking about click here. My username doesn't appear as green, but I'm an admin on that wiki and all admins' names should appear as green (everywhere else on that wiki my name is green :P). Sorry for not being clear enough, sometimes I'm really bad at explaining things.
Kallie Jo (talk) 21:41, February 10, 2014 (UTC)
Oh sorry, forgot to mention this: it also happens with UserRightsRecord, example here.
Kallie Jo (talk) 22:10, February 10, 2014 (UTC)

Both should be working now. Let me know if there are any more problems. Thanks for bringing this to my attention! ~Bobogoobo (talk) 23:51, February 10, 2014 (UTC)

Thank you, works perfectly now. :)
Kallie Jo (talk) 01:12, February 11, 2014 (UTC)


Continued from Talk:TopEditors

In some of these cases, I want to see a listing of the results that counted towards the totaled value. Having a link or a method to create that sub-list based on the initial list would be very helpful.

Nathan (Peteparker) (Earth-1218) (talkcontribsemail) 22:36, April 16, 2014 (UTC)

Yeah, that sounds useful. Can you link me to somewhere you're using this script so I can look at how best to add it? For now, I printed the API query used to the browser console - place the URL fragment given after ".com" in the URL of any page on the wiki to see the raw query data. I think I can link to the actual RecentChanges page for the query though, so it'll be a lot prettier. ~Bobogoobo (talk) 04:23, April 18, 2014 (UTC)

Sure! Here's the sandbox page I'm using to test it out on User:Peteparker/Top Editors.

I attempted to run the raw query using the last url fragment in the console, but didn't get exactly what I was looking for. I was hoping to see a list of the pages that made up each user's edit count, but instead saw a list of users. I used this url.

Thanks again!

Nathan (Peteparker) (Earth-1218) (talkcontribsemail) 22:39, May 27, 2014 (UTC)

Ah yeah, forgot I limited the output. Would something like this be readable enough or would you want it parsed into something prettier? ~Bobogoobo (talk) 01:11, May 28, 2014 (UTC)

HighlightUsers Bug

There is a bug with your HighlightUsers script. If the user has any kind of special characters in their name it dosen't get highlighted. To save you time, the problem is that the link uses the ASCII values of the characters. I was able to fix the problem for apostrophes on a local copy of the script by chaining another replace statement on lines 34 and 44
stuff[user].name.replace(/ /g, '_').replace(/'/g, '%27')
but this should be done for all the characters Wikia allows in usernames.

Jdm280 (Talk Contribs) 15:03, July 31, 2014 (UTC)

Edit: It is also impossible to integrate it with AjaxRC as the whole script is a self invoking function, preventing it from being called.

I think I have fixed both of these issues, thank you for bringing them to my attention. Let me know if anything is still amiss. ~Bobogoobo (talk) 21:50, July 31, 2014 (UTC)
It still does not work. The problem now is encodeURIComponent does not replace - _ . ! ~ * ' ( ) I can't seem to find a better fix then chaining a bunch of replace statements after it.
Jdm280 (Talk Contribs) 00:43, August 1, 2014 (UTC)
Wikia encodes those? Can you link me to some examples so I can take a closer look? ~Bobogoobo (talk) 03:40, August 1, 2014 (UTC)
It doesn't encode dashes, underscores, periods, asterisks, or parentheses but it does encode apostrophes I don't know about the rest. Here is the user I'm having problems with. Note: It is working on my wiki because its running a modified local copy of the script.
Jdm280 (Talk Contribs) 08:10, August 1, 2014 (UTC)
Edit: It's kinda annoying getting HighlightUsers to play nice with AjaxRC as window.ajaxCallAgain.push(highlightUsers); needs to be run after HighlightUsers but before AjaxRC loads it might be easier to just add the integration code at the end of HighlightUsers.
Instead of using encodeURIComponent (which I'm not entirely sure works for what you need), you can use mw.util.wikiUrlencode which correctly encodes spaces, colons and forward slashes for use on wiki urls as well as encoding special characters.
Also, it appears you're doing an ajax call every time you run that function which won't be so good with AjaxRC. Maybe run it once to get all the usernames/groups you want to highlight and cache the result? I saw the note about planning to rewrite it, so maybe save this for v2 :) cqm 09:19, 1 Aug 2014 (UTC)
"mw.util.wikiUrlencode" did not know there was such a thing. I tried it on my local copy and it fixed everything even removed the need for .replace(/ /g, '_')
Jdm280 (Talk Contribs) 13:58, August 1, 2014 (UTC)
Indeed, thanks for pointing out that function. Good suggestion also, though I'm not sure when I'll get around to rewriting it (still have several other projects I need to work on). As for ajaxCallAgain, I haven't used AjaxRC, but would think that with a name like "CallAgain", isn't that how it's supposed to work? ~Bobogoobo (talk) 16:10, August 1, 2014 (UTC)

[Chat CSS]

Hi, my name on Wikia is You'reMyPirate'sCove, and I'm trying to code the chat for and I can't seem to color my own name in the chat... I know it's because of the apostrophies, but is there anything I can do about it to color my username in chat?

/* the user's username color above his messages */
body.ChatWindow section#WikiaPage > .Chat li[data-user="You'reMyPirate'sCove'"] .username {
} /* the user's username color in the users rail */
body.ChatWindow #Rail li[data-user="You'reMyPirate'sCove'"] .username {

That's the code I'm using. Thanks so much!

Try changing each apostrophe to %27. Since username are usually encoded, that should find them properly. If that fails you could use your browser console to Inspect Element on your name in chat and see what the actual value is. Hope that helps, ~Bobogoobo (talk) 03:44, October 5, 2014 (UTC)

Highlight Users Help


I just wanted some help with the Highlight users feature. I followed all the instructions (I think I did) on your blog, but nothing seems to be happening. I was wondering if you please could check for any errors in the js. You can find it here. (

P.S. - My coding skills are basic...

Thanks a lot for your help!!


SPOOK THE WORLD! - Spooky Rish (talk) 18:12, January 7, 2015 (UTC)

Add a comma at the end of line 91 (chat moderator) and remove ... on line 95. Arkondi (talk) 20:43, January 7, 2015 (UTC)

HighlightUsers Suggestion

Hi, just a quick suggestion for HighlightUsers script, would it be possible if you could implement an option to modify font-weight as well? Bold or italic, this would make the script virtually match the regular capability of using CSS, but without the need to manually apply the configurations to each individual user. Thanks!

Hackey5 (talk) 02:59, January 31, 2015 (UTC)

Thanks for the suggestion! I have edited the script so that all links affected by the script have the class highlight-users-script, which you can use in CSS files. Did you want the option to customize the CSS of each group individually? I suppose I could add more classes to enable that. I don't really want to add substantial code to the script (e.g. to allow specifying CSS in the configuration) since I want to rewrite it anyway. Hope this helps, ~Bobogoobo (talk) 05:35, January 31, 2015 (UTC)

Exclude multiple users in the TopEditors extension

Hi. I've already posted a question like this in the talk page of the TopEditors page but I'll still ask the question here just in case, if you don't mind.

Is it possible to exclude multiple users from the list? I was planning to create a list of top editors excluding the admins. Hope you can answer this. Thanks. Jopjopjop (talk) 10:06, March 31, 2015 (UTC)

Thanks, I don't get notifications from the talk pages so asking here is good. I added an option, see if that works correctly. ~Bobogoobo (talk) 16:15, March 31, 2015 (UTC)
Hi. Thanks for responding so fast. Anyway, I think what you added on the code broke the whole thing as the list fails to load. I waited for hours just to make sure it would work eventually but still fails to load. :( So, there's that.
One last thing, how can I put a range on where the list will be generated from. For example, I want a list of top editors for the month of April. Will "offset" be sufficient to cover that one up?
Once again, thanks. Jopjopjop (talk) 04:45, April 1, 2015 (UTC)
Someone already fixed the code, seems like you forgot a ")" that prevented it from working. So, everything is working now including the exclusion of users. Thank you very much. The only thing I need to know is about the range of time/date where the list will be generated. Thanks. Jopjopjop (talk) 13:31, April 1, 2015 (UTC)
Haha, what a mistake to make. Thanks to Spottra. Glad it works now. Yes, offset will work - if you want it to include just the current month, use data-te-offset="{{#time:j}}" ("j" is the current day of the month). I think that should do it. ~Bobogoobo (talk) 16:24, April 1, 2015 (UTC)


I've just given you the codeeditor group, but the node.js reference caught my eye. Out of interest, what projects are you working on (if you can share them)? cqm 09:22, 11 Sep 2015 (UTC)

Also, in looking over MLP's Common.js, I saw a note about a bug in DupImageList/code.js. Is that bug still valid? cqm 09:26, 11 Sep 2015 (UTC)
Thanks! I haven't really gotten into all the projects yet, but what I'm working on now is maintenance on an RPC and API interaction project. It sounds like the bugs I mentioned there have been taken care of from Talk:DupImageList#Bug Revisit. ~Bobogoobo (talk) 17:52, September 11, 2015 (UTC)

HighlightUsers won't work with AjaxRC

I've copied the code on HighlightUsers that is supposed to make this work with AjaxRC, and ended up breaking up my wiki's js. Upon further investigation, I found out the cause - it's a chicken and egg problem.

The script manual for both HighlightUsers and ajaxRC instructs that ajaxCallAgain be specified before the importArticles call, but AjaxRC requires that the function it needs to callback already exists before the importArticles, and HighlightUsers have not yet loaded, leading to error of the intended function being undefined.

I do think there's a complicated JS mechanism that can fix this, but I'm not well versed in anything asynchronous that goes beyond ajax and callback. mfaizsyahmi [ talk ] 17:54, October 2, 2015 (UTC)

Sorry for the issues. Have you tried importing HighlightUsers separately before the definition of ajaxCallAgain? If that doesn't work, link me to where you are trying to get this to work and I'll take a look. ~Bobogoobo (talk) 19:14, October 2, 2015 (UTC)
I know that's a very feasible solution but importing twice defeats the purpose of the import function itself. Here is the js file.
I just got a brainwave - anonymous functions. Have that call highlightUsers function only if it exists. I'll try and come up with something. — mfaizsyahmi (message wall) 07:40, October 4, 2015 (UTC)
Done. I've modified the code to the following:

window.ajaxCallAgain = window.ajaxCallAgain || [];
window.ajaxCallAgain.push( function() {
   if (typeof highlightUsers == 'function') highlightUsers();

It's a bit laggy on ajaxRC's end, but at least I got my admin colours back. I suppose this can supplant the current code used in the manual page. — mfaizsyahmi (message wall) 07:47, October 4, 2015 (UTC)
Nice, good solution. Added to the page. ~Bobogoobo (talk) 18:41, October 4, 2015 (UTC)

Cache Script Request

Hey there, I really like you Cache Script, as it helps with cleaning up a quite outdated Wiki without loosing oversight on what has already been done. Could you maybe also add the "Special:Nonportableinfoboxes" Page to the script? Thanks for the support.Andulien 10:10, September 8, 2017 (UTC)

Sorry for the delay on this! The script is rather delicate to work with but I'll try to take a look at it soon. ~Bobogoobo (talk) 04:53, November 28, 2017 (UTC)

UserRightsRecord Suggestion

Hi, I really like your UserRightsRecord feature. However, I have one suggestion: adding a parameter, which if used, disables the header(s). That way, I and other users could create a stylized heading/headings of our own to make the record look more professional. ~TheGoldenPatrik1 (Talk) 19:22, November 26, 2017 (UTC)

Are you talking about removing the headings for the listing by users, or by rights? The latter would be complex to add options for. If you'd like to add CSS styling to headings (or change the text with JS), you can use the following selectors:
.rightsrecord h3
to select all group headings, or
.rightsrecord [id^="urr-bureaucrat"]
to select, for example, all headings for the Bureaucrat group.
Let me know if that helps or if there are other changes that would help your goal. ~Bobogoobo (talk) 04:53, November 28, 2017 (UTC)
Ah, that's helpful. Thanks! ~TheGoldenPatrik1 (Talk) 12:51, December 1, 2017 (UTC)

DisableBotMessageWalls Bug

Regarding your recent update to the script mentioned in the title, I was hoping that you could check Talk:DisableBotMessageWalls#New_Bug if you have not already to see if that is a potential fix for the problem described. Thanks! —Preceding unsigned comment added by Mooziq (talkcontribs) 09:19, 3 December 2017 (UTC). Please sign your posts with ~~~~!

Your fix looks correct, thanks for pointing out my mistake. Seems that the code editor doesn't work on my phone, so I'll make the change when I get to my computer. ~Bobogoobo (talk) 18:42, December 3, 2017 (UTC)

OldFilePages rewrite

I recently rewrote OldFilePages as the old code concatenated HTML in many weird ways and concatenating HTML is generally a cause of XSS issues (and it was generally unreadable, probably because the last non-minor update to the code was in 2013. Maybe it's just me, though). The things I updated are:

  • Moved things that can be moved to CSS here that gets imported by the script
  • Made metadata table behave the same as in Monobook by requiring the mediawiki.action.view.metadata ResourceLoader module to load and unhiding the collapse button that Oasis hides
  • Instead of applying inline CSS to tab content to unhide it I removed their classes
  • The whole function now doesn't execute unless the requirements (that were in the onload function before) are satisfied
  • Prevented double-loading
  • Made it use I18n-js for loading translation data, so the script can be translated through the translation editor
  • Combined all API calls into one, shortening the number of API requests from 3 to 1 (but as the script is now requiring more external resources the overall number of HTTP requests is probably higher)
  • Made a configuration option limit that allows users to change the maximum amount of file transclusions to be displayed (100 by default)

Could you take a look at the script and tell me if you see something wrong or submit it for review if you don't see anything wrong?

Cheers! -- Cube-shaped garbage can 18:53, February 9, 2018 (UTC)

Oh yes, the code was quite old. I don't think XSS was an issue since I didn't pull any content from the page to use in the script, but I'm far from an expert. It all looks good to me (without actually testing it yet), I haven't been actively coding for a while so you used several tricks and things I never learned. Good job fixing the metadata table, that was a pain. Comparing the code, I don't see in your version: 1) the loading throbber (just a nice usability feature in my experience) 2) adding the redirect class to file and backlink redirects so they can be displayed consistently for the wiki. Otherwise looks great, I've submitted it for review. Could I trouble you to update the description page as well? Thanks, ~Bobogoobo (talk) 23:27, February 9, 2018 (UTC)
Ah, alright, I think I added these two things in now (and resubmitted the script for review). I'll update the description page now. -- Cube-shaped garbage can 10:08, February 10, 2018 (UTC)
Looks great, thanks for your work! ~Bobogoobo (talk) 18:48, February 10, 2018 (UTC)


Japanese is converted, so it will not work properly.

ユーザー:7yultukuri7 → \u30e6\u30fc\u30b6\u30fc:7yultukuri7

ja ユーザー:   en User:

7yultukuri7 (talk) 12:53, June 1, 2018 (UTC)

I've made some adjustments so that it should work now. After the revision is approved, let me know if it still doesn't work. Thanks, ~Bobogoobo (talk) 05:52, June 2, 2018 (UTC)
Community content is available under CC-BY-SA unless otherwise noted.

Fandom may earn an affiliate commission on sales made from links on this page.

Stream the best stories.

Fandom may earn an affiliate commission on sales made from links on this page.

Get Disney+