Hi, welcome to Wikia Developers Wiki! Thanks for your edit to the InfoWidgets page.

If you need help, and there are no local admins here, you may want to visit the forums on the Community Central Wiki. 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.

Happy editing, Grunny@fandom (help forum | blog)

Infowidgets throbber

Hi. Just wanted to say that I like the Infowidgets script but the throbber looks kinda..... brusque for lack of a better word. You can find another throbber here if you're interested. Best, --Kangaroopowah (Talk) 05:28, February 21, 2012 (UTC)

I agree. I've seen better ones too. On our landing page I used a different one as well. But for the default throbber I was going for something basic and non-obtrusive. Once I finally get around to writing the Advanced Guide, you'll see that the throbber can be easily replaced. There's already a hook for that. I should probably mention that in the Intro... -- Pecoes 05:47, February 21, 2012 (UTC)

How about this one? -- Pecoes 07:13, February 21, 2012 (UTC)
I was going more for the one in AJAX RC (I linked to it). Apart from that I can give you a few more if you're interested. My problem for the throbber.gif is that it's way too obtrusive. But this is just my advice and you can take it how you please =). Best, --Kangaroopowah (Talk) 01:59, February 23, 2012 (UTC)
I've seen the one that you talked about. It does look nice. And it's a lot smaller and low key than mine. That's for sure. But I think I'll stick with the one I have now - the one with the expanding frames. Aesthetically I like it. And of course it's obtrusive. It's supposed to draw attention to the fact that the widget refreshes! :D
The preload hook gives users a relatively easy way to swap the image against another one - or do something different entirely. So if you could give users an alternative or two that would be cool! Upload them to this wiki and I'll showcase them in the documentation. Just make sure your stuff is easy to find. There's already a Category:Throbber. You could put them directly into the Category:InfoWidgets as well... -- Pecoes 05:46, February 23, 2012 (UTC)
On second thought... yes, you're right. I've changed the default image to this one:
Facebook throbber
Pecoes 07:38, February 23, 2012 (UTC)

Sine edits

Even though you're rewriting sine, I added some config stuff for the moment that can be merged with sine 2.0. Can you check the code when I'm done? Thanks, --Kangaroopowah (Talk) 04:30, March 13, 2012 (UTC)

Okay. That's easy to merge. You had me worried there for a moment :) -- Pecoes 06:42, March 13, 2012 (UTC)

Inactive users

As you can see here, she isn't inactive, yet it gives that tag to her. So, is this a problem with the script or is it something else? Hairrazerrr Talk 23:28, April 9, 2012 (UTC)

Can you give me a link to the actual page instead of an image? That would make it easier to find out what's wrong. -- pecoes 02:07, April 10, 2012 (UTC)
Fixed. I've also added her user page (and your user page btw) to the list of test cases. They all work. Please, let me know if I missed another test case! -- pecoes 02:20, April 11, 2012 (UTC)

ListAdmins JavaScript Problem

I tried doing styles with variables, but it didn't work. Can you check out ListAdmins and fix it please? -- Sam Wang (talk) 10:23, May 26, 2012 (UTC)

There's not really a need to rewrite the JavaScript. You can design the output with CSS. I've added an example to the ListAdmins page. -- pecoes 12:36, May 26, 2012 (UTC)
Can you please elaborate the first part of the installation here. 09:23, July 5, 2012 (UTC)
pecoes 10:09, July 05, 2012 (UTC)

Perfect. If the code is in my wikia.js, others can see it? 11:21, July 5, 2012 (UTC)

This is Wikia. Everbody can see everything :P Only admins can edit in the MediaWiki namespaces though. -- pecoes 11:55, July 05, 2012 (UTC)
The code is in my personal wikia.js, then? 14:03, July 5, 2012 (UTC)
It won't work in your personal wikia.js, no. This is not meant as a user-script, but as a site-script. That container with the ID needs to be added to the page(s) by hand for this to work. -- pecoes 15:44, July 05, 2012 (UTC) -- pecoes 15:44, July 05, 2012 (UTC)
Why isnt it working here? 07:58, July 6, 2012 (UTC)
I do see it working. Have you refreshed the page?
I fixed it myself. 12:45, July 6, 2012 (UTC)

────────────────────────────────────────────────────────────────────────────────────────────────────Great :) pecoes 12:51, July 06, 2012 (UTC)

Can you see this please. Its showing names of people who havent even contributed there. -- to me) 06:17, July 22, 2012 (UTC)

The querymodule allusers doesn't seem to work as intended. I got only 2 different list of users: one for parameter augroup and one for auexcludegroup. Additionally they are independent of the given value and I also get a nonempty list, if using the same value for both at the same time. Perhaps there should be a notice on ListAdmins and/or in the code (so that it is shown in all wikis importing it) that's something wrong, i.e. "Currently there's something wrong with the API. Please check Special:ListUsers/sysop instead." Arkondi (talk) 07:48, July 22, 2012 (UTC)
I'm aware of that. It's out of my hands though. There's a bug in Wikia's API code that produces those nonsensical results. Here's what Staff told me when I reported this bug:
"We appreciate you letting us know about this problem with the API. That definitely is not working as intended. I will pass your report directly to our technical staff for investigation and review."
EDIT: That's a good idea, Arkondi. I'll do that. -- pecoes 07:54, July 22, 2012 (UTC)
This is happening only after MediaWiki upgrade. -- to me) 11:11, July 22, 2012 (UTC)
You're absolutely right. I'll amend the warning on the main page and in the code! Thanks! -- pecoes 11:37, July 22, 2012 (UTC)

Info Widgets

Why don't you do something like "minResults", so the minimum amount of results to display? Because for the code you edited on Isle of Tune Wiki where I wanted to only select certain namespaces, it displayed less than 10 results. -- Sam Wang (talk) 12:03, July 5, 2012 (UTC)

That's tricky. It actually requests more than 10 results already. But not all results are unique. If a page is changed multiple times over a short period of time e.g. than a request for the last 10 edits on the wiki may show that page only. That's why the RecentChanges InfoWidget requests 50 results. I can maybe increase it a little more - it seems to be safe to do... But it's not really possible to deliver exactly 10 unique results. -- pecoes 16:52, July 05, 2012 (UTC)
pecoes 10:50, July 06, 2012 (UTC)

Oasis toolbar buttons

Sorry for disturbing you again. But i added this code to my global.js and its not working? The only button I see there is follow. Should I also do something else? 05:33, July 9, 2012 (UTC)

There's not much I can do, I'm afraid. That's not my script and I've never used it myself. You should try to get in contact with Porter21 or Dantman. -- pecoes 06:03, July 09, 2012 (UTC)


Can you make the usage of this more clear please. Thanx -- to me) 08:51, August 3, 2012 (UTC)

I don't think I can. InfoWidgets was written with users who have at least a basic understanding of JavaScript in mind. If you don't belong to that group this gadget might not be for you.
pecoes 09:37, August 03, 2012 (UTC)
Just telling it with others in mind. -- to me) 12:47, August 3, 2012 (UTC)
Well, if you cannot get it to do what you want, let me know, I can probably assist you! -- pecoes 12:51, August 03, 2012 (UTC)
Oops i didnt see this. Sorry. -- to me) 12:55, August 3, 2012 (UTC)
 :) -- pecoes 13:08, August 03, 2012 (UTC)
Why isnt it showing it here? Where did I go wrong? -- to me) 13:12, August 3, 2012 (UTC)
There are some syntax errors in you customeditbuttons code. You will have to fix those first.
pecoes 14:00, August 03, 2012 (UTC)

Like? -- to me) 15:11, August 3, 2012 (UTC)

This bit at the end is wrong:
/* snip */ "tagClose" : "</ref>" , "sampleText" : chapter 0, page 0" } ; }
It should probably be:
/* snip */ "tagClose" : "</ref>" , "sampleText" : "chapter 0, page 0" } ; }
-- pecoes 16:02, August 03, 2012 (UTC)
I was talking about this -- to me) 03:46, August 4, 2012 (UTC)
And I was talking about parse errors in your MediaWiki:Common.js. As long as you don't fix those, MediaWiki:Common.js will never ever be executed and nothing in it - neither the InfoWidgets nor anything else for that matter - will run. And there's something I need to add at this point: This page is not the place to discuss general JavaScript problems. Turn to the Community Forum if you need help with JavaScript syntax, please! -- pecoes 05:49, August 04, 2012 (UTC)

RE: Preferences module

Apologies if I don't chime in over there, the conversation is really long and I'm a bit short on time to wrap my brain around the fine details of another project at the moment. On a higher level, the basic API looks like it should be useful, it seems you've given convenient functions for getting and setting local and global preferences.

I guess my only concern would be waiting to see a few scripts actually make use of it first. Most scripts I've worked on wouldn't benefit from this preferences tool, so I'm not in any hurry to use it. But Railgun might benefit from this, when I get back to working on it. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 21:46 UTC, Sunday, 23 September 2012

Template suggestion

Hello Wikia Developers

My name is Gauzz Rifle, and I love to create a sandbox wiki for random things. As a suggestion for a template, I want to have a template similar to 'spoiler alert' but is different. There will be no buttons for the pop-up, just content to be displayed. To close the pop-up, just click black overlay. The pop-up should appear on page load of an article-space of a wiki, and this template should be applied multiple times on one page, (example: There are three pop-ups on a page, closing one will display the other one, closing the other one will reveal the last one, and closing the last one will reveal the real content of the page).

Thanks in advance

Gauzz Rifle

Hello, I'm a friend of Alfons (Gwaine Looks lks Cenred), from Merlin Wiki, and I see he's assigned you to help out with some JS/CSS. Well this thing caught my attention on Lego Wiki , how they've merged the search bar with the masthead on the user profiles. I think it's pretty awesome and I'd like it for our Wiki! Do you think you could help with that? (And a solution for the issue with the search button going underneath the search bar) ;) Thank you a lot! 13:14, October 29, 2012 (UTC)Dryuuu

Hi Dryuuu! Yes I could help you with that. I'm just not sure it's a good idea. I say that mainly because I'm working with Lunarity on the UserTags addon. That addon uses that exact same space to display a lot of extra information about the user. That's pretty cool stuff and new cool stuff is on the way: I want to give users the option to signal their language preference(s) on the masthead e.g.
So, yes, I could help you with that. I'd rather get you hooked on UserTags though :) -- pecoes 13:27, October 29, 2012 (UTC)

Page content scroller

Hello the amazing Pecoes!

It's me from Merlin Wiki. I thought I'd ask you a few things. Firstly, could you remove the drop down box for page summaries.

And secondly, do you know of any type of sideways page scroller I can use? The click onto next area of content type of scroller, like this:

so the content goes in between those arrows, or the arrows goes underneath or something like that (with the nice sliding transition effect). I have long yearned for something like that. The closest I can get is this slider here, which is badly coded.

I appreciate your help and knowledge! Please get back to me soon if you can!

I'll drop by your wiki tomorrow. There are a few things I promised to look into, aren't there? It's been a busy week, sorry. But I will. Look into them, I mean :)
As for the slider: Some of these may be useable at Wikia. I'd have to double-check though, if you find one you like. It should be possible to roll your own too, I suppose. MediaWiki already has the jQuery UI slider in its module library. I gotta ask first though: What is the source of the images? Where do they come from? Will you generate them? Is this some sort of wiki navigation? -- pecoes 06:55, November 11, 2012 (UTC) -- pecoes 06:55, November 11, 2012 (UTC)
I made a little demo. Let me know if that's what you had in mind, please! --  pecoes  00:31, November 15, 2012 (UTC) 

Re: BotoneraPopups Demo

It's strange, since I have it installed, it usually loaded twice on that page, but now it doesn't. But then I tested the page as logged out (oasis and ?useskin=monobook) and in both the script loads fine (with the DemoScripts.js‎‎ included through the load.php). So maybe it's not broken after all. Doesn't work for you? --Ciencia Al Poder en WikiDex 19:59, November 11, 2012 (UTC)

Ha. Now, it does work for me. I probably tested before the ten minutes the ResourceLoader needs to refresh were up :)
Having said that... The popup occasionally shows up in the upper left corner - where it's half-hidden by the Wikia header-toolbar. Not very often, but it does happen.
Btw: Is there a reason why you have to press ctrl before you move the mouse over the link? I noticed it doesn't work when you move the mouse over the link first and press ctrl afterwards. --  pecoes  20:39, November 11, 2012 (UTC) 
The weird relocation seems to happen when you open the popup and then move the mouse from the bottom over the popup while pressing ctrl. That's what makes it relocate into the corner. --  pecoes  20:48, November 11, 2012 (UTC) 
Hmm, yes, I prefer to reply on the user talk page so him/her get the notification. If you prefer to follow the thread here I have no problem, I'll watch this page. I'm aware that it sometimes moves to the upper-left corner, but when I want to reproduce this then it doesn't happen :( That's great that you got the exact steps to reproduce! I only use the mouseover event. Basically, links are often very small and it's easy to leave and enter the mouse to them when one wants it to appear, I was afraid that it would be annoying if it displays when pressing the CTRL key for CTRL+Click or CTRL+C, etc (although the key is configurable). --Ciencia Al Poder en WikiDex 21:13, November 11, 2012 (UTC)
Well, it's sensible to make it work as you say on CTRL press, and probably add an option to disable it. I'll try to do that.
About the opened popup when you return, I see this the other way: When I CTRL+Click, the new opened tab goes in the background instead of switching me to that new tab (maybe it's browser configurable). But anyway, consider the case when one wants to open several action links (edit, history...). And also I usually use it as a "marker" on Recent Changes so when I follow some link in a new tab and then return, it's easy to find where I was before leaving the tab. Ciencia Al Poder en WikiDex 10:46, November 12, 2012 (UTC)

rgb to hex

Is there a way to turn rgb to hex in Colors? --Kangaroopowah (Talk) 04:35, November 18, 2012 (UTC)

This should do it:
console.log( dev.colors.parse('rgb(255, 0, 0)').hex() ); // #ff0000

 pecoes  05:46, November 18, 2012 (UTC) 

Ahh ok. I was doing that but I wasn't calling .hex() after it because I thought that the toString method outputted hex. My bad. --Kangaroopowah (Talk) 17:30, November 18, 2012 (UTC)
JavaScript calls toString automatically if you convert to a string. But only if you convert to a string:
// here we convert to a string:
var str = '' + dev.colors.parse('rgb(255, 0, 0)') );
// but here we don't:
var red = dev.colors.parse('rgb(255, 0, 0)');

 pecoes  18:23, November 18, 2012 (UTC) 


Hey I saw you were going to move Wikimarks here? That's cool, maybe some more people will take notice. Btw the Wikimarks page is empty though?? Are you still working on something and left it blank on purpose? 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 00:54 UTC, Tuesday, 27 November 2012

I took the easy way out and simply placed a redirect to the page here :) Check the credits btw! --  pecoes  01:20, November 27, 2012 (UTC) 
Thanks for the honorary mention. By the way, your slideshow looks different. Is that like a custom slideshow? Was there something about the default Wikia one (in the editor, there's a "Slideshow" feature just below the Publish button) you didn't like? It would look like this:
20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 03:47 UTC, Tuesday, 27 November 2012
The slideshow gallery more often than not doesn't work for me. I find the only way to make it work reliably is to enable scripts from That's unacceptable. Period. --  pecoes  03:54, November 27, 2012 (UTC) 
Do you have a vendetta against Facebook? 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 04:07 UTC, Tuesday, 27 November 2012
I do and it never fails to amaze me that there are people who don't. Facebook is evil. --  pecoes  04:11, November 27, 2012 (UTC) 

──────────────────────────────────────────────────────────────────────────────────────────────────── Not to change the topic but I'd just like to quickly throw in that your "Start" page will get added to the editor before Wikimarks gets officially added to the JavaScript list. --  pecoes  04:21, November 27, 2012 (UTC) 

That's cool, speaking of the start page, I'm sure lots more links should be added to it over time. For example, I have one in my wikimarks that's something like this: -- very handy for admins for figuring out MediaWiki: pages, it can save one the effort of sifting through Special:AllMessages. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 04:25 UTC, Tuesday, 27 November 2012
The start page will remain fully editable if that's what you're worried about. There's no rush to perfect it. --  pecoes  04:35, November 27, 2012 (UTC) 


Hi, do you know how to make sub-sub menu's like inside the one made by ** another one? OriginalAuthorityContrib

That's described on the page, isn't it? You simply use three asterisks:
* main menu = main menu link
** sub menu = sub menu link
*** sub sub menu = sub sub menu link

The only thing you need to watch out for is that level-3 links only work under level-2 links or other level-3 links.
 pecoes  21:19, November 27, 2012 (UTC) 
Wikimarks error

Wrong position

As you can see in the above screenshot, there is something wrong with the wikimarks. Can you fix it?--— UltimateSupreme (Talk) 11:14, November 28, 2012 (UTC)

It seems Wikia has made some major changes to the menu CSS. Ah well. That should be fixed now. --  pecoes  16:33, November 28, 2012 (UTC) 
I mean like thisOriginalAuthorityContrib 22:31, November 29, 2012 (UTC)
What am I supposed to see there? --  pecoes  22:54, November 29, 2012 (UTC) 
Ok so on the wiki tab there is a thing that when hovered makes a drop down menu right? when you hover over something in the drop down menu another menu appears at the side how can I get that? OriginalAuthorityContrib 14:18, December 1, 2012 (UTC)
Didn't my previous reply answer that already?
* main menu = main menu link
** sub menu = sub menu link
*** sub sub menu = sub sub menu link

Will render as this: Ultimate-authority
Or wasn't that your question? --  pecoes  14:26, December 01, 2012 (UTC) 

Oh Thanks does this method only work with Wikimarks? OriginalAuthorityContrib 14:34, December 1, 2012 (UTC)

You can surely create subsubmenus yourself, but that requires quite a bit of doing. I should know. --  pecoes  14:37, December 01, 2012 (UTC) 
Ok Thanks OriginalAuthorityContrib 14:44, December 1, 2012 (UTC)
Erm I added the code to my js but it hasnt added the logo so i can edit it? OriginalAuthorityContrib 14:55, December 1, 2012 (UTC)
Add it only once, please! --  pecoes  14:59, December 01, 2012 (UTC) 
I have only got it once! OriginalAuthorityContrib 15:02, December 1, 2012 (UTC)
You've copypasted my own global.js so I know for certain it's already there. A few lines under the one where you've addded it. But nevermind. Replace your importArticles statement with this, please:
    type: 'script',
    articles: [

 pecoes  15:27, December 01, 2012 (UTC) 

Everything else works but the log ext. isn't appearing! OriginalAuthorityContrib 15:43, December 1, 2012 (UTC) -- OriginalAuthorityContrib
What is a "log ext."? --  pecoes  15:47, December 01, 2012 (UTC) 
Woah! I didn't write that I wrote Logo... OriginalAuthorityContrib 15:52, December 1, 2012 (UTC) -- OriginalAuthorityContrib
You may have to wait a few minutes for the changes to take effect. If that doesn't work, tell me what your browser's error console says, please! --  pecoes  16:05, December 01, 2012 (UTC) 
I got the logo but when i click the logo and put what i want in i click the save button and nothing happens OriginalAuthorityContrib 18:04, December 1, 2012 (UTC) -- OriginalAuthorityContrib
I just fixed a bug in the editor. It should work now. Wait a few minutes, refresh and try again, please! --  pecoes  18:34, December 01, 2012 (UTC) 
No its doing the samw OriginalAuthorityContrib 19:09, December 1, 2012 (UTC)
What did you try to post?
* Original Authority = User:Original Authority
***Talk = User_talk:Original Authority
***Blog = User_blog:Original Authority
***Contributions = Special:Contributions/Original Authority
**Stuff not specific wiki related
***Preferences = Special:Preferences
***Edit Count = Special:Editcount/Original Authority
***Log = Special:Log/Original Authority
***Subpages = Special:PrefixIndex/User:Original Authority
***Watchlist = Special:Watchlist
***Global.js = w:User:Original Authority/global.js
***Global.css = w:User:Original Authority/global.css
OriginalAuthorityContrib 19:23, December 1, 2012 (UTC) -- OriginalAuthorityContrib

──────────────────────────────────────────────────────────────────────────────────────────────────── I don't know what to say... I just created a brand new Wikia account, added Wikimarks to the global.js, pasted your code above into the editor and saved. It all worked just fine. --  pecoes  19:44, December 01, 2012 (UTC) 

Working now, but now I have a problem with FloatingToC OriginalAuthorityContrib 19:57, December 1, 2012 (UTC) -- OriginalAuthorityContrib
FloatingToc is fine. But you included my diff script - which was never meant for public usage - and that was missing a semicolon at the end. --  pecoes  20:41, December 01, 2012 (UTC) 

WikiMarks (again)

I am EXTREMELY offended that I'm not in wikimarks credits :P. Just kidding. It's really good to see it out of beta and into active use... I'll probably add it to my global.js some time in the conceivable future. Two things though. I completely forgot how to wikimarks editor works because I haven't looked at the code recently, but wouldn't it be more convenient for the end-user to create a Special Page called Special:WikiMarks and use js to put and iFrame onto that? And using what you've learned from WikiMarks Shadow, have you found out how to sanitize < and > and / in shadow? Best, --Kangaroopowah (Talk) 00:51, November 30, 2012 (UTC)

Yes. Absolutely yes to the last question.
To the first question: I think I'll kill the wikimarks wiki and put all of the content on the preferences wiki and the editor on Special:Scripts.
And I'll add you to the credits! :) --  pecoes  01:00, November 30, 2012 (UTC) 

Article ratings

Hi, Pecoes.

I've been looking at mw:Extension:ArticleFeedback and was wondering if it was possible to make something similar with javascript. Wikia don't like the idea of installing the extension due to some issues with compatibility and something to do with database schema changes that they don't like. I guess that's code for we messed with MediaWiki too much but there's little I can do about it. Wikimedia just do stuff better, I guess.

I've come across a script that replicates this extension, but it's apparently extremely susceptible to abuse - a single line of javascript can vastly alter the ratings of a page with a function or ajax call and a while loop that never ends (so I'm told). The script seems to originate from uncyclopedia, but was removed some time ago. Do you think it's possible to make a script that is not so flawed (hypothetically)? Cåm 20:30, December 6, 2012 (UTC)

Wikia had a rating system for articles some time ago. I wasn't around back then, so I don't have any first hand experience with it. But the code is still around. There apparently are still the required database fields to store the votes and there are apparently still the API calls to access the DB. I haven't actually tested any of it, but I don't see a reason why it shouldn't work. I do not however see any safeguards against abbuse. I would have to look at the PHP source to determine if they are any... It's impossible to implement such safeguards with JavaScript. That much I can tell you for certain. --  pecoes  20:44, December 06, 2012 (UTC) 
If you don't mind an external solution... The Merlin Wiki uses this rating widget to great effect. Here's an example. Lunarity wrote the wrapper code to make it work on a wiki. --  pecoes  09:25, December 07, 2012 (UTC) 
That does look like it might be what we're looking for, Thanks :) Cåm 09:58, December 11, 2012 (UTC)
Except Lunarity doesn't like it and deleted it: User_talk:Lunarity#Star_Rating_System :(
Looks like you might have to write your own wrapper then... --  pecoes  10:18, December 11, 2012 (UTC) 
*cough*. I didn't actually write that code, Gwaine was the one who pasted that here on Dev; he didn't get that code doesn't need to be on Dev to be imported. If you want the code, it's here: w:c:merlin:MediaWiki:Common.js near the bottom, but it's slightly complicated to work with. I believe you're (Cam) familiar with JS so that shouldn't be a problem. Associated template, you'll need your own formula depending on the wiki though. Lunarity 11:08, December 11, 2012 (UTC)
How about teaming up? Your idea of repurposing the poll system sounds moderately easy to do. I'll make the UI. A simple UI though. Just stars. No green stars. No pink stars. No bombs. No dancing babies. No christmas tree ornaments. A few size selections maybe... and maybe an easy way to add custom graphics... --  pecoes  15:31, December 11, 2012 (UTC) 

Star Rating Script

I've started working on it: StarRatings. I've separated the UI modules from the core if you want to have a go at that. Lunarity 16:45, December 12, 2012 (UTC)

The first version of the UI is finished. I'm quite happy with the design already - both with the visual design and the interface design. It does not fit neatly into your code however. It should still be easy to use though. --  pecoes  05:59, December 13, 2012 (UTC) 

RE:Polish version of PurgeButton

I' m sorry, my mistake in PurgeButton/ :( There should be a pl: 'Odśwież'. VuhDyskusjaE-mail 16:09, December 9, 2012 (UTC)

No problem. "Purge" isn't exactly a standard term. That makes it difficult to translate. --  pecoes  16:27, December 09, 2012 (UTC) 

The wrong side

Hello Pecoes, I'm the founder and an active admin over by the Green Lantern: The Animated Series Wiki and I recent applied your script about FloatingTOC to the wiki. For some reason, the TOC on this is messed up. I was just wondering if this has something to do with the script or is it just a glitch on the wiki? Please respond and thank you. --rEGULAR gUY (☎)]] 19:38, December 27, 2012 (UTC)

(facepalm) Problem solved. Sorry for wasting your time.
Okay :) --  pecoes  20:38, December 27, 2012 (UTC) 


Shadow/code.js is wonderful, but I'd rather have the replace happen in Scope itself, and not in Shadow, if that's fine by you. --Kangaroopowah (Talk) 01:32, December 28, 2012 (UTC)

First of all: Shadow is not finished. There are some odd IE-related bugs that I didn't notice when I tested all of this on a blank page. And there are some features that I still have to add.
I'm sorry for reverting your edit to my code, but it just didn't work. That browser function you added does not return a value. And while I know that $.browser is deprecated I couldn't find anything about plans to actually remove it. The documentation merely says:
jQuery.browser may be moved to a plugin in a future release of jQuery
I'll do a longer write-up about the interface later, but I don't think it would be a good idea to make Shadow too dumb. If Shadow didn't have its own little tokenizer it would not be able to render < & and > correctly. So even at the most basic level you will find that the contents of textarea and shadow are not identical. I could export and re-import Shadow's token list but that would make things more difficult rather than easier I think. Instead I would suggest that Shadow offers a few functions that offer pseudo-offsets. By that I mean: You give Shadow the offsets where you've found something in the textarea and leave it up to Shadow to translate those into the offsets of the shadow object.
I'll give you an example. Let's say the textarea contains:
The shadow object would now contain:
But you would not have to know that to replace "Headline" with "Title". Just give shadow the start offset 5 and the end offset 15 and they will be translated into the shadow offsets.
Here's a very short overview of the entire interface:
  • selection — gets or sets the selected text
  • subscribe — function to call when the textarea's contents were changed
  • unsubscribe — unregister function
  • addClass — adds a CSS class to text between startOffset and endOffset
  • replace — replace text between startOffset and endOffset
The latter two functions are unfinished. --  pecoes  07:13, December 28, 2012 (UTC) 
If you check out the jquery blog; 1.9 beta one was just released and with it, many deprecated features of jquery are now gone, including jquery.browser. And I'm sorry about my code not working- idk what the error was. Also, why have shadow do the replacing and not scope itself. --Kangaroopowah (Talk) 20:52, December 28, 2012 (UTC)
Oh. I see. And so you copypasted the code for $.browser from the current jQuery but did so without reading it fully :D
Alright I'll shim $.browser :)
Why have Shadow do the replacing? Well, that's not something I'm entirely certain of to be honest. The interface is still a bit in flux. That's why I haven't written any proper documentation for it yet... --  pecoes  21:46, December 28, 2012 (UTC) 
Ok cool. And what about the next and prev functions. --Kangaroopowah (Talk) 23:23, December 28, 2012 (UTC)
I'm not going to implement those in the Shadow module. Shadow is meant to be a very low level module.
Bear with me, please! As you can see I'm working on Shadow. And I'll document the interface when its ready. --  pecoes  23:47, December 28, 2012 (UTC) 

──────────────────────────────────────────────────────────────────────────────────────────────────── What have you done to the Shadow page? Chrome thinks it's in French and asks me to translate it :P 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 00:51 UTC, Saturday, 29 December 2012

Chrome seems to think "Lorem ipsum" is French :) --  pecoes  01:05, December 29, 2012 (UTC) 
Lorem ipsum 1
Hmmmm, looks like you're right. Weird. Because thinks it's latin, not French, and mentions something about a "holy archive manager" 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 01:30 UTC, Saturday, 29 December 2012
It's not Latin either. Latin-ish maybe. But very ish :) --  pecoes  01:34, December 29, 2012 (UTC) 

Group specific scripts

Do you have any idea if pages like MediaWiki:Group-autoconfirmed.js, etc.. work on wikia or not? ~ UltimateSupreme 13:26, January 2, 2013 (UTC)

Oh! Interesting find! Well. The documentation says it should work, but I haven't actually tested it. It's possible - though not likely - that Wikia has disabled that feature. Let me know if you find out anything more, please! --  pecoes  13:37, January 02, 2013 (UTC) 
I know it from a pretty long time.
Anything specific you want me to find out? ~ UltimateSupreme 13:44, January 2, 2013 (UTC)
Not really. Just if user group scripts do or do not work :) --  pecoes  13:58, January 02, 2013 (UTC) 

They do work. ~ UltimateSupreme 05:34, January 9, 2013 (UTC)

Good to know! :) --  pecoes  05:39, January 09, 2013 (UTC) 

Hey, do you have any idea why <font>, <center>, <big>, etc.. are still working? ~ UltimateSupreme 08:57, January 15, 2013 (UTC)

Web browsers still support them. Their makers don't have much choice in the matter. There's too much unmaintained legacy HTML out there. But that's no excuse to still use those tags. They're completely out-dated. Have been for many years. --  pecoes  09:01, January 15, 2013 (UTC) 
Hey, do you know what I broke here?~ UltimateSupreme 07:21, January 18, 2013 (UTC)
Firefox says there's a parse error in line 42. Looks like you have one } too many. --  pecoes  07:33, January 18, 2013 (UTC) 
hows this?~ UltimateSupreme 07:47, January 18, 2013 (UTC)

──────────────────────────────────────────────────────────────────────────────────────────────────── It's not just my browser that has an error console. Yours has too. Please, find it and read the error message it gives you! There's not much point in me copypasting something to this page that should be right in front of your eyes. --  pecoes  08:14, January 18, 2013 (UTC) 

Thats right :)~ UltimateSupreme 08:30, January 18, 2013 (UTC)

View Source

Hey, can you change it so that this script's demo only runs on the View Source page (or perhaps a small handful of pages) rather than across the entire wiki? I think that would be more fitting as it would follow the established pattern that other scripts have been using.

Also, I was curious if the editor is really that slow to load for you? I didn't pull out a stopwatch or anything, but I can tell you that the (source mode) editor consistently takes only about 1 second for me to load in Chrome, if even that. 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 21:53 UTC, Tuesday, 15 January 2013

Per Math and also why don't you just use ?action=parse from the API? It's much better and it's pfficially supported. Furthermore, if you must use the exist parser, using a plain link without the piper results in [[<title>undefined]] --Kangaroopowah (Talk) 23:04, January 15, 2013 (UTC)
By the way, a bug I noticed is that closing tags are rendering as <p> instead of </p> (the / is missing) example.
Also (sorry to leave you so many messages, I know you're busy and still working on the script :) as a feature suggestion / idea, maybe you could have a "View Section Source" for just quickly viewing the source code of a single section of the page (sorta like section edit links)? 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 08:40 UTC, Thursday, 17 January 2013
I reduced the demo to the "View_Source" page as requested. Makes sense. That's the policy we've implicitly agreed on after all.
The speed with which the source editor loads is not really bad. I agree. It's the visual editor that's slow to load. That's what I find the most annoying. And after it's loaded I need to switch to the source editor which doesn't take half as long but I still find it annoying as well. (Yes, I know I can disable the visual editor, but I won't, because most Wikians don't either and I need to see what the majority sees).
But the loading speed is no longer the main selling point anyway. In its current incarnation View Source adds all kinds of links to the source code. That way you can directly move from a page to one of its templates e.g.
I'll also add links to the documentation at CC and where ever possible. That's half-done already. If you look at the source of View Source, you'll find that <source> already links, but {{#language:XX}} does not yet.
What I'm working on right now is syntax-highlighting for wikitext however... --  pecoes  09:20, January 17, 2013 (UTC) 
You can load the source editor by default if you want by appending &useeditor=source to the URL. I use a snippet in my user scripts for this since it makes editing code faster, while still keeping the visual editor for comments/forums where I tend to use it more often:
$(function ($) {
	"use strict";
	$('.wikia-menu-button a, .editsection a').each(function () {
		var $this = $(this),
			href = $this.attr('href');
		if (href.indexOf('action=edit') !== -1 && href.indexOf('useeditor=source') === -1) {
			$this.attr('href', (href + '&useeditor=source'));
Thanks for pointing out the links, I did not notice them before :P 20px_Rin_Tohsaka_Avatar.png Mathmagician ƒ(♫) 19:28 UTC, Thursday, 17 January 2013
What about ?action=parse from the API pecoes? --Kangaroopowah (Talk) 20:26, January 17, 2013 (UTC)
@Math: Thanks! I'll be sure to try that! :)
@Kangaroo: What about action=parse? How would that help? --  pecoes  20:32, January 17, 2013 (UTC) 

Migrating Scope to the new Shadow.

Can you help me migrate Scope to Shadow. I have a github repo where you can do pull requests and we can get it set up soon. Thanks! --Kangaroopowah (Talk) 04:40, January 23, 2013 (UTC)

I was going to contact you this week about that... As you may have noticed Shadow is not finished. I simply had to admit to myself that the whole project was a little over-ambitious.
When we started this, the message wall and the article comments seemed like much less of a deal than they do now. Add now Wikia also added the new forums... So when I started to work on it again, I immediately tried to extend the concept to the other editors. The main problem with those, is that they are - unlike the source editor - resizable. The whole concept of the Shadow was already very delicate and prone to all kinds of glitches at this point. Adding resizability made it worse. Adding the option to not only change the background-color but also the text-color made things even worser. Simulating a cursor across browsers is just very very difficult. And don't even get me started about mouse events...
The whole thing turned into a hack layered upon a hack layered upon a hack... So I grudgingly decided not to use Shadow for my own version of Search+Replace.
If you want I can give you a scaled-down version of Shadow though. It will not be resizable, not support text-colors and not support mouse events. It's not much, but it's the best I can offer, I'm afraid. --  pecoes  06:10, January 23, 2013 (UTC) 
Will it be able to do everything Shadow can currently do (the one that's currently in Scope)? --Kangaroopowah (Talk) 18:44, January 23, 2013 (UTC)
It will be able to give text in a static non-resizable textarea a background-color across all major browsers. --  pecoes  19:30, January 23, 2013 (UTC) 
Will it fix the bugs with < > and / ? --Kangaroopowah (Talk) 18:31, January 26, 2013 (UTC)
Yes, of course. --  pecoes  18:37, January 26, 2013 (UTC) 


I saw you recommending use of MediaWiki:Handheld.css somewhere before, but it doesn't seem to actually work. There are a mere 9 wikis that have even edited the page, with most of them being virtually blank. Is there some magic trick to making the styles work? cqm 13:16, 31 Jan 2013 (UTC)

Sorry, that was a false lead. The MediaWiki software uses MediaWiki:Handheld.css for its mobile skin, but the wikiamobile skin does not.
As far as I know there's no MediaWiki page for the wikiamobile CSS at all. The only thing that seems to work is to piggyback your CSS on one of the messages. MediaWiki:Wikiamobile-menu seems like a good choice, but I haven't tested it... Then use a verbatim tag to include your CSS. Let me know if it works, please! (Or if I can help make it work :) --  pecoes  22:34, January 31, 2013 (UTC) 
I remember a user blog mentioning something similar, I'll see if I can dig it out. I asked staff why the default message for the page suggested the skin could be styled, when it had no effect. I'm still waiting for a message back after talking to Wikia's developers, so perhaps we might be able to in the future ;) Easiest method would be just to import the stylesheet through a message, unless you know if it's a bad idea? cqm 01:29, 4 Feb 2013 (UTC)
That's not a bad idea at all. Verbatim'ing a link- or style-tag in a message is the only thing that works. It's a dirty hack of course, but I see no alternative whatsoever.
That's by design, I suppose. Wikia seems to have decided against enabling custom scripts and stylesheets for the mobile skin - both on a site-level and on a user-level. That's not in itself a bad idea. Disabling all that extra stuff guarantees that the mobile version is lean and small and reasonably error-free. That's a good thing. But it also leads to a one-size-fits-all approach that's several steps up from the oasis skin. That's not so good.
Fortunately there's this tiny little loop hole with the verbatim tag. It's just big enough that you can use it to smuggle in any JS and CSS you want, while being small enough that only people who really know what they're doing can use it :) --  pecoes  04:10, February 04, 2013 (UTC) 
I've been mulling over how to import the CSS. CSS 2.1 (and I assume CSS3) requires the imports to be at the top of the page, usually within the head tags. Since this isn't an option when picking mediawiki messages, would it be better to use
<script type="text/javascript">
cqm 10:33, 6 Feb 2013 (UTC)
You should use a link tag. AFAIK it's perfectly legal in HTML5 to use those not only in the head, but also in the body. Wikia does it too btw.
importStylesheet wouldn't work anyway. That function is part of the MediaWiki JS and that does not seem to be loaded on mobile pages. And even if it were, it would be loaded after the JS in the verbatim tag. --  pecoes  11:49, February 06, 2013 (UTC) 

W3C doesn't expressly say don't do it, rather that they should be used in head tags. But I'm running out of options of how to do it, so I tried. And failed. runescape:MediaWiki:Handheld.css is imported into the page using MediaWiki:Wikiamobile-menu (I made absolutely sure it was always there on the page load). But it's not seeming to take effect. It should hide some stuff used for auto-tallying transcluded from runescape:RS:UOTM onto runescape:RA:AD and some parameters used in runescape:Template:Forumheader which is in use on runescape:Forum:Join Wikia Alliance (and every other page in the forum namespace). Neither seem to have the styles implemented, although the link tags are visible on element inspection. I've tried link and script tags, with and without verbatim tags. And I'm at a loss as to where to go from here. cqm 23:48, 7 Feb 2013 (UTC)

Hm. It seems the verbatim tag doesn't work in MediaWiki:wikiamobile-menu. Messages always confuse me. Some seem to be parsed like regular wiki pages while some are included as is. This seems to be one of the latter ones. But that's even better. That means you don't even need the verbatim tag! Just add:
<div style="display: none;">
<link rel="stylesheet" type="text/css" 
href="/load.php?mode=articles&only=styles&articles=MediaWiki:Handheld.css" />

directly to w:c:runescape:MediaWiki:wikiamobile-menu and it should work. You will have to remove all non-CSS code from w:c:runescape:MediaWiki:Handheld.css first though! It must be a pure CSS file. Best to remove the comments as well.
BTW: You should have used a style tag instead of a script tag anyway. Not that it matters right now...
 pecoes  01:36, February 08, 2013 (UTC) 
What do you know, it works! With regards to comments, would it be fine just to add a small note pointing to the talk page for documentation? cqm 01:41, 8 Feb 2013 (UTC)
CSS-style comments should be absolutely fine. I was only suggesting to remove the comments because they looked like jetsam and it's always a good idea to keep mobile pages as small possible ;) --  pecoes  01:51, February 08, 2013 (UTC) 

Fixed Shadow

Is there any ETA for the fixed Shadow? --Kangaroopowah (Talk) 04:29, February 12, 2013 (UTC)

Really good news for Shadow/FindReplace

I got Shadow working using your framework. 99% of the kinks are done, including the < > and & one and there's only one common problem across all browsers but it's really really minor and I'll get to it some time in the future. Thanks so much for your help in the project, and if you want to stick around, I'm all game =). --Kangaroopowah (Talk) 06:20, March 4, 2013 (UTC)


I've tried to make it work with the previous way, I couldn't seem to do it so I changed it to the w:c: way and it worked. just thought I would give you this info.

Userpage (Talk)

What did you try? Your global.js is empty. --  pecoes  23:18, March 11, 2013 (UTC) 

Wikimarks 'bug'

It came up in a central thread that some wikis have customised the wiki nav to a point where the dropdowns for wikimarks have become unusable, in particular w:c:tardis. I was wondering if you'd want to add a wikimarks specific fix for this. Something like:

#wikimarks .subnav.subnav-3 {
    margin-top: 0 !important; /* [[w:c:xiaolinpedia]] use !important for some reason */

I also left a reply with the bug I noticed with submenus and ?redirect=no on the wikimarks talk page a while back. Not sure if you spotted it. cqm 23:59, 13 Apr 2013 (UTC)

No, sorry, I must have missed your earlier post. But you're right. Some wikis - Tardis in particular - don't play well with Wikimarks. Are you aware of any other wikis - besides w:c:tardis and w:c:xiaolinpedia - that are so far removed from the standard? --  pecoes  00:55, April 14, 2013 (UTC) 
Lego universe stories is another, but I've no idea what's causing it to break. None of the links below the logo show up at all for me. Can't see anything in inspect element that might be causing it either. cqm 23:54, 14 Apr 2013 (UTC)
They seem to do some really weird things with transparency, transitions and layers... This solves it partially:
#wikimarks.marked * {
    opacity: 1 !important;
    z-index: 1000 !important;

It looks a bit like the work of someone who's less experienced than he knows :( --  pecoes  01:17, April 15, 2013 (UTC) 
Well. At any rate... I never wanted to do this, but it's probably time to swallow the bitter pill and start writing a few CSS rules that are specific to certain wikis. The one-ruleset-fits-all approach clearly has its limitations. *sigh* --  pecoes  01:19, April 15, 2013 (UTC) 
It's times like this you think Wikia were on to something with their one-skin-for-all-that-you-aren't-allowed-to-mess-with-too-much. With a little bit of Lotr thrown in for good measure. I didn't know you could match certain wikis with CSS though. Unless you're loading different stylesheets using the result of wgServer? cqm 17:20, 15 Apr 2013 (UTC)
Nice screencap :D Yes, reading out wgServer and adding CSS rules with JS is what I meant ;)
I'll add a section to the Wikimarks page later today, where everybody can add wikis that are not compatible. And then I guess I have to write special rules for each and every one of them. Let's hope the list stays short :( --  pecoes  17:28, April 15, 2013 (UTC) 


I wanted to state my appreciation towards your initiative on pointing out that bug for us and the fix needed to work around it. Is the Fallout franchise an interest for you? Merely asking because we're hurting a bit on the technical side of editing, and looking through your contributions around Wikia, you seem to be of sound expertise within that realm. GarouxBloodline

I'm playing Fallout 3 for the first time right now. That's how I came across your wiki. I'll probably be back a few times during my playthrough. Feel free to milk that! A little :) --  pecoes  18:33, April 29, 2013 (UTC) 
Oh, you. ;D Here's hoping that you enjoy the series, then! I know that Fallout has turned into a labor of love for myself personally. GarouxBloodline
Sorry that there's been a bit of a delay. I've been a little on/off these days due to work. Anyways, I'll be talking to our tech jockey tomorrow to see if there's a proper way to take advantage of your expertise. I appreciate you offering to help out and all that. :) Hopefully I wasn't being too bold in my original message to you. GarouxBloodline
On a side-note, I'm enjoying your avi. It brings back fond memories of Calvin & Hobbes. GarouxBloodline

Countdown timer issue

I'm having some trouble getting some of the options to work for the countdown timer. See this page on Memory Alpha for where I'm using the timers. Both "stop" and "remove" don't work if the date is changed to one in the past, the timer will just count up. - Archduk3 20:10, May 2, 2013 (UTC)

Code only for Firefox

Hi Pecoes. I have a question: Is posible that a javascript code only actsin Mozilla Firefox, but in browsers don't? -- José Dedede Mi discusión 23:35, May 27, 2013 (UTC)
That I want to put a background, in Opera, Explorer, Chrome it is nice, but in Firefox it looks small, is posible to put another background to it? -- José Dedede Mi discusión 00:22, May 28, 2013 (UTC)
Here is where I have the backgrounds and here, where I have the javascript codes to change the backgrounds every 6 minutes. -- José Dedede Mi discusión 22:18, May 28, 2013 (UTC)
Can you tell to me a prefix to make a background bigger in Firefox? -- José Dedede Mi discusión 23:16, May 29, 2013 (UTC)
Thanks!!! -- José Dedede Mi discusión 01:50 18 June 2013 (UTC)

Ajax RC code review

Can you review this code review Portal:Code_Review:AjaxRC_2. Thanks, --Kangaroopowah (Talk) 02:41, June 1, 2013 (UTC)

Floating ToC help

Hi, Pecoes!

I was wondering if you give us a little help over at WoWWiki with the Floating ToC. It's working perfectly on the majority of our pages, but seems to break on pages like this (should always be to the left, not in the center).

I suspect it has to with the Coordinates template we've got, but can't figure out how the two are butting heads.

Any help would be greatly appreciated!

Best regards, Raylan13@fandom (talk) 23:29, June 17, 2013 (UTC)

I'm not sure what you mean. It does appear to be on the left - where it should be - shouldn't it? --  pecoes  01:09, June 18, 2013 (UTC) 
That is because I fixed it! Icecreamcaekbot talkcontrib 01:35, June 18, 2013 (UTC)
I'm hoping the js will kick in ;) The linked page had a "band-aid" fix put in - I reverted that, so you can see what it's doing. If you want to take a gander at the fix Icecreamcaekbot provided on the MediaWiki page, a second set of eyes would never hurt. Raylan13@fandom (talk) 02:28, June 18, 2013 (UTC)
Yup. {{coords}} is the culprit. I haven't looked at it yet, but there's something very wrong with it. Normally the mediaWiki software would wrap the paragraph in a <p></p> tag, but if the paragraph contains a call of the coords template, the <p></p> tag somehow disappears. The mediaWiki software expects block elements at the basic level of #mw-content-text - not loose text and inline tags. As a consequence it doesn't know where to insert the TOC and... inserts it somewhere – which may or may not be a good place. In this case it isn't. FloatingToc makes this error obvious, but it is not the cause.
Icecreamcaekbot's hack works, but it is just that: a hack – not a fix. If you want to fix it, you need to fix {{coords}}. --  pecoes  03:43, June 18, 2013 (UTC) 

Thanks for taking a look at it and confirming things :) I'm going to have to get one of our more experienced guys to take a look at that template to figure out what in the world is going on. Raylan13@fandom (talk) 03:58, June 18, 2013 (UTC)

The problem with {{coords}} is that it inserts <div></div> tags into the middle of what should be a paragraph. A relatively easy solution would probably be to replace the divs with spans and set their display property to block when the map is shown. --  pecoes  04:30, June 18, 2013 (UTC) 
Doing that breaks the template, so is there any other way? Icecreamcaekbot talkcontrib 04:44, June 18, 2013 (UTC)
I have no idea what happened, but now the template appears to be broken - even so it was reverted to its last working state. Did you change anything else, Icecreamcaekbot?
In any case: I could probably fix the template, but only by rewriting it from scratch. I will try that if you like but I'm not familiar with your wiki's template architecture, so there might be an unintended consequence or two...
On second thought I'd say though, that Icecreamcaekbot's hack is not so bad after all. At least it's simple. But it needs clear documentation that explains why it's there and what bug in Template:Coords it attempts to alleviate. --  pecoes  10:15, June 18, 2013 (UTC) 
I'll get right on that. Icecreamcaekbot talkcontrib 16:06, June 18, 2013 (UTC)

──────────────────────────────────────────────────────────────────────────────────────────────────── Thanks again guys - I really appreciate you two taking the time to look into this. WoWWiki tends to have fairly dense js/css, so unintended consequences are almost a given at times. Provided the js hack functions after the MediaWiki page is updated, I'd prefer to go that route for now, just for the sake of simplicity. In all honesty, the majority of the coding needs to be gone through over there, and that's a monumental task that could be best done in small increments. Raylan13@fandom (talk) 16:12, June 18, 2013 (UTC)

Well. In case you guys are interested in a rewrite, let me know! Because... um... I kind of already did one. To be honest: I was bored. From what I can tell I'd say it works well, but it's not as well-tested as what you got right now, of course. --  pecoes  16:33, June 18, 2013 (UTC) 
Ice is still working through the js page, so some things are inoperable atm - but if you've got a rewrite, I'm more than happy to plug it in. If you want, I'd suggest putting it into a new template page so the administrators can take a look at it and weigh in; once our js is back up and running and if things look good, we'll do some copypasta over the old code. Raylan13@fandom (talk) 16:48, June 18, 2013 (UTC)

──────────────────────────────────────────────────────────────────────────────────────────────────── My redesigned template is here. The JS code is here. And my test page is here. To see the test page in action, open your browser's console and run this:

--  pecoes  17:06, June 18, 2013 (UTC) 
Wow! Looks great - the only thing I would request, if you're able, is to remove the ability for the coordinates to link to a page. I popped in a full page on your test page, and you can see that the coordinates are "red-linked"; it's due to naming conventions and whatnot (yet another template), but there's no need for it to link out anyway, as it just needs to show the map and pinpoint. Raylan13@fandom (talk) 17:15, June 18, 2013 (UTC)
If we're talking redesign, I'd throw the coordinates out altogether and replace them with a map-icon. --  pecoes  17:23, June 18, 2013 (UTC) 
The coordinates are for in-game tracking. There's a variety of addons players use to figure out where to go, and they're all coordinate-based. Raylan13@fandom (talk) 17:26, June 18, 2013 (UTC)
I see. Better now? --  pecoes  17:44, June 18, 2013 (UTC) 
Perfect. Phenomenal. I really can't thank you enough! Do you mind if I put you down in my contacts in case there's anything else I might need help with? There are some improvements I've been wanting to make on the site. Raylan13@fandom (talk) 17:49, June 18, 2013 (UTC)
Sure. Go ahead! But I can't promise to be bored again ;) --  pecoes  18:30, June 18, 2013 (UTC) 


Thanks ;) Understood completely! The only thing I can think of right now anyway is a way for our maps (like here) to preserve their pinpoints and expand when clicked on, rather than jumping to the image page. So, if you're ever bored - even months from now - poking that with a stick would be welcome. Raylan13@fandom (talk) 18:52, June 18, 2013 (UTC)

A few questions to gauge the scope of the problem:
  • Can I assume there's a one-to-one relationship of Template:Zone_Map uses and maps? What I mean is:
    • Does this template get used more often than once for the same map?
    • And if so does every map have a filled out zone map somewhere?
  • And on a related note: Do all maps carry the word "map" in the name?
    • And if so are there any other files that may have the word "map" in their title?
  • Does this template - or any other map template - use Semantic Maps?
 pecoes  19:57, June 18, 2013 (UTC) 
I'll try to answer as best I can -
  • Question 1
    • The template can be used more than once for the same map to display different points of interest.
    • If you mean a map that has all the pinpoints already attached, none of them do. All of the maps are here.
  • Question 2
    • All maps carry the word map in them, but there are other files with the word map in them. As you can tell from the master list of maps, though, those used for the templates have very specific naming conventions ("WorldMap" and "InstanceMap" only)
    • No templates to my knowledge use Semantic Maps.
Raylan13@fandom (talk) 20:18, June 18, 2013 (UTC)
Wait, so theses 352 maps are all of the maps for which there are coordinates and map markers, right? But there are multiple templates that are used in different pages to assign these coordinates and some of these templates may be used more than once per map?
The firt part I like a lot. To have all maps in a single category makes finding them easy. But how would I go about filtering all the coordinates out of your wiki? Any ideas? Is there at least a list of all templates that are used to assign coordinates? --  pecoes  20:32, June 18, 2013 (UTC) 
I have no doubt I'm misunderstanding and potentially giving an incorrect response pertaining to the templates. For the purpose of adding notes/pinpoints, this template is used. It is used in conjunction with the zone map or instance map templates. Hopefully this helps? Raylan13@fandom (talk) 20:40, June 18, 2013 (UTC)
Ideally the relationship should be reversed. The marker data should be attached to the map itself - either via Semantic Maps or by simply storing it in the text content of the File:XXX.jpg pages. The templates would then do nothing more than specify which marker data to show - all trainers e.g. or the nth quest-giver. Something like that... --  pecoes  21:13, June 18, 2013 (UTC) 
Well, if you're game, we could try from scratch. If you could lay the groundwork so it functions with one map, then I could go through all the other maps in batches and duplicate the process. Once I've done all that, then I can delete the outdated group of templates. (I know this is probably pretty tedious, so feel free to decline ;) )
It would probably be easiest to start with the less-detailed map (WorldMap-Orgrimmar1.jpg) on this page. There's two versions on the page for a different set of points that can be combined. Raylan13@fandom (talk) 21:25, June 18, 2013 (UTC)

Quick question

function (module, mw, $, window) {

Out of curiosity, why do you include global objects as parameters in self-called functions? Wouldn't they be accessible through closure anyway? Thanks! --Foodbandlt 02:15, June 18, 2013 (UTC)

I want to avoid globals. Globals are evil. I'm using strict mode to make accidentally creating globals impossible and I've set up jshint to warn me of any and all globals in a non-global context. And since some globals are unavoidable, I want them prominently announced in the very first line --  pecoes  03:54, June 18, 2013 (UTC) 


Hi, may I ask where you learned to code JavaScript and jQuery Original Authority (talk) 19:39, July 21, 2013 (UTC)

I learned JavaScript the old-fashioned way: By reading a book :) This one to be precise: JavaScript: The Definitive Guide (amazon). That book had a few hundred pages less back then, though. Now it clocks in at over 1100 pages. That's a bit much. Especially for a beginner. Not sure if I can still recommend it as whole-heartedly as I did back in the day... You might want to take a look at this one instead: Eloquent JavaScript: A Modern Introduction to Programming (amazon). I haven't read it but I've heard a lot of good things about it.
jQuery is another story. I never took the time to sit down and read a book about it. I just learned it as I went along. In hindsight that was probably a mistake. I would have saved a lot of time by learning it all at once. I have no book recommendation for this one. Unfortunately. --  pecoes  20:08, July 21, 2013 (UTC) 
Thanks for your reply, but I wouldn't feel comfortable buying a book, to learn such thing, they have on the internet, I'm just going to look around, I'm currently using codecademy, but it doesn't define things in quite as much definition as I'd of liked, plus I don't think I'll be using Math.random() any time soon. But I am trying to code a ask box, that provides answers about the wiki, using prompt("), console.log(") and alert(").
jQuery, on the other hand, I don't think would be easy to learn as I go along, or by trial and error, it's true that users like TK, live without jQuery, but in order to edit user created scripts without confusion, I'd have to learn and use jQuery. One last thing, it's been bugging me can you please tell me what $ means (jQuery terms),I've been thinking it's the "return" function. By the way you have a hidden category on your talk page, a broken file link. Original Authority (talk) 20:37, July 21, 2013 (UTC)
$ is a great many things to jQuery. In fact it's pretty accurate to say that the entirety of jQuery is attached to the variable $. You will figure that out soon enough ;)
I'm not going to hunt for that broken image link now... Maybe later. --  pecoes  21:02, July 21, 2013 (UTC) 
Ok, one last question, I've started my JavaScript tutorials, but was woundering, should I stop and skip to jQuery? Or would this effect me in the future? Original Authority (talk) 21:20, July 21, 2013 (UTC)
Please stop studying jQuery until you have a solid understanding of JavaScript! --  pecoes  21:27, July 21, 2013 (UTC) 
I wasn't studying jQuery Original Authority (talk) 21:30, July 21, 2013 (UTC)
As someone who started out learning JavaScript with jQuery, I disagree that the pure language itself has to/should be learned first. Assuming some knowledge of HTML and CSS, jQuery is relatively straightforward when you start out manipulating the DOM. It take the selectors you already know from CSS, and the attributes you know from HTML and builds on it from there. I won't go as far as to suggest that you don't need to learn JavaScript after learning a bit of jQuery, but it's a nice platform to start from and if it interests you enough, you can then move onto the native language. cqm 09:43, 22 Jul 2013 (UTC)
I'm one of the old guys - someone who learned JavaScript before Web 2.0. In those olden days it was possible to learn HTML, CSS, JS, etc. separately and that's how most people - including me - did it. I realize that's no longer viable. It's all so intertwined that you have to start from several ends at once. But still. If you only know the basics of JavaScript you will never do more than scratch the surface of jQuery.
You need to understand how type conversion works in JS. You need to understand what closures are and why functions are first-order data structures. You need to understand when and where the this keyword refers to what and why. You need to understand what asynchronous execution is and how to use it to your advantage. You need to understand what prototypal inheritance is and what makes it so very different from classic inheritance. Etc.
Go ahead and take a look John Resig's blog or go to youtube and watch one of his lectures. See how much you can understand without the basics of JS. Sure, it's easy to say: But he plays in a different league. Because he does. No doubt about it. But if you cannot learn about jQuery from the creator of jQuery then you're missing out. Big time.
But no matter how far you want to go: You don't want to be that guy who knows just enough to be dangerous. Well. Or at least I don't want to :P
Just my 2 cents. --  pecoes  11:36, July 22, 2013 (UTC) 
Well, Sactage, used the book you used, but an updated one, JavaScript 5, or something, so I'm going to check that out. Original Authority (talk) 11:49, July 22, 2013 (UTC)


Hey. Having seen that you marked SpoilerAlert as "script will have to be rewritten to be useful again," I conducted a rewrite of it. This version ( ) works by blacking out elements with the spoiler class by default, seeing as many large wikis like Wookieepedia use spoiler templates to mark up particular sections designated as spoilers.

The code is working, and I think we could finalize the appearance and customizations together. Please let me know what you think. :) TK-999 (talk) 09:02, July 22, 2013 (UTC)

The code looks fine, but I would really need to see it at work somewhere. Do you have a test page?
Oh, and er: An immediately invoked function expression is not a singleton :D --  pecoes  11:43, July 22, 2013 (UTC) 

Need a Little Help :3

Hey Pecoes! I was going over the "spoiler alert" coding, and i thought i could do something interesting with it on my profile back at DragonVale wiki. So i copied the code over <-- there and i tried to implement it over <-- there, but it is not really working. Could you please tell me what i did incorrectly? Thanks in advance, {{SUBST:TheWizardz/Sig}} 14:22, July 27, 2013 (UTC)

You have to wait at least ten minutes and usually also do a hard reload before the changes take effect. Did you do that? --  pecoes  15:02, July 27, 2013 (UTC) 
I did that, but after a little searching i noticed that an admin is also using that code, but has it set up to the wiki's mediawiki.js so my own script does not go through, is there a way i can fix that?


How's life? And how's wikimarks doing? Have you integrated it with preferences? --Kangaroopowah (Talk) 18:11, August 4, 2013 (UTC)

Life's not so great. I spent the better part of the last months taking care of my sick mother. And lost her.
The small upside is that I have time to spend here again. And I most definitely need a distraction too. Programming is really one of the best distractions I know of. That I can say with absolute certainty now.
To get back into the game I created this Map Lightbox for the WoWwiki. Just click on one of the maps to get the basic idea.
As for my work here at dev... There's much that I left unfinished when I ran out of spare time to spend here. For now I'll continue with the syntax highlighter. I've made some good progress in the last week.
The Preferences idea in its current form is dead, I'm afraid. I've come up with a bunch of solutions I'm rather proud of and learned lots of cool stuff along the way, but ultimately the plan to do this without a server component was doomed from the start. I'll need to write a PHP extension - which will be tricky - and get it accepted by Wikia - which may turn out to be even trickier. A pure JS solution is a stupid idea at any rate. So for the moment I've put the Preferences idea on ice.
The Wikimarks stuff could be improved as well, to be sure. But to make some real progress, I'd have to get the Preferences off the ground first.
 pecoes  18:40, August 04, 2013 (UTC) 
I'm really sorry about your mother, (and I'm sorry if this sounds insensitive, and you have every right to think that it is) but I'm also happy that you're moving forward. I actually did see Map Lightbox earlier (one tends to notice when a 100+ comment thread involving a Wikia Staff member pops up on Wiki Activity) and it's really cool! How did you get the tooltips to work across multiple maps? I know how one would do it for just one image, but how did you make it work over all the maps on WoWWiki? As for preferences, all you have to do is wait for mw.options in mediawiki 1.20 ;). What was broken with the old preferences though? Meanwhile, I've been working on Igloo over at Wikipedia (see Wikipedia:Igloo). My tale's a bit different than yours in that the old version of igloo died because it relied too much on a server that ended up failing and with the new igloo I want to make it as server-independent as possible. I've been working on it for around two months now and I intend on opening it up for beta-testing today. I'll see you around dev then. Best, --Kangaroopowah (Talk) 22:39, August 5, 2013 (UTC)


Hi, do you think, when you have time, you could whip up a bit of code that places a button on the monobook toolbar where the edit button and tak is, that links to the users contributions, of the profile you're viewing. Feel free to decline — FarewellEleven at Wikia Developers Wiki Wiki 21:49, August 12, 2013 (UTC)

While I'm not Pecoes, here's a script:
( function ( mw ) {
    'use strict';
    if ( mw.config.get( 'wgNamespaceNumber' ) === 2 ) {
        var link = document.createElement( 'a' );
        link.accesskey = 's';
        link.title = 'View the user\'s contributions [alt-shift-s]';
        link.href = '/wiki/Special:Contributions/' + document.getElementById( 'firstHeading' ).textContent.split( ':' )[1].split( '/' )[0];
        link.setAttribute( 'primary', '1' );
        link.textContent = 'Contributions';
        var contribs = document.createElement( 'li' );
        contribs.appendChild( link ); = 'ca-contributions';
        document.getElementById( 'p-cactions' ).getElementsByTagName( 'ul' )[0].insertBefore( contribs, document.getElementById( 'ca-edit' ) );
}( mediaWiki ) );

Also, place the following CSS into MediaWiki:Monobook.css:

li#ca-contributions {
        margin-right: 1.6em;
#p-cactions li#ca-talk {
        margin-right: 0;

TK-999 (talk) 22:11, August 12, 2013 (UTC)

Thanks TK!— FarewellEleven at Wikia Developers Wiki Wiki 22:21, August 12, 2013 (UTC)

Can you help me?

Do you know a code that can make timers have Years and Months added to it?

HurricaneTeen6900 (talk) 13:09, August 13, 2013 (UTC)HurricaneTeen6900

.getYear () .getMonth () — FarewellEleven at Wikia Developers Wiki Wiki 13:13, August 13, 2013 (UTC)


HI, could you give me the code to resize a element, I found something on a website, but I'm not sure it's right — FarewellEleven at Wikia Developers Wiki Wiki 07:21, September 10, 2013 (UTC)

Wikimarks on Memory Aplha

I'm seeing a bug with Wikimarks on Memory-alpha. The throbber denoting the wikimarks loading appears, but nothing else. There appears to be some sort of debugging message as well:

Wikimarks Server: Bad event: MessageEvent
bubbles: false
cancelBubble: false
cancelable: false
clipboardData: undefined
currentTarget: Window
data: "{"user":"Cqm","type":"restyle"}"
defaultPrevented: false
eventPhase: 0
lastEventId: ""
origin: ""
ports: Array[0]
returnValue: true
source: Window
srcElement: Window
target: Window
timeStamp: 1380716518239
type: "message"

Hopefully this helps, cqm 12:28, 2 Oct 2013 (UTC)

FloatingToc not working on my wiki

The floating table of contents does not work on my wiki, the w:c:lordofultima Lord of Ultima Wiki. It opens up, then I drag the box open and it just says undefined.

We had the same problem on WoWWiki recently. I'd talk to Celess22 on our site to see if he'll explain our workaround. Raylan13@fandom (talk) 18:05, November 25, 2013 (UTC)


Hello Pecoes, I really liked the JavaScript of SexyUserPage, look great but they can add JavaScript, would be great JavaScript to o your userpage..

Atte: {{SUBST:User:EnderfansZ/Firma}} 06:09, May 27, 2014 (UTC)


Hi. I'm wondering if SearchSuggest is for personal use, wiki-wide use, or both? The infobox states both use are fine, but later on it is said to add it to Special:MyPage/global.js (which is personal use). Please reply as soon as you can ^^!- Violet (っ◕‿◕)っ♥ Message Me! (っ◕‿◕)っ♥ Read my blog posts!(っ◕‿◕)っ♥ Visit Mia and Me Wiki! (っ◕‿◕)っ♥ Visit Entertainment Choice Wiki! 05:27, October 11, 2014 (UTC)


Were you going to complete this?

(to leave response tell me on my Steven Universe Wiki message wall ).

Superluigi6 (talk) 17:46, March 22, 2015 (UTC)

Pecoes has been gone from Wikia for some time now (unless he's reading this and proves me wrong ;)). As for the script, I believe the API it uses was flawed in some way that led to some concerns about abuse, hence it never went past alpha development. cqm 19:43, 22 Mar 2015 (UTC)

default FloatingToc

Hi! Is it possible to have FloatingToc be the default when the page loads? Thanks in advance. —Scott (message me) 01:20, July 29, 2017 (UTC)


I have a question or would like to ask for help on this — just curious before I install your InfoWidgets code into my Wiki. Will it allow me to select a category of posts and share it as a Feed File similar to , for example? My posts on there are from my User Blog on my Wiki.

I’m trying to show my User Blog posts from my Category but the only way I could do it was using action history, which shows the edits made to the category rather than a list of posts.

Someone suggested that I look into something called DPLforum but that doesn’t give me what I’m asking for. From what I read on the InfoWidgets article page, it sounds like your tool does that and I just want to know if it does?

Warren Woodhouse | Blog | Follow Me | Talk | Email Me | Videos | Photos | Music | Artwork | Created Content | Twitter | Facebook | Snapchat 13:57, January 3, 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+