Wikipedia talk:User scripts/Archive 4

My Scripts have stopped working
I was assessing articles using Outriggr's script when my scripts suddenly stopped working. Here is my monobook.js file: http://en.wikipedia.org/wiki/User:Oneworld25/monobook.js Can anyone help me? Oneworld25 19:57, 20 June 2007 (UTC)
 * Try bypassing your cache. If that doesn't work, try removing popups and bypassing your cache again; that should help to narrow down the problem. --ais523 09:32, 2 July 2007 (UTC)

To add a link
Is there a script with which I can add a link and/or links to the 'navigation' or 'interaction' boxes? ~ thesublime514 • talk  • sign  19:00, July 2, 2007 (UTC)


 * Take a look at WikiProject User scripts/Guide, sections "Structure" and "portlets". Or simply use


 * see addPortletLink in wikibits.js for full info ∴ Alex Smotrov 20:03, 2 July 2007 (UTC)
 * Thanks ~ thesublime514 • talk  • sign  20:11, July 2, 2007 (UTC)

Unwatch
It seems the "unwatch" script stopped working (at least for me). I think the Watchlist special page itself has been upgraded a bit. Can anyone fix it? Thanks, — thesublime514 • talk  • 00:46, July 11, 2007 (UTC)
 * The action URL for unwatching indeed changed. I'm not sure which URL could be used now, so I can't fix Unwatch. However I have a better (imho) script that works: wlUnwatch (will add it to the list later), please try it out ∴ Alex Smotrov 16:50, 11 July 2007 (UTC)
 * Awesome, thanks — thesublime514 • talk  • 18:16, July 11, 2007 (UTC)

Removing "Dependencies" column
I'm planning to do a little cleanup on the "Scripts" page, and I would like to remove "Dependencies" column. It's mostly empty or outdated (e.g. for wikEd and CloseAFD.js) or just says "see doc". If you have any objections - please share them now ∴ Alex Smotrov
 * Excellent. That column was getting rather pointless. Shinobu 12:17, 25 July 2007 (UTC)

Regex replacing tool
I have given Gerbrant.edit.regexReplace (documentation) a bit of an overhaul. Most changes are cosmetic, but nevertheless should improve the workflow a bit. I hope I didn't introduce new bugs. Shinobu 12:17, 25 July 2007 (UTC)

Special:Contributions Script
Is there a script that allows me to see a user's S:C page? Possibly like a tab at the top of the page that would take me directly to that user's S:C page? Thanks. Mi l k T a c <font color="#424242">o 18:25, 10 October 2007 (UTC)
 * There's a link to contributions in the toolbox on the left of the screen when viewing a user's userpage, even without installing a script. If that's in the wrong place for you, it would be easy enough to write a script to place it in a tab as well; see our scripts request page. --ais523 18:30, 10 October 2007 (UTC)


 * Wow. All this time on WikiPedia and I've never noticed that link!  Thanks.  <font color="#CCCCCC">Mi <font color="#A9A9A9">l <font color="#969696">k <font color="#808080">T <font color="#6E6E6E">a <font color="#595959">c <font color="#424242">o  18:37, 10 October 2007 (UTC)

Go and Search buttons in Chick skin
Please excuse the cross posting -- not sure where this belongs.

The Go and Search buttons on the Chick skin spill over into the edit box (in which I am currently typing).

Could they be moved beneath the Search box (directly above the Toolbox label).

Robert Greer (talk) 14:01, 11 December 2007 (UTC)

Java Script
Is there a java script which allows you to see which user has been on your userpage and subpages. SKYNET X7000 (talk) 12:34, 16 December 2007 (UTC)


 * Respond on my talk page if that's possible. SKYNET X7000 (talk) 17:08, 16 December 2007 (UTC)

Recommendation
Which monobook would recommend for a firefox user? --Nemissimo 09:52, 18 September 2007 (UTC)
 * It's not like there are only a few combinations of scripts you're allowed; you can have as many or few of the scripts here that you like. My recommendation is that you look through our scripts list and install all the scripts that you think you will find useful. (Which ones are useful for you will depend on your editing pattern.) --ais523 16:28, 18 September 2007 (UTC)

<:: If you want a whole bunch of scripts at once, try installing User:Pyrospirit/scriptpackage.js. It contains 20 various scripts all in one page, with editing, tagging, interface, meta-data and anti-vandalism scripts. The individual scripts it uses can be found in this WikiProject. However, if you want more customized scripts, just look around and find which ones look useful. I'd personally recommend wikEd and Twinkle. Pyrospirit ( talk  ·  contribs ) 19:47, 14 October 2007 (UTC)


 * Yep. 69.143.226.129 (talk) 09:57, 4 March 2008 (UTC)

Scripts misread by MediaWiki
I've noticed quite a few cases of scripts not taking into account MediaWiki's interpretation of the script. See Special:Whatlinkshere/" + target + " for what I mean. Since I'm not an admin, I can't do anything about those, but someone should really fix these things with  tags or changing   to   and such. Pyrospirit ( talk  ·  contribs ) 19:59, 14 October 2007 (UTC)
 * Yes, Whatlinkshere and categories "count" .js and .css pages as well. Yes, if the script was unintentonally added to a category it should be fixed. But I don't see a big problem with Whatlinkshere cases ∴ Alex Smotrov 23:37, 14 October 2007 (UTC)
 * Perhaps MediaWiki needs to be changed in such a way that only comments can get interpreted like that. Shinobu 16:21, 4 November 2007 (UTC)

New version of hidePane.js
Good news for those of us who have limited screen real estate, or who simply like to use it more efficiently. I've updated User:Gerbrant/hidePane.js - instead of the ugly (although functional) gutter on the left hand side it now shows a series of pull down menu's at the top. This is also useful if you are primarly a Wikipedia reader, since all the space used by the left pane that contains the navigation, interaction, etc. portlets will be available for the actual article content. Of course the downside is that actions that normally take one click, now require you to open the appropriate menu. Perhaps in the future I'll add a way to active the most commonly used menu items in one click. Compatible with Safari (although wrapping doesn't work, but that's not my fault), IE and Firefox. If you have any feedback, please let me know. Shinobu 04:51, 4 November 2007 (UTC)

Regarding the to-do list...

 * Create a "bare bones" monobook script that is standardized, easy to read, well commented, and based on functions.
 * What does this mean? A bare bones monobook script would be an empty script without anything, functions or ortherwise, in it, no? In the end, what scripts you want to use depends on your taste and needs.
 * I second this question. This to do point confuses me. lucideer 04:44, 16 November 2008 (UTC) —Preceding unsigned comment added by Lucideer (talk • contribs)
 * Create a list of functions that will interact well with the standard.
 * What standard? Monobook? I expect almost all scripts will work well on monobook, since almost everyone is using that.
 * Last time I checked this was a while ago, so I'm not sure if this is still true, but in some other skins a script written for Monobook couldn't find HTML elements because they were for example called differently. It is often easier to simply customise monobook, then you're also certain all your scripts keep working, and you don't have to update your js and css.
 * Test for incompatible user scripts and note this in the scripts list.
 * That would be useful, but it would also entail a lot of work. Since it isn't like user scripts are extremely popular, the payoff will be small. Perhaps it's better to kindly ask people trying scripts to note any incompatibilities they encouter, but even then I don't really see the benefit. Most of the time someone encountering an error in a script will contact the writer of the script to have it fixed. Shinobu 18:44, 4 November 2007 (UTC)

Updated edit top script
Gerbrant.edit.top has been updated; I hope I didn't break anything. I fixed a bug, tried to make it more robust and also gave it a minor facelift. Shinobu 13:26, 12 November 2007 (UTC)
 * Still, I don't really need [edit] link on pages that I cannot edit. Why don't you admit that checking for existing [edit] link is a better idea? :) ∴ AlexSm 18:24, 12 November 2007 (UTC)

Admit? It isn't like I ever denied it. :-) But your script doesn't seem to show an [edit] link for pages containing only the introduction. An [edit] link on such pages may be superfluous for most users, but it's still inconsistent. To solve this, you would need no have some extra checks in the case no existing [edit] link is found, not unlike mine. I do think your solution is more elegant, but for my needs my version works better, even if it is ugly. Shinobu 07:19, 13 November 2007 (UTC)

AfDsorting script help?
I'm working on a script to add a sort link to the top of the edit page for Articles for Deletion. When editing such an article, the sort button asks for a category code and a reason for sorting (sorting as whatever), then produces the appropriate template and code, adds the reason to the edit summary, and submits the edit. I've based it on Digitalme's AIV Helper, paring down the function to just one button.

However, three problems exist. First, I can't get it to automatically take the single-letter code for the category (per CAT:AFD and generate an automatic edit summary. Second, the sorting template (REMOVE WHEN CLOSING THIS AFD) is generally placed on the second line, under the heading for the debate. I can't get the script to place the template anywhere other than the end of the page. This means that the existing template must be deleted by hand. Third, I don't know how to have the script remove any existing sorting templates (such as nominator unsure, for example). The script in its current form may be found here. Thanks in advance for any advice you can provide. ZZ Claims~ Evidence 20:16, 15 November 2007 (UTC)

If this request goes elsewhere, please let me know. Thanks! ZZ Claims~ Evidence 20:17, 15 November 2007 (UTC)
 * In order to add things to the right point in t.value, you have to come up with a rule to decide where to add the tag. In this case, I'd suggest adding the tag after the second occurrence of ===, which I'd do like this:


 * There are several ways to do this in JavaScript, though; the split/join is the method that I normally use, but other people use different methods.
 * As for removing a previous tag, this method comes directly from the source code of User:Bot523, modified to fit into code which uses the same variable names as Digitalme's code:


 * (ns:0 is a magic word that always expands to the null string.) Come to think of it, {{subst:ns:0}} would possibly work even better, so as to remove the template altogether on page save. There are also methods which parse the page's wikimarkup to remove the template.
 * As for changing the edit summary, with the variable names that Digitalme's code uses, that's just, which you can set to whatever you like to change the edit summary. Hope that helps! --ais523 13:26, 16 November 2007 (UTC)


 * Please doublecheck me, but based on your input, I think I have it working properly. I still can't get the edit summary to reflect the code input, so I simplified it to a generic "sorting per CAT:AFD" note. Thanks for your assistance! I've put together instructions and notes on the script here, and the completed (hopefully) code is here. Again, Thanks! ZZ Claims~ Evidence 16:01, 16 November 2007 (UTC)


 * In its current form, it adds a line between the heading and the debate itself. I can accept this, even though I'm sure it's easily fixable and I'm missing something. ZZ Claims~ Evidence 18:04, 16 November 2007 (UTC)
 * What seems to be happening is that both the newline before and the newline after the {{REMOVE THIS TEMPLATE... line are being preserved. Try writing  just before the opening {{ inside each of your split-strings; that will cause the initial newline to also be deleted, getting rid of the extra space. --ais523 14:30, 19 November 2007 (UTC)


 * I figured it out - I needed to add both an /n for the new line and a /r for the carriage return. It's fixed and working well. I've also added a second script that removes the sort template entirely. I've been using that one to remove the sort template from closed debates, to take them out of the categories used for the open debates. Thanks again for the help! The scripts may be found here. UltraExactZZ Claims~ Evidence 21:15, 28 December 2007 (UTC)

Adding user scripts to Special:Preferences
One of the problems that WP:US faces at the moment is that it isn't as widely known as maybe it ought to be, and that the method of installing scripts isn't intuitive and involves editing a personal scripts page, even if the user in question doesn't have an interest in developing scripts but only wanted to use them. Advances like {{subst:js}} are only so effective in this regard; but now, it seems that a better option is available. There is an extension mw:Extension:Gadgets that adds user scripts stored in MediaWiki: space as options in Special:Preferences; that way, we can have several users (probably mostly WP:US members, although there would be no reason to restrict the people who could check) check various scripts to see if they were safe to add as user preferences, and then an admin could edit MediaWiki space accordingly to add the script as a preference that users could easily access, install and uninstall, a sort of WP:US/S that's officially sanctioned by the software. Normally, this sort of project is the sort of thing that just gathers a bit of support on WP:VPR and then dies because nobody wants to implement it; however, the code has already been written, and reviewed by developers, and it is currently live on the German Wikipedia (if you have an account on dewiki, go to de:Special:Preferences and click on the rightmost tab to see the new code in action). This makes it seem much more likely that if their is community consensus, that extension will be installed. At the moment, I'm just posting this suggestion here, to see if people interested in user scripts think that this is a good idea; if the conversation here seems encouraging, I'll link it from VPR and we can have a proper attempt to gain consensus here to make a request to devs to enable this feature. Does anyone else think this is a good (or bad) idea? I'm trying to gauge consensus, so even a 'me too' is useful here if you agree. --ais523 14:39, 19 November 2007 (UTC)
 * Strong support from me. Slightly better link: [ de:Special:Preferences?uselang=en]. Relevant bugs: 11956 (done for de.wp) and 12020 (done for fr.wp). The only thing I don't like is that Gadget code is included after user code, which is kind of limits the flexibility for CSS gadgets ∴ AlexSm 16:54, 19 November 2007 (UTC)
 * I suppose that it might sometimes be possible to override that using, but I agree that it isn't ideal. It's still a big improvement over the edit-your-monobook method, though. --ais523 10:46, 20 November 2007 (UTC)
 * I'll copy this to VPR in an attempt to get enough consensus for the devs, then. --ais523 12:09, 21 November 2007 (UTC)

Stub types script
Hi, I have a script installed (I'm pretty sure it was written by ais523) that easily allows me to add in a stub type simply by typing in the name of it. Anyway, what I would like to add to it (maybe I would only use it, or maybe it would be helpful to others) is a dropdown box with some stub types so that I don't have to keep typing the same ones in over and over. I can add in the types myself, I would just like to know how to add in the dropdown box. Thanks  <font color="navy" face="Times New Roman">jj137  (<font color="black" face="Times New Roman">Talk ) 17:44, 23 November 2007 (UTC)
 * Yes, I noticed you post this on WP:US/R. It's not very easy to do, though; the dialog box that appears can't be modified at all in code, so it would have to be done a different way. Should be possible, though. --ais523 17:46, 23 November 2007 (UTC)
 * OK. (I forgot I posted it there, I guess I was thinking I forgot to hit Save.) I have a somewhat basic understanding of this, so I'll work around with it and see what I can do.  <font color="navy" face="Times New Roman">jj137  (<font color="black" face="Times New Roman">Talk ) 18:05, 23 November 2007 (UTC)

Gadgets extension now live
It's now possible to add scripts to Special:Preferences (navigation popups is already there). I've started a new page at WikiProject User scripts/Gadgets to try to decide which scripts should or should not be added (I know most about my own scripts, so they currently have some of the most detailed comments). Anyone who sees this, feel free to help reject/accept/test the scripts on the list! --ais523 09:20, 4 December 2007 (UTC)

Turn off scripts?
Is there an area an admin can edit other than monobook.js that prevents a user from using a particular script? I'm curious as I have suddenly and mysteriously lost all Twinkle functions without any kind of warning or reasoning (ie: no admin has told me and no changes have been made to the way my Firefox is setup that would prevent only 1 out of the several scripts I use from working). So, at the risk of offending admins, I want to know if this is possible and the admin that may have done this didn't tell me? -- <strong style="color:#fff;background:#DC143C;border:1px solid #000">ALLSTAR <strong style="color:#FFF;background:#0F4D92;border:1px solid #000"> echo 13:53, 20 December 2007 (UTC)
 * Try going to your monobook and refreshing the page or purging.   jj137  ♠ 20:43, 20 December 2007 (UTC)
 * I've done that already but thanks. -- <strong style="color:#fff;background:#DC143C;border:1px solid #000">ALLSTAR <strong style="color:#FFF;background:#0F4D92;border:1px solid #000"> echo 21:59, 20 December 2007 (UTC)
 * On some browsers, Twinkle is affected by a race condition in runOnloadHook - see WT:TW for more information and a workaround. —Random832 18:40, 1 February 2008 (UTC)

Bot
Hi. I have created around 14,000 articles on wikipedia, higher than anybody, and am currently adding Frebnch communes at bot speed around 6 a minute and have requested that my new articles are automatically filtered but noone seems to be concerned. I have addressed this to several people but no one has taken it seriously when I said I was concerned about clogging up new pages even when I am adding general content. I refused adminship long ago but surely I am respected enough to be regarded as admin level in editing. I always add valuable content and most of my articles are referenced except such stubs. Isn't it time somebody made a decision to help new page patrollers by helping them. I;ve contributed tens times more than many adminstrators on wikipedia (107,000 edits) who automatically have their page unmarked -shouldn't mine be the same on a permanent basis? I consistenly add new content to wikipedia which is generally referenced and useful content. Deforestation in Brazil is what I am capable of. It would help patollers a lot. Any idea if you can help me receive permanent clearance? <font style="color:#fef;background:black;">♦ Sir Blofeld ♦     <font size="-4"><font color="Black">Talk? 23:00, 29 January 2008 (UTC)


 * I'm not sure I get your point, Sir. Are you requesting that your edits be filtered/unfiltered?  Are you running a bot or are you manually editing at "6 a minute"?  Note, that this project is about client-side JavaScript, perhaps you should post your request at the bots page.  Btw, having admin rights has little to do with the quality or quantity of your edits.  Cheers, --Cameltrader (talk) 12:12, 30 January 2008 (UTC)
 * You can request bot rights for an account (i.e. edits do not show on Recent Changes) for a specific task at WP:BRFA, whether you actually use a bot to do it or not. You should explain why the bot flag will be helpful, and create an alternate account to do the specific edits (because bot-flagged accounts should only be used for the purpose the flag was granted). By the way, administrator edits do show on Recent Changes, generally speaking; administrators can bot-flag rollbacks and the edits they roll back (this is rarely used, its main purpose is to prevent a Recent Changes flood attack) but no other sort of edit. --ais523 13:55, 1 February 2008 (UTC)

Using Scripts on other wikis
Is it possible to use some of these scripts on other wikis? <B><font color="Blue">RT </B>| <font color="Black"><B>Talk</B>  22:19, 17 January 2008 (UTC)
 * Yes, you can use the following code:

document.write('<script type="text/javascript" src="' + 'http:// en.wikipedia.org /w/index.php?title= Script_page '  + '&action=raw&ctype=text/javascript"></scr' + 'ipt>');
 * Replacing the yellow highlighted text with the text that's relevant to the script. Bear in mind, however, that scripts that contain references to en.wikipedia may not work correctly on other wikis. Also, if you're using some of the scripts on non-wikimedia wikis, they might rely on features such as the api which may not be installed. Tra (Talk) 22:31, 17 January 2008 (UTC)

Suggestion
I would like to suggest for someone to make user script that will add dropdown menu on edit toolbar (like on BG and HE wikis) with you can insert templates for infoboxes and other templates. Sasa Stefa  novic  &bull; 09:26, 26 February 2008 (UTC)

structured gadget pages
Halló! I created stuctured gadget pages via sections at s:yi: w:yi: wikt:yi:. During the first trials I used spaces in the sections. Then I could see that w:en: is using « - » while w:fr: does not. The clue is to define « MediaWiki:Gadget-section-foo-bar ». Maybe such examples should be illustrated.

btw: the structured gadget page at http://test.wikipedia.org/wiki/Special:Preferences is broken. Any clue why? Best regards

‫·‏לערי ריינהארט‏·‏T‏·‏m‏:‏Th‏·‏T‏·‏email me‏·‏‬ 09:25, 12 February 2008 (UTC)


 * I am not sure what you mean, but maybe Gadget can help you. Сасусlе 02:04, 14 February 2008 (UTC)

Need help cleaning out my monobook.js
Would someone be willing to help me clean up monobook.js. I can't figure out what is what anymore. I don't know javascript, and I really didn't add things there neatly. I would like to use some of the tools made by others, but before I do, my monobook.js really needs to be cleaned up. Please? - LA @ 00:48, 25 February 2008 (UTC)
 * The scripts that you're importing can be simplified to this:

importScript('User:Interiot/Tool2/code.js'); importScript('User:Splarka/dabfinder.js'); importScript('User:Pilaf/instaview.js');
 * You have two scripts that aren't being imported, though (the null edit and template replace script). Cleaning those up will be harder. --ais523 14:44, 21 April 2008 (UTC)

watchlistSorter
I have just created a new watchlistSorter because the existing one no longer works. I think this could become an gadget candidate and I would like to hear your opinion to improve the script. See the script's page under User:Cacycle/watchlistSorter and the code under User:Cacycle/watchlistSorter.js. Сасусlе 05:45, 25 February 2008 (UTC)

Disappearing AfD tab?
Hi, could someone advise on my monobook page? It has been working fine with the extra tabs from Twinkle up until I got my extra admin buttons. Now there doesn't seem to be enough room at the top of the page and on many page views, the AfD tab is missing. It does appear on some pages (when not all the other tabs are present) and also on some other monitors I use; but on my home monitor (a small one set to 1024 x 768 pixels) the AfD tab is almost always missing. I'm a total beginner when it comes to all this business, so advice in words of one syllable, please! <font face="century gothic" color="#0E6E2D">Kim Dent-Brown  <font face="century gothic" size="1" color="#0E6E2D">(Talk)  20:57, 27 February 2008 (UTC)

Smart quotes script
Attention all pedants, I made a script. smartQuotes.js replaces typewriter (ASCII) quotation marks with proper (Unicode) quotation marks ("smart quotes", see quotation mark glyphs) on any page you view. For example:

The Smashing Pumpkins’ Billy Corgan described Surfer Rosa as “the one that made me go, ‘holy shit’. It was so fresh. It rocked without being lame.”

The Smashing Pumpkins’ Billy Corgan described Surfer Rosa as “the one that made me go, ‘holy shit’. It was so fresh. It rocked without being lame.”

This script will not affect the editing window, so you won't need to worry about tainting your edits with odd glyphs. I know this is irrelevant to pretty much everyone (there is no difference whatsoever at small sizes if you're using Arial), but for the oddballs like me (who use serif fonts and aren't getting laid) it's available. If you're ever printing out a Wikipedia article for academic usage or something, you might consider applying this script for that extra professional touch.

I've only tested this in Firefox 2.0. It may or may not work in any other browsers.—Werson (talk) 03:48, 27 March 2008 (UTC)

"Replaced by addPortletLink" help
Hello. Recently, whenever I go to a page, I am greeted by a JavaScript alert which says: "Replaced by addPortletLink". Could someone help me with this problem? Thanks! archanamiya  ·  talk 21:10, 4 April 2008 (UTC)
 * See Village pump (technical)/Archive 134 --TheDJ (talk • contribs) 21:51, 4 April 2008 (UTC)

Link checker in JSON
I've extend the my checklinks script to output its results in JSON and created a reference JavaScript implementation. It also output the headers it retrieves, which could be useful for some scripts. — Dispenser 00:51, 20 April 2008 (UTC)

Deprecate syntax highlighter and inclusion scripts
WikiProject User scripts/Scripts/Syntax highlighter seems to be deprecated by the site's built-in highlighter now.

Also, the first part of WikiProject User scripts/Scripts/Inclusion is mostly deprecated by importScript. I suppose the synchronization part could be, too?

The synchronization across wikis cannot be deprecated by importScript, nor can importScript deprecate the other inclusion script, simply because importScript does not exist on the other wikis.

Also, the reason why winc allows brackets inside the link

winc('User:SOMEONE/monobook.js');        /* Comment about what the script does */

Is because I had another script User:Omegatron/monobook.js/autolinker.js which turned bracketed text in the monobook.js display into links. I think this should be worked into something better that can be used by everyone. — Omegatron 01:46, 4 April 2008 (UTC)

Request for script
Simple English I see that there is a bilingual script that can display the interwiki pages side-by-side, and I had a similar idea for a Simple English option that displays the Simple version of a page if it exists. Maybe there is a tab on top of the page that switches to the Simple English or has a side-by-side comparison if * is present? Does that seem feasible? I don't know if anyone else is interested in that, but I would like it because I could see what really needs work on Simple and it would help me port over information from en.wp. Thanks. -Justin (koavf)❤T☮C☺M☯ 20:31, 8 April 2008 (UTC)
 * Revised I have a slightly different take on it now, and I've uploaded a couple of mock-ups onto Flickr that indicate what I'm trying to say here (the differences in rounded tabs are a product of a style that I have on en.wp but not on simple.wp):
 * en2simple
 * simple2en
 * Forget the necessity of an interwiki link and install this script on your en account and your simple account to go back-and-forth between the two. Does anyone think he can make that happen? Please post on my talk. -Justin (koavf)❤T☮C☺M☯ 00:32, 9 April 2008 (UTC)

Here's the en version:

And the simple version: If you need any further modifications to the functionality please ask. Grace notes T <span title="Wikipedia talk:WikiProject User scripts/Scripts">§ 01:53, 9 April 2008 (UTC)
 * Wow Thanks so much, it looks like it's working great. I originally figured it would just be int he main namespace, but being in all of them is handy as well. -Justin (koavf)❤T☮C☺M☯ 02:22, 9 April 2008 (UTC)


 * I made a small change to the code above, wrapping wgPageName in encodeURIComponent so that it works even for titles that contain special characters (such as question marks). —Ilmari Karonen (talk) 19:19, 26 July 2008 (UTC)

Hide talk page templates script
I just wrote a script that hides all those annoying yellow talk page templates in a single collapsed table. I went ahead and added it to the list, though it does not work in Internet Explorer (I'm not sure why). Anyone who knows more about IE can check it out if you'd like. — Bob • (talk) • 00:46, 10 April 2008 (UTC)
 * I think you should have tested it a bit more before publishsing. Anyway, it does seem to work in IE6, I don't have IE7 at the moment. However, it doesn't work with Preferences->Misc->"Enable "jump to" accessibility links" (extra &lt;div id=jump-to-nav>), and I'm pretty sure it doesn't work in at least 3 skins. —AlexSm 02:02, 10 April 2008 (UTC)
 * I'll continue testing it in other browsers. I just added a few rules that take the user's skin into account, as well as the jump-to nav. — Bob • (talk) • 03:52, 10 April 2008 (UTC)

Multiple scripts
Is adding a couple of scripts into one .js page going to screw up or should I create new .js pages for each script? --staka (T ・C) 23:38, 17 April 2008 (UTC)
 * Multiple scripts on page are just fine. This even saves resources a bit when your browser requests them from the server (which usually happens once in several days, as far as I know). But remember if one script has an error, everything below will most likely stop working as well. —AlexSm 00:29, 18 April 2008 (UTC)
 * Alright, thanks for the help. --staka (T ・C) 01:31, 18 April 2008 (UTC)

Safe IE edit links script
Following a discussion on WP:VPT, another user wrote a script that converts all links on edit and preview pages to open in new windows (or tabs, given your browser configuration) in Internet Explorer, since it has a bad habit of chucking changed form data should you accidentally click something you shouldn't have. Following that, I asked User:Alex Smotrov for some advice on improving the script, and he subsequently rewrote it for me, after which I made one addition. In its current form, the script runs when you click on a link while editing or previewing, and if the link is not part of the user interface (tabs at top, sidebar, footer, etc.) or a script-generated link (show/hide link on collapsible tables, primarily), the script changes it to open in a new window. I was wondering if the script could be listed here? Also, could anyone take a look and tell me if it'll work in any skins besides Monobook? — Dino guy  1000  18:45, 26 July 2008 (UTC)


 * I got tired of waiting for a response and added it myself. Go ahead and move it if I added it to the wrong section, I'm really not sure where the best place for it would be. — Dino guy  1000  21:01, 5 August 2008 (UTC)


 * (I didn't notice the 1st message.) Yes, the script should work in all skins. Would be nice if you added a separate script description page though. —AlexSm 21:15, 5 August 2008 (UTC)


 * Yeah, I've been thinking about that (as well as playing around and seeing if editors can define further sections to be parsed in their own monobook.js), but I just haven't gotten around to it yet. You can go ahead and start one if you'd like. — Dino guy  1000  21:45, 5 August 2008 (UTC)

Monobook.js ?
What is a monobook.js ? I would like to add a script but I have no idea of how. I know that you have to save a script somehow, but nothing on wiki tells you how. It says that you have to save it to your monobook.js....which is....?Think about this. Once Bread becomes toast, you can&#39;t make it back into bread. (talk) 23:46, 26 August 2008 (UTC)


 * Look here. You can edit it just like any other wiki page (but note that only administrators can edit other users' monobook.js files, for security reasons). — Dino guy  1000  17:03, 27 August 2008 (UTC)

Position of Personal Links
OK, so I want to add a link to my personal links. I figured out how to get the link up there (well, someone else figured it out for me, anyway!), but how can I change its position? --Alinnisawest, Dalek Empress (<font color="#cf0021">extermination requests here ) 04:51, 28 August 2008 (UTC)

red link removal
I found that red link removal is cumbersome when dealing with more than three bad links in a very big section would someone make a script for me that would delete a bad link by hovering the mouse over the link.Hintss (talk)

Suggestion to avoid script incompatibility
I discovered a while back that scripts on Wikipedia have the rather annoying property that function names and global variables are shared between any scripts that run on the same page. This can often cause incompatibilities between scripts, such as where one script defines a global variable and another script uses a global variable of the same name as a user-defined setting; in such a case, the second script would use—and possibly change—the first script's value for the global variable, likely crashing one or both scripts. I ran into a version of this issue when one of my scripts stopped working after I installed another script, the reason being that they both had a function named.

What I suggest is that user scripts under this project include a global wrapper function around the script's functions and variables to avoid situations like this. Doing so would make the script's contents local to that one script and thus protected from unintentional access by another script.

To give an example, if there was a script named, it might look like this: The nice thing about this construction is that only  and   are in the global scope, but variable names inside the   function can be as common or short as you want to make them; it eliminates the need to ensure that there are no naming conflicts. For a more detailed example of a script structured like this, see recent versions of User:Pyrospirit/metadata.js, which I just rewrote using this method.

So, does this seem like a good idea for more frequent use, or is there something that I've missed or doesn't work the way I think it does? This might be a good way of making Wikipedia script structure more standardized as well. Pyrospirit ( talk  ·  contribs ) 02:07, 5 June 2008 (UTC)


 * You could save one global object by using an anonymous function:


 * Or you could enclose everything in an object, and again take only one global:


 * Anomie⚔ 00:32, 6 June 2008 (UTC)


 * That's an interesting idea. However, I'm not sure it would be necessary to minimize globals that much; the idea is just to avoid spamming up the global namespace and to allow variables inside a script to have simple, common names such as  or  . Your suggestion does look like it would work as an alternative, though.  Pyrospirit  ( talk  ·  contribs ) 00:40, 6 June 2008 (UTC)

Script suggestion
I've got an idea for a script, maybe someone could work on it - basically what it does is allows you to right click on a (user/wikipedia/article) talk page section and it adds a link-to-that-section to a user subpage of your choosing, to remind you to return to threads you're need to check back on. Whaddyathink? – xeno  ( talk ) 13:17, 16 July 2008 (UTC)

Query.php alert
Brion sentenced query.php to die on 25 August. Please make sure that your scripts are migrated to api.php! I'm especially worried about popups, which is largely unsupported and uses query.php in million places. Max S em(Han shot first!) 07:07, 31 July 2008 (UTC)

Assessment scipt
Is there an existing script in assessing song-related and album-related articles. --Efe (talk) 05:30, 1 August 2008 (UTC)

Proposal to promote User scripts via User boxes
User scripts can bring many benefits to users, and I suggest that they should be better known. One way to promote them is to encourage users of a script to say that they use it, on their user page, using user boxes. This would enable a virtuous circle ("I see that you use it, so I might use it as well").

This would also allow to look at how many users are using a particular script by looking at what pages link to that script page. It would then become possible to list scripts by their popularity.

Any thoughts on this ? Any suggestions for a graphical design ? Pcarbonn (talk) 17:24, 30 August 2008 (UTC)


 * For info, I have now created this template, and added it to my userpage. Feel free to improve it.Pcarbonn (talk) 19:54, 31 August 2008 (UTC)

Any suggestions for replacement script
I have been using a script called User:Outriggr/metadatatest.js to tag and assess articles for various WikiProjects without having to open the talk page first. Unfortunately, the creator has decided to discontinue this script and I would like to know if anybody can recommend a similar script to me? __meco (talk) 15:36, 13 September 2008 (UTC)


 * I'd suggest that you have a look at User:Outriggr. Here is what it says: "scripts · User talk:Outriggr/metadata.js graduated to the "Preferences" gadget MediaWiki:Gadget-metadata.js — this was elaborated into the interactive metadatatest.js, which displays and updates an article's assessment templates from an interface on the article page (rather than the talk page). I have abandoned this script, because the whole template and article grading thing is really more busy-work than useful, in general." Pcarbonn (talk) 22:06, 13 September 2008 (UTC)


 * I have read that and I don't see how that is helpful to me in finding another script to replace the functionality that I relied on in that script. __meco (talk) 22:29, 13 September 2008 (UTC)


 * I am currently maintaining the gadget at MediaWiki:Gadget-metadata.js. I don't know of any complete replacement for metadatatest.js, but I've written a script (located at User:Pyrospirit/metadata/projectbanners.js) that extends metadata.js to duplicate part of the functionality of metadatatest.js. However, projectbanners.js doesn't have any way to modify assessments already in place; it only displays the project banner's name, assessment, and importance for each WikiProject already on the talk page. Pyrospirit  ( talk  ·  contribs ) 03:15, 20 November 2008 (UTC)

How do I Activate this script
How do I use this JS? Thisisatest247 (talk) 21:27, 23 August 2008 (UTC)


 * Place the script in your script page (change the title if you're not using the default MonoBook skin). You can then call any of its functions in any other script. For example, you'd use  to convert the string "secret_stuff" to "80ef97f147cc7abec067e19f19ab21d1". — {admin} Pathoschild 04:28:01, 27 September 2008 (UTC)

Friendly / Twinkle
Hello. I recently translated friendly and twinkle into Romanian, but when the script wants to post the edit (for the both scripts), FireBug says:

form is null if( !tagRe.exec( form.wpTextbox1.value ) ) {

The scripts are here: ro:User:Firilacroco/friendly.js and ro:User:Firilacroco/twinkle.js, but I think that the problem isn't here ... it's somewhere else. I installed this script on Wikia and it work fine.

Thank you in advance.  Daniel  Message 11:09, 19 September 2008 (UTC)

Script documentation
I am currently trying two different ways of documenting user scripts. I would like feedback from the rest of you what you think about the two different approaches:


 * The simple and compact approach, both code and documentation in the same page: User:Davidgothberg/newmessageshistory.js. Easy to use for the script programmer and has the advantage that if a user copies and pastes a script instead of importing it, then the documentation comes along. And perhaps easy to understand for the users too since it only involves a single page address to keep track of.


 * The pimped up approach with a green /doc box like we do for template documentation: User:Davidgothberg/clock. Involves a total of three pages. Means more work for the script programmer to make. But this looks neat and most of all means that anyone can edit the documentation even though the script itself is on a protected page.

So what do you guys think?

--David Göthberg (talk) 14:37, 21 September 2008 (UTC)


 * I never even considered your "compact" approach: the inability to use links, images, bold text etc. outweights everything else for me.
 * I used to put documentation on the top of .js talk page like this:, and I still might use this for very simple little scripts; cannot use interwikis though.
 * Now I prefer creating a separate page (like in user:js/watchlist): main page is <tt>/scriptname</tt>, while the code stays in <tt>/scriptname.js</tt> and should have the 1st line, solving the code copy-paste problem. Hmm, now that I think of it, it should probably say.
 * Other comments. I don't see why you need another <tt>/doc</tt> subpage. I also don't think it's a good idea to push the .js part to the reader, both on the User:Davidgothberg/clock and on the WikiProject User scripts/Scripts: I imagine most users are interested in the script description, and only a few might want to look at the actual code. —AlexSm 14:31, 22 September 2008 (UTC)


 * AlexSm: Yes, now that I had some days to think about this I agree. Your analysis is spot on in all aspects. I will probably change to the way you describe to document my scripts. (And I see that many other scripts already use that way.)
 * And a small correction, the link in the source should be . That is, don't forget the   part, or the user gets an ugly error message. And nice idea to use the full URL. Since then the link works even if the script has been copied and pasted to other projects like other language Wikipedias or even other sites.
 * Thanks for your input!
 * --David Göthberg (talk) 17:11, 23 September 2008 (UTC)

AJAX framework
Hello. I created the AJAX framework to make AJAX programming effortless, and expanded the WikiProject's AJAX guide. (You can compare programming with and without the framework by looking at "Edit a page and other common actions" in the guide.) If you have suggestions for more functions, please post them here. — {admin} Pathoschild 04:20:05, 27 September 2008 (UTC)

Canonical namespace change coming: Image: -> File:
Brion has just announced on the wikitech-l list that he's planning to (finally) change the canonical name of the "Image:" namespace to "File:". This will affect any scripts that check for, and will probably also affect scripts that make an equivalent check in other ways (such as by looking at  ,   or the document title).

The recommended fix is to test for, which will work both before and after the change. Please note that, if everything goes as planned, we'll only have about one week to fix our scripts before the change goes live.

More details at 44. —Ilmari Karonen (talk) 02:35, 7 October 2008 (UTC)

Popup translations done in end999's monobook.js
I managed to do an ajax call to google's translation api. So I have popup translations for 23 languages on my monobook.js file: User:Endo999/monobook.js

It functions much like the google toolbar translation feature. You position the cursor over a word for a second or two and the foreign language translation pops up. You move the cursor away and the popup goes away. 23 languages supported right now.

Because my login does not survive going to, say, pt.wikipedia.org (the Portuguese wikipedia) I cannot surf into other language wikipedias and keep my login (and thus the monobook.js file). It would be good if I could do this, as I could read foreign language wikipedias this way.

I am a monoglot English speaker trying to extend my intermediate French and Spanish reading abilities, and I find the tool to be quite helpful in this regard, as I can read whole articles in Spanish and French without having to lookup a dictionary. The Google toolbar does not translate from French to English (only English to French) except for whole pages.

Endo999 (talk) 21:27, 15 October 2008 (UTC)


 * 1: Wow, that seems like a very useful script!
 * 2: Take a look at Help:Unified login. Nowadays you actually can stay logged in when you jump between different Wikimedia projects. I see that you have an account at the Spanish Wikipedia too. When you unify your accounts that account will be merged into your global account. (Provided that it is your account so you have the password for it.) And then you will automatically have an account on all the Mediawiki projects.
 * 3: Even if you unify your account you still need to copy the script to your /monobook.js file for each project you want to use it on. But at least you will only have to log in to one project to be logged in everywhere.
 * 4: You can take it one step further, but that is a bit tricky. You can put a short line of code in your /monobook.js at each project you frequent, and that line of code can load a javascript file from a central javascript file at your main account or from your own computer. That means if you update your central script you will automagically have your new functionality on all the projects that you frequent. You can read a little about that at WikiProject User scripts/Guide. That page tells how to load from your own computer, but not how to load from a central script page on one Wikipedia from another language Wikipedia. So I just added it to my humongous to-do list that I should add such instructions to that page. You can also load CSS files from central locations or your own computer in a similar manner. That page also tells about that.
 * --David Göthberg (talk) 10:56, 16 October 2008 (UTC)


 * Regarding your last point, you can create a global script file at your name/global.js and include this line in your script files on other wikis:
 * I'm writing a script that uses AJAX to configure each wiki (user pages and preferences), so I'll add script file creation.
 * — {admin} Pathoschild 16:56:07, 16 October 2008 (UTC)
 * — {admin} Pathoschild 16:56:07, 16 October 2008 (UTC)


 * Pathoschild: Yes, your code above seems right.
 * And the script you are working on sounds complex, must be a lot of coding to get that one to work right.
 * --David Göthberg (talk) 18:17, 16 October 2008 (UTC)

addOnloadHook
Hey, I'm fairly new to Wikipedia, and I just have one small question about userscripts. Does anyone know when the  event executes? Is is  or , or some other contrivance?
 * lucideer 04:44, 16 November 2008 (UTC)


 * View a page source, at the bottom of every page is:
 * This iterates over and runs all functions that have been 'd. If this has already been run,  'd functions run immediately. See wikibits.js, notably: "function addOnloadHook" and "function runOnloadHook". --Splarka (rant) 08:17, 16 November 2008 (UTC)
 * This iterates over and runs all functions that have been 'd. If this has already been run,  'd functions run immediately. See wikibits.js, notably: "function addOnloadHook" and "function runOnloadHook". --Splarka (rant) 08:17, 16 November 2008 (UTC)


 * Thank you. Nice and informative - lucideer  13:35, 17 November 2008 (UTC)

Who's using my script?
Having, newly posted a script for others to use, I don't suppose there's any way to tell what level of use it's getting, is there? —Largo Plazo (talk) 12:35, 17 November 2008 (UTC)
 * You can check "What links here" from your script as it is common for people to include the script's wikilink in a comment before it is imported. Of course, there are many caveats to that. Mark Hurd (talk) 14:03, 1 April 2009 (UTC)
 * The new search is actually quite good for this type of thing now, see for example my sysopdectector.js usage. --Splarka (rant) 07:20, 2 April 2009 (UTC)

Split-screen edit preview
I just wrote a gadget to load the preview in a resizable panel on the right-hand side of the screen. It's available by adding  to your monobook.js or modern.js file. I'd like to get some people to test it and let me know what they think. Thanks. <font style="color:#C60;font-family:Papyrus;font-weight:bold;font-style:italic">—BradV 21:09, 5 December 2008 (UTC)

Rollback scripts?
I've been trying to find some scripts that I can use for other wikis that would provide me with a rollback button (as I am only a rollbacker here). I've tried out numerous scripts on meta, from godmode-light to twinkle, and none have worked. Anybody know a functional script I could use? Inferno,  Lord of   Penguins  02:11, 7 February 2009 (UTC)

So what's this?
I was cleaning through my monobook, I had copied a few scripts staright instead of importing them. I ran across the following:

Does anybody here know what this matches up to or what it's doing? Thanks a lot. Stepshep (talk) 02:04, 20 November 2008 (UTC)
 * It's an AJAX script, designed to allow your browser to fetch content "behind the scenes" that isn't actually on the page. The variable names imply that it must be from my category watchlist script (the AJAX code isn't mine originally, by the way, I just copied it); in that case, it's using the AJAX capability to download the list of last-changed dates of categories from the API so they can be checked for changes. Note that it's rather old code; nowadays, there's a function in wikibits.js that does all that, so the gory details are hidden from monobook.js itself (and update over time). --ais523 13:02, 12 February 2009 (UTC)

Advertising/changing a script link
I have produced an update to "Hide top contributions" that isn't broken for redirects, and also recovers to continue hiding remaining entries if there is any other type of link not matched by either regex. Should I just be bold and change the link in here /Scripts#Contributions to point to my version, or is there a less anarchic procedure not documented here or on the project page.

I have already mentioned my change on the script's talk page.

Mark Hurd (talk) 14:09, 1 April 2009 (UTC)
 * I've directed /Scripts#Contributions to my version. Mark Hurd (talk) 14:07, 2 April 2009 (UTC)

Batch Edits?
I'm looking for a way to edit many pages at once without opening each in a new browser tab. Is there a user script to edit pages in a batch? Submit a list of page names and a list of all edit textareas for the pages opens with one save button. No need to load the toolbar for each. --Subfader (talk) 16:52, 3 March 2009 (UTC)
 * Hrm, well the first question would be; what exactly are you planning on editing en masse like this? AutoWikiBrowser is probably what you're looking for, but we generally don't grant approval to accounts with fewer than 500 mainspace edits. –  xeno  ( talk ) 16:56, 3 March 2009 (UTC)
 * E.g. you are in a category and realize you should edit / add a sortkey to a bunch of pages. AWB would be too much and not suiteable. In some cases I prefer seeing all to-be-edited pages in edit mode on one page and save the bunch once. Since it are individual edits nontheless a global text replace won't help. --Subfader (talk) 17:04, 3 March 2009 (UTC)

Snippet Manager Script
I wrote a snippet manager script, for holding complex signatures, templates, or just plain pieces of text. Works with wikiEd (and TW/HW) Link: User:Odie5533/SnipManager.js

Features: Upcoming features: --Odie5533 (talk) 05:58, 13 March 2009 (UTC)
 * Customizable menu (smMenus)
 * Customizable forms (smForms)
 * Customizable form display (smColumns & smTextWidth)
 * Form tooltips support
 * Default value support (using either 'default':'default value here' or 'defeval' which supports javascript functions like getting the date)
 * Prepend and append support (for adding tags)
 * Multiple forms open at once
 * 1-click insertion
 * Drop-down menu support

I just updated the script to include full drop-down menu support. I've added a handful of templates to it and you can either recommend some and I can add them or add them via the customization option in your monobook.js file. The buttons also support simple evaluations and the Show refs and Ref errors buttons are hooked into another script. --Odie5533 (talk) 16:05, 19 March 2009 (UTC)

I made a page with installation instructions at User:Odie5533/SnipManager. --Odie5533 (talk) 17:26, 19 March 2009 (UTC)

Help!
I was recently informed that my new script, User:Drilnoth/assessortags.js (see documentation) works in practically no browsers other than Firefox 3. I'm still kind of new to scripting, so it would be much appreciated if someone could take a look at the code and see what the problem is... other scripts based on the MoreBits library work find in many browsers that this one just isn't showing up in. Please discuss this problem at User talk:Drilnoth/assessortags.js. Thank you! –Drilnoth (T • C) 16:13, 25 March 2009 (UTC)
 * The errors I'm getting are all related to MoreBits xhr function (using Opera) - I've not explored it much, but I see it's using Mozilla's proprietary overrideMimeType extension which isn't supported by other browsers. That might have something to do with it - you said other scripts using MoreBits work fine; are those working scripts making ajax requests? <sub style="font:bold 14px arial;color:#f27;">ɹəə pıɔnı  19:02, 25 March 2009 (UTC)
 * Sorry... other scripts using morebits do not work fine in Internet Explorer... it's a browser issue. The problem actually isn't as bad as I thought; it's just IE and Opera which seem to be unable to run the script. WP:FURME also uses both morebits and AJAX. –Drilnoth (T • C) 20:01, 27 March 2009 (UTC)
 * <tt>overrideMimeType</tt> is a non-standard proprietary function introduced by Mozilla as a workaround because Firefox doesn't create <tt>responseXML</tt> for non-xml MIME-types. If I'm not mistaken this workaround is not necessary in Opera because Opera always creates <tt>responseXML</tt> for all MIME-types as far as I know. So just removing the non-standard function should give Opera compatibility. I'm not sure how IE deals with this though... <sub style="font:bold 14px arial;color:#f27;">ɹəə pıɔnı  18:41, 8 May 2009 (UTC)

Capitalize First letter only
Hi, I'm looking for a user script that adds a new button to the toolbar to Capitalize The First Letters in marked text. I tested the wikEd editor (works fine, but too many other features and not as single button) and User:Zocky/Search Box (only lower or UPPER case). Any hints? Thanks. --Subfader (talk) 23:07, 26 April 2009 (UTC)

js not working
The answer to this is probably something really stupid, but since I added a new script to my monobook.js page, it's stopped working (not only is the new script having no effect, but the buttons I'd previously added have stopped appearing as well. I've refreshed the cache, logged out, restarted, everything I could think of, but still no luck. Any ideas?--Kotniski (talk) 08:34, 8 May 2009 (UTC)
 * should have fixed it. Didn't it? You refreshed your cache after that change? If you have a look into your javascript console (Ctrl+Shift+J in Firefox) it should tell you where it has errors. Amalthea  09:29, 8 May 2009 (UTC)
 * Yes, I refreshed after that change and still don't get the effects. I'm using IE6 here - there is something called a Java Console, but it doesn't contain any information about errors.--Kotniski (talk) 09:43, 8 May 2009 (UTC)
 * Ah, IE6. I seem to remember that IE has problems with commas at the end of lists and dictionaries, so I removed them from your monobook. Can you try again, please? Amalthea  09:49, 8 May 2009 (UTC)
 * It worked!! That's brilliant, thanks! Would it make sense to make that code change in the instructions for downloading that script? (I mean, will it break anything in other browsers to do it that way?)--Kotniski (talk) 09:57, 8 May 2009 (UTC)
 * Sure, go ahead, it won't break anything. Amalthea  10:10, 8 May 2009 (UTC)

Most Frequestly Used scripts section
would ^^that be possible? Kwiki (talk) 07:51, 10 May 2009 (UTC)

Please test my NICE interface modification
I've been working on a tool with some of my lab-mates. It makes a minor modification to the UNDO interface. We are trying to do a proper study of it to see if it actually helps or not. If you would be willing to give it a try, you can find more information here.

If you have questions, suggestions or comments, please feel free to contact me. --E poch F ail (talk 18:50, 5 June 2009 (UTC)

wiki gold trophy article voting
how do you include the voting system in an article ? —Preceding unsigned comment added by 92.143.4.107 (talk) 15:10, 6 June 2009 (UTC)

JS on user page
This may be naive/stupid since I know next to nothing about actually implementing javascript, but I gotta ask - is there anything stopping me from writing a bar.js page and importing that into my user page only, for example? There are the obvious ethical reasons concerning malicious scripts and other visitors, but is there a technical reason it just doesn't happen? Again, sorry if this is dumb, just checking. ~ Amory (talk) 21:40, 6 June 2009 (UTC)
 * There's nothing stopping you from creating a bar.js page, and using it for yourself, but it would never be executed (run) for anyone except yourself. All Javascripts that you want your account to run must be placed in your User:Yourusername/skinname.js file - this is usually monobook.js, as that is the (default) most common skin. Any Javascript in that file, or imported by that file, will be run on all pages for your account. It won't be run for anyone else, unless they also add the script to their page (you can't edit other user's .js files unless you are an administrator). Hope that answers your question. A le_Jrb <sup style="color:blue;">talk  16:45, 7 June 2009 (UTC)
 * Not quite, but I solved it, thanks. Putting importScript('User:foo/bar.js'); on a page does (thankfully) nothing. ~ Amory (talk) 18:04, 7 June 2009 (UTC)
 * Like I said: if you want it to run, you have to put it in your monobook.js file. Obviously, you can't add it to any page and get it to run for everyone :D. Either way, glad you sorted it. A le_Jrb <sup style="color:blue;">talk  11:29, 8 June 2009 (UTC)

Are these only compatible with Wikipedia or can they be used with other Wikis too?
Can these be used with other wikis that are not part of the Wikimedia Foundation? <font face="Courier New" color="black">Xhaoz <font face="Courier New" color="darkred">Talk  &bull; <font face="Courier New" color="green">Contribs  23:07, 27 June 2009 (UTC)


 * It depends entirely on the script. Many would work by copying/pasting onto a user subpage on a different wiki and adding the appropriate importScript. Some, like wikiEd, work via Greasemonkey and can be set to work on any MediaWiki installation. Others are specific to Wikipedia installs. --Odie5533 (talk) 01:53, 28 June 2009 (UTC)
 * And it also depends entirely on the Wiki. On the version of MediaWiki being used, what MW extensions are installed and what MW extensions are not installed that are on Wikipedia, many many variables. Trial and error is your only man. Try out a script, see if it works. Maybe ask the author for help tweaking it if it doesn't work at first. <sub style="font:bold 14px arial;color:#f27;">ɹəə pıɔnı  02:58, 28 June 2009 (UTC)
 * Skins are also a factor; different skins use different IDs, HTML tags, etc. It also matters if the API is enabled on that specific wiki.  If it isn't, you can pretty much forget about using, say, 30–40% of scripts that work here.  As Lucideer said, trial and error is your only man. —<b style="color:#002BB8">Animum</b> (talk) 00:03, 12 July 2009 (UTC)

Quick Preview / QPreview
Is the linked version not superseded by user:js/ajaxPreview? The linked version was last edited in 2007, the Js version was edited in April 2009. --Ysangkok (talk) 15:41, 19 July 2009 (UTC)

Reword script
I made a script to make direct in-article edits of short phrases. A slightly better explanation can be found at User:M/Reword. Feedback would be appreciated, since I haven't tested it enough. Where should this script be added? I've also seen some errors where it seems that the scripts are being loaded out of order. How do I ensure correct loading order using importScript? <i style="position:absolute;z-index:-1;bottom:0;width:2.2em;height:8px;background:#eee;"> </i> M   23:30, 20 July 2009 (UTC)

Script working in areas
Would someone mind, please, figuring out how to get User:MarkS/extraeditbuttons.js working in other namespaces besides User and User talk? That's the only 2 places it will work currently. allstar ▼ echo   09:01, 9 August 2009 (UTC)

Historical text highlighting wiki gadget
I'm sure many of you caught the news article about Adler and Alfaro's research in wiki trustability being applied to live Wikipedia. It just so happens that I have been working on a similar problem from a completely different direction during my research and am ready to share this work with the community. I have designed and implemented a user script modification that I call HAPPI and am currently running a non-profit/academic analysis of its usefulness. The script adds a couple of new controls that will appear over the edit pane. These controls will allow you to toggle the highlighting of wiki text while you edit it (like WikEd), but rather than syntax highlighting, HAPPI's highlighting gives you insight into how content has persisted through the history of the article. If you'd like to give it a try, please see the documentation page for more information. --E poch F ail (talk 17:51, 23 September 2009 (UTC)

<br stye="clear:both;" />

How-to install user scripts page and maybe template needed
I think user script pages all need a friendly - for help installing user scripts please see ___ which sends them to a basic page on how users can install them. An example is here. Similar to the documentation for how to use a template. It seems basic to those writing these but I think may inspire more users to try using them. A template covering multiple issue may be best and could have a drop down list of all active scripts or even a link to a list of them as well as including many of the links on the project page. -- <u style="font-size:14px; font-family: cursive;color:#8000FF">Banj e <u style="font-size:14px;font-family: Zapfino, sans-serif;color:deeppink">b oi   23:17, 26 November 2009 (UTC)


 * Yes, we can automatically add a link to a general script help page from the top of all .js and .css pages in user space. And that seems like good idea. Technically that link would be put in the MediaWiki:Clearyourcache system message.
 * The help page should probably tell more than just how to install scripts. But I don't think it should list the available scripts, instead it should simply have a link to WikiProject User scripts/Scripts which is the page for that.
 * This project has some help pages, but I don't know if any of them fit as target for such a help link.
 * And a related thing: We are just about to add automatic detection of script documentation pages, see the next section about that.
 * --David Göthberg (talk) 15:02, 14 December 2009 (UTC)

Script documentation
We are about to deploy automatic detection of script documentation pages. All .js and .css pages will automatically show a box with a link to their doc page, if a doc page exists. See MediaWiki talk:Clearyourcache, script doc auto and Template talk:Script doc auto if you want to discuss this.

--David Göthberg (talk) 15:02, 14 December 2009 (UTC)

Script request?
I was wondering if it would be possible to write a script with the purpose of closing Requested move discussions. Could anyone familiar with that page let me know if it can be done? – Juliancolton  &#124; Talk 01:37, 17 January 2010 (UTC)
 * Technically speaking, the correct place for this is WikiProject_User_scripts/Requests. For the script, yes, it could be done. What exactly do you want it to do? Handle the actual moving, or just add the relevant templates on the talk page? Be specific! :D A le_Jrb <sup style="color:blue;">talk  11:54, 17 January 2010 (UTC)
 * Ah, didn't know that page exists. Oh well. :) I'd like it to be able to preform the move and take care of the talk page templates as well ideally. – Juliancolton  &#124; Talk 16:20, 17 January 2010 (UTC)
 * Fair enough. I'm quite busy at the moment, but unless someone else does, I'll look into writing this. A le_Jrb <sup style="color:blue;">talk  18:48, 17 January 2010 (UTC)

Deleted code won't go away
I have a clock on the corner of all pages similar to User:Davidgothberg/clock. Thing is, my monobook.js has been blank since August. I've purged it a few times and nothing's happened. It even shows up on other computers. I like having it there, but I want to change it slightly and can't figure out how it's showing up. What can I do to make it go away so I can replace it with the slightly modified clock I want? &mdash; <span style="font-family: Kristen ITC, Comic Sans MS;">User:ACupOfCoffee@ 18:55, 21 February 2010 (UTC)
 * It's not there on my preferences page. Weird. &mdash; <span style="font-family: Kristen ITC, Comic Sans MS;">User:ACupOfCoffee@ 18:58, 21 February 2010 (UTC)
 * Never mind. I see now that it's a gadget. &mdash; <span style="font-family: Kristen ITC, Comic Sans MS;">User:ACupOfCoffee@ 18:59, 21 February 2010 (UTC)

My extension to Navigation popups
Can somebody please try my "History reviewer", if it might be usefull to other users? Thanks.. 2 april boy<sup style="color:orange;text-shadow:1px 1px green"> talk 11:06, 6 February 2010 (UTC)

editing links at the top
I'm trying to edit the links at the top of my monobook on wikisource (not here, yet)&mdash;see s:User:Spangineer/monobook.js. For example, change "my talk" to "talk", add links to frequently used user pages, etc. I have code in my wikipedia monobook that does this, but after removing some things that I didn't need I couldn't get it to work again. I looked on this page but didn't see a script that does what I want; can I get some help? --Spangineerws (háblame)  05:40, 16 February 2010 (UTC)

Good news for devs
Wikipedia_talk:WikiProject_User_scripts

Could someone add this nice "back to top" script to the list?
I stumbled upon this and liked it very much, I think it should be on this list. WP:Back to top. But I don't know anything about .js so I am not comfortable making the edit myself.

Thanks. Andrew Gradman talk/WP:Hornbook 05:32, 25 April 2010 (UTC)
 * Why is it an essay, and why do you say you don't know JavaScript if you're the one that created the script? Unless it was copy-and-pasted from somewhere else? <font face="Verdana"> Gary King ( talk ) 06:10, 25 April 2010 (UTC)
 * Yeah, I copy-and-pasted it from here. And I made it an essay because I only found out about this page today. Andrew Gradman talk/WP:Hornbook 06:21, 25 April 2010 (UTC)
 * I don't know about other people, but I have always used CTRL+Arrow Up to get to the top of the page. It's always more convenient, at least for me, to type out a keyboard shortcut than it is to find a link with the mouse and click on it. <font face="Verdana"> Gary King ( talk ) 06:37, 25 April 2010 (UTC)
 * Generally I agree with you (as does the first hit in a google search for back to top.)
 * On the other hand, this article points out that "not every user is aware of" the keyboard shortcut you described.
 * On Wikipedia, there's a particularly strong consideration in favor of the button: the need to jump to the top of an article often occurs after the reader has clicked on a link in the table of contents.  At that point, their hand is already on the mouse.  If you simulate this yourself, you will see that it is faster to push the mouse over to the "back to top" button, than it is to move the hand back to the keyboard and hit the key-combination you described -- especially for a right-handed person. Andrew Gradman talk/WP:Hornbook 06:49, 25 April 2010 (UTC)
 * In cases like that, which is a situation that I find myself in quite often, I just right-click -> "Go back" to go back to the TOC. <font face="Verdana"> Gary King ( talk ) 06:54, 25 April 2010 (UTC)
 * Well look -- I'm really glad you're telling me this, because I agree that your suggestions are better habits, and I am going to starting doing them myself. But I still believe that a "back to top" button is something that's widely desired by many people -- amateurs perhaps :) -- and should be made available for those people, as an opt-in.  Andrew Gradman talk/WP:Hornbook 07:02, 25 April 2010 (UTC)

Can someone take a crack at this? user:Agradman, editing for today as 160.39.222.133 (talk) 16:46, 28 April 2010 (UTC)

Smart quotes
Since the majority can’t be convinced to prefer typographic quotation marks in WP:MoS, I’m now using a slightly adapted version of User:Werson/smartQuotes.js to autoconvert straight quotes for display. Although it seems to work so far, perhaps someone can come up with a cleaner version. — Christoph Päper 21:28, 2 March 2010 (UTC)

Project tagging user script
Hi, I posted at Bot_requests about a project tagging user script; perhaps someone who knows about user scripts could respond there? Rd232 talk 16:48, 16 March 2010 (UTC)

Script purger for developers
I've created a script at User:Manishearth/purger, which allows developers to put the scripts that they want to test in "Purge mode", where the script will be forcibly fetched from the servers, bypassing the cache. This saves devs the time and bandwidth of bypassing their entire cache and re-downloading the Wikipedia scripts and CSS. Manish Earth Talk • Stalk 04:36, 24 March 2010 (UTC)

Menubook
I've created a new script that modifies the default Monobook skin by moving all of the navigation features to drop down menus at the top of the page. I'm looking for beta testers and for general feedback. You can check it out at User:Bradv/Scripts/Menubook. <font style="color:#C60;font-family:Georgia, serif;font-size:90%;font-weight:bold;">Brad 17:36, 17 April 2010 (UTC)
 * Mind providing a screenshot on the page? <font face="Verdana"> Gary King ( talk ) 17:53, 17 April 2010 (UTC)
 * Done. <font style="color:#C60;font-family:Georgia, serif;font-size:90%;font-weight:bold;">Brad 18:31, 17 April 2010 (UTC)

User:PleaseStand/prevnext.js
I have recently written the above script, which adds back-and-forth links to the top of each page similar to mw:Extension:Back-and-Forth, which is already used on at least one Wikipedia fork. It is based on User:PleaseStand/wikiapi.js, yet another API wrapper, which I hope I can eventually develop into a usable bot and user script framework. No problem with Firefox, but I doubt that it is compatible with Chrome because the order of an object's properties is not guaranteed, showing incorrect links if the current page does not exist. To me, this represents a serious shortcoming of the JSON output when used with a standard JSON parser or JavaScript interpreter. Is there any better way to fix this than alphabetically comparing the returned page titles to see which one is closer if the current page does not exist? Also, is it OK to combine the two queries, making use of allpages as both a generator and a list, and then encoding the URL on the client side? Of course, I could query allpages twice as a list and encode the URL client-side. I would like a second opinion to make sure I am not missing something. PleaseStand (talk) 23:06, 3 May 2010 (UTC)
 * What query do you have in mind, for example? Amalthea  11:31, 6 May 2010 (UTC)
 * The current queries are (changed from format=json to format=jsonfm so you can see the results):
 * http://en.wikipedia.org/w/api.php?format=jsonfm&action=query&generator=allpages&gapnamespace=0&gapfrom=Coca-Cola&gapfilterredir=nonredirects&gaplimit=2&prop=info&inprop=url&maxage=600&gapdir=ascending
 * http://en.wikipedia.org/w/api.php?format=jsonfm&action=query&generator=allpages&gapnamespace=0&gapfrom=Coca-Cola&gapfilterredir=nonredirects&gaplimit=2&prop=info&inprop=url&maxage=600&gapdir=descending
 * The "one query" I am considering changing it to would be:
 * http://en.wikipedia.org/w/api.php?format=jsonfm&action=query&generator=allpages&gapnamespace=0&gapfrom=Coca-Cola&gapfilterredir=nonredirects&gaplimit=2&gapdir=ascending&list=allpages&apnamespace=0&apfrom=Coca-Cola&apfilterredir=nonredirects&aplimit=2&apdir=descending&maxage=600
 * The main disadvantages with the current queries are that two are required and I probably still need to add some code to get it to work correctly in Chrome (which would be needed even for the "one query"). Using gaplimit=1&aplimit=1 and the query-continue strings would not be an improvement because it would give incorrect results in all browsers for a non-existent page. PleaseStand (talk) 20:39, 6 May 2010 (UTC)
 * Ah, now I see what you mean with the first part of your question. What you can do is add the additional parameter  to your query (like this) which extends the JSON object by an ordered array of page ids that you can use to index the object. By the way, if possible you should avoid using   for such iterations anyway since objects, even arrays, may get additional properties by some library or another, which can break your code if you don't account for it. Prototype does this, for example. I haven't looked into optimizing your queries.  Amalthea  15:27, 10 May 2010 (UTC)
 * OK, I have changed that. I am going to create a new code snippet to add to all my scripts so that I can do away with the for...in kludges; having a script fail when something is called   is not perfection. It's a shame that JavaScript does not support real associative arrays (including preservation of the order of insertion). PleaseStand (talk) 22:32, 10 May 2010 (UTC)

Fix delsort to work on Vector skin
Could an admin please fix WikiProject Deletion sorting/delsort.js per User talk:John Vandenberg before tomorrow's Vector rollout? PleaseStand (talk) 11:12, 12 May 2010 (UTC)
 * Wow. I didn't realise that the rollout was so soon.  I'll get right on it. John Vandenberg (chat) 11:48, 12 May 2010 (UTC)

Subpage search
Why does my script User:PleaseStand/Subpage search not work correctly with the new search box? It works perfectly when the button is clicked, but it doesn't when the return key is used. PleaseStand (talk) 02:20, 31 May 2010 (UTC)
 * Pressing Return while having the suggestions open doesn't just submit the form anymore. Note that your script still works if you type something, then press Escape to get rid of the suggestions, and then press Return. Amalthea  09:13, 31 May 2010 (UTC)
 * Is there a way my script can automatically turn off the suggestions when the box is checked since they are not needed? PleaseStand (talk) 16:07, 31 May 2010 (UTC)

Page Views
Excuse me if this is an easily answered question, but is there a script that allows one to add a "Page views" link to the toolbox section in the left sidebar? User:Dr pda/prosesizebytes.js adds a "Page size" link over there, so I know adding a link is possible, but I haven't been able to find any page view scripts from this WikiProject.. http://stats.grok.se/ shows page view statistics for any page on Wikipedia, so I was wondering if it was possible to tap into this system with a script. --Dudemanfellabra (talk) 20:56, 14 June 2010 (UTC)
 * Even better would be a general purpose script that would add something to the sidebar, and allow a custom title and link that can take full or basepagename as an argument. – xeno <sup style="color:black;">talk 20:59, 14 June 2010 (UTC)
 * Well, this link would be a little more complicated because it needs a month as well (i.e. June 2010 = 201006) to create a proper link. Just giving the page name wouldn't suffice. --Dudemanfellabra (talk) 21:01, 14 June 2010 (UTC)

You're on your own for getting the month to update dynamically ;p – xeno <sup style="color:black;">talk 21:05, 14 June 2010 (UTC)


 * I figured out how to do it:


 * I didn't know it was that easy to get the page name haha. Thanks! --Dudemanfellabra (talk) 21:17, 14 June 2010 (UTC)
 * You can thank Mr.Z-man, whose shoulders I stood on =) – xeno <sup style="color:black;">talk 22:13, 14 June 2010 (UTC)

Extra Toolbar Buttons
I created a new script that adds strike, horizontal line, HTML comment, and math buttons to the enhanced editing toolbar. The script is here and the documentation is here. I was wondering if the project would find it useful. ~ Nerdy Science Dude  (✉ • ✐) 19:02, 17 June 2010 (UTC)
 * Might be a bit redundant to User:MarkS/Extra edit buttons. – xeno <sup style="color:black;">talk 19:05, 17 June 2010 (UTC)
 * That script is for the old toolbar; this one is for the new enhanced one. This script adds the missing buttons the old editing toolbar had by default, with new icons. ~ Nerdy Science Dude  (✉ • ✐) 19:11, 17 June 2010 (UTC)
 * Pay no attention to the man behind the curtain! – xeno <sup style="color:black;">talk 19:12, 17 June 2010 (UTC)
 * You can try it out if you want; the vector skin is not required. ~ Nerdy Science Dude  (✉ • ✐) 19:18, 17 June 2010 (UTC)
 * It looks like the script requires jQuery? Isn't that where the $j and .ready comes from? <font face="Verdana"> Gary King ( talk ) 20:28, 17 June 2010 (UTC)
 * Yes. Vector's scripts use jQuery as well. Amalthea  20:56, 17 June 2010 (UTC)
 * So, I don't get why it would work outside the Vector skin if it requires jQuery, which seems to only be loaded in Vector? <font face="Verdana"> Gary King ( talk ) 21:12, 17 June 2010 (UTC)
 * Ah, right, the extended toolbar is independent of Vector. It actually depends on your preferences whether you load jQuery. You get it if you use vector, but also if you turn on e.g. the extended toolbar or the live preview function. Amalthea  21:19, 17 June 2010 (UTC)
 * It should work just fine in Monobook if the enhanced editing toolbar is enabled; I just tested it. Enhanced editing toolbar scripts use jQuery. User:Mr.Z-man/refToolbar 2.0.js is another enhanced editing toolbar script that uses jQuery. ~ Nerdy Science Dude  (✉ • ✐) 21:33, 17 June 2010 (UTC)

I just added blockquote and transclude buttons to the script. Any objections to adding it to the script page? If there aren't, I will add it. ~ Nerdy Science Dude  (✉ • ✐) 00:45, 25 June 2010 (UTC)
 * since no major objections have been raised. In case anyone was wondering, the documentation for enhanced editing toolbar scripts can be found here. ~ Nerdy Science Dude  (✉ • ✐) 17:11, 26 June 2010 (UTC)

On a side note, is enabling "Enable navigable table of contents" supposed to do anything? I don't see anything different in the edit page when enabling that and hard refreshing. <font face="Verdana"> Gary King ( talk ) 23:17, 17 June 2010 (UTC)

Reduce edit page clutter?
Is there a script which cleans up the disclaimer text and other junk on the Edit page? I know this is in the development pipeline for the usability update, Citron, but I figured someone might have cleaned up the page themselves. Thanks>> Ocaasi (talk) 03:39, 24 June 2010 (UTC)

Batch processor
Hello. Does JavaScript possess capabilities to implement batch processing of articles? I have interest is tasks such as: for all pages from given category follow the language interwiki and add there given new category (as in HotCat). Semi-automated processing would be especially useful. Incnis Mrsi (talk) 13:31, 20 June 2010 (UTC)
 * It's best to use WP:AWB for something like this. <font face="Verdana"> Gary King ( talk ) 16:32, 20 June 2010 (UTC)

Security
Isn't importing scripts a security risk? An attacker who compromised a user script developer's account could change the Javascript to sneakily change parts of the Mediawiki UI, to, for example, direct you to a phishing site. (Not sure what the potential damages of this are.)--greenrd (talk) 08:09, 30 September 2010 (UTC)
 * It can be; however, many of the scripts are hosted by administrators, in which case there's no real risk as administrators could do that anyway. (I know I once moved a script from my non-admin sockpuppet to my main account in order to fix that potential issue.) --ais523 13:00, 30 September 2010 (UTC)

12-hour clock
Pardon me if I'm asking in the wrong place, but does anyone know how I might be able to view revision-history pages with a 12-hour clock, rather than the standard 24? -- WikHead (talk) 00:36, 28 November 2010 (UTC)
 * Add this to your user javascript and let me know if it works (only tested in Firefox 3.6.16):
 * — Bility (talk) 01:50, 6 April 2011 (UTC)
 * — Bility (talk) 01:50, 6 April 2011 (UTC)

Thank you very kindly Bility! This script flawlessly performs the exact function outlined in my original post (above), and does so using an entirely different browser. I'm impressed :) -- WikHead (talk) 18:35, 7 April 2011 (UTC)
 * Thanks, I'm glad it does what you needed. I plan to update it with handling for histories with a single revision and histories on pending changes articles, so if I break it just drop me a talk page message. Cheers, — Bility (talk) 19:08, 7 April 2011 (UTC)

"Is a gadget?" column
I added an "Is a gadget" column to the main table, which has been reverted. The idea was that if someone decides they just want to install one or two scripts which happen to be gadgets, there is then a very easy way to do that. It is not meant to promote the idea that all user scripts should become gadgets. I can see that using red and green colours for the yes and no boxes does kind of imply this, but that was not my intention. Would it be acceptable without the colours?--greenrd (talk) 16:06, 2 October 2010 (UTC)
 * I suggest adding a link in the description instead. Such as "For the gadget version, click here." Gary King  ( talk  ·  scripts )  00:09, 3 October 2010 (UTC)
 * I don't think there are specific links available for gadgets - they're all on one page in the Preferences. But yes, I could link to the same page each time, I suppose. It's just that having it as a separate column makes it more visible, making it more likely that both skim-readers and editors will notice it.--greenrd (talk) 07:42, 3 October 2010 (UTC)
 * Only a small number of scripts are gadgets and we should try to keep it that way. Adding a column will only seem to imply that we should try to fill it up for all scripts, which is not the case. Gary King  ( talk  ·  scripts )  19:10, 3 October 2010 (UTC)
 * I agree that the extra column is a bit much. Having a link in the description seems sensible. Plastikspork <sub style="font-size: 60%">―Œ <sup style="margin-left:-3ex">(talk)  19:37, 3 October 2010 (UTC)

Here comes another toolbar script...
This one is more complex than the first one. It's EmoteToolbar, a script I just made. It adds an Emoticons section to the enhanced editing toolbar. Just like the other one, vector is not required to use it. Does anyone think it would make a great addition to the user scripts page? ~ Nerdy<font color="#0F0">Science <font color="#8d7">Dude  (✉ • ✐ • ✍) 20:56, 30 June 2010 (UTC)
 * You can add it if you want, so that you share it with others. However, I think the general consensus is that people prefer to see fewer emoticons since they are distracting, add to page load times, etc. Gary King  ( talk  ·  scripts )  22:03, 30 June 2010 (UTC)
 * I like emoticons & smilies Face-smile.svg  f<i style="color:#0dd;font-size:60%;">red</i>g<i style="color:#0dd;font-size:60%;">andt</i>  03:39, 20 November 2011 (UTC)

No statements
Why are we encouraging people to declare variables without using ? (See for example WP:POPUPS.) This is adding more variables into the global scope, which isn't good programming practice. — mc10 ( t / c ) 23:06, 4 April 2011 (UTC)

Right-click menus
I have recently created a set of javascript tools for showing different right-click menus on Wikipedia pages and the edit textareas. One of the useful component of it is a way to identify the wiki-text corresponding to selected text on a Wikipedia article. This has enabled making of the menu item "edit this text", clicking which upon selecting a portion of an article text opens up the edit form with the corresponding text in the textarea selected. This also has let to direct query of selected text on WikiBlame. The menu on right-clicking textarea can also show a floating and dragble panel with customizable murkups & symbols. A couple of screenshots attached.

The complete documentation: User:Subh83/JavaScriptTools/RightclickMenus

Before I add this script to the list on this page, it will be good to have some feedback on the script, and also suggestion regarding the appropriate category under which to add the script.

- Subh83 (talk &#124; contribs) 21:05, 19 May 2011 (UTC)


 * Added it under "Links/shortcuts" section. - Subh83 (talk &#124; contribs) 15:00, 20 May 2011 (UTC)

common.js
The script page Special:MyPage/common.js, which is always loaded regardless of which skin you have as your default, was introduced with MediaWiki 1.17 but appears not to be mentioned. In particular, it is important to know whether code on this page is executed before or after the skin-specific code at Special:MyPage/skin.js. -- Red rose64 (talk) 22:12, 18 July 2011 (UTC)
 * Common code is always executed before the skin-specific code. <span style="font-family:'Trebuchet MS',sans-serif"> — Edokter  ( talk ) — 00:22, 19 July 2011 (UTC)

Time between diffs
I just wrote User:Dudemanfellabra/diffs.js, using User:Gary King/minutes later for diff.js as a source. Gary King's script only works if the time between diffs is less than one hour, but my script will display the time out to days. It inserts a bolded, red span above the new diff containing the time. I've never written a script here before, so I don't really know where to add it or whatever I need to do with it. Thanks! --Dudemanfellabra (talk) 20:57, 2 July 2010 (UTC)

Editing pages with API
Hi. I think this section of the Techniques needs an update since now it can be done in much more elegant way using the API. I would also recommend importing to Wikipedia this wrapper. Editing a page with it is as simple as: No iframes, just GETs and POSTs. I think it could be useful to many script authors. Lampak (talk) 11:36, 6 August 2010 (UTC)


 * That section in the guide seems pretty outdated. You can use Ajax to edit a page now; no iframe necessary. Gary King  ( talk  ·  scripts )  17:21, 6 August 2010 (UTC)
 * So I've marked the section clearly as outdated. Lampak (talk) 08:23, 24 August 2010 (UTC)

Fork of Friendly
Hi, could someone help me? I need a fork for Esperanto Wikipedia of Friendly, but it should have a box in which type an argument. Then, the inserted template should be:  or also. Could someone help me? Thank you! --<small style="background:#f00"> → A ir  on  09:45, 24 August 2010 (UTC)

jQuery and custom user scripts
I see that at least the vector skin loads jQuery, is it possible to write a custom script which uses jQuery functions? And if so which ones? Can I use $(document).ready? -- Eraserhead1 &lt;talk&gt; 22:56, 18 September 2010 (UTC)
 * Monobook seems to use jQuery, too. I never noticed this. Is this new? Gary King  ( talk  ·  scripts )  05:24, 19 September 2010 (UTC)
 * jQuery is live at least since October (25419). Helder 20:10, 19 November 2010 (UTC) —Preceding unsigned comment added by Helder.wiki (talk • contribs)
 * This query was made before October :) Gary King  ( talk  ·  scripts )  01:45, 20 November 2010 (UTC)
 * Good thing I checked back :). I'll give it another shot sometime. -- Eraserhead1 &lt;talk&gt; 20:43, 27 November 2010 (UTC)

Discussion at Wikipedia talk:Spoiler may be of interest to scripters
At the moment there is an RFC at the spoiler guideline talk page that may be of interest to scripters because it's a proposal to make a small change to the layout of the Vector skin, probably to insert a link to the site Disclaimers into the sidebar so that it will be more prominent--currently it's only linked from the page bottom.

I expect that this would be achieved by having Mediawiki:Vector.js inject the link into the appropriate place. This may (or may not) have implications for scripts that make assumptions about the layout of the vector skin. --TS 23:07, 7 October 2010 (UTC)

Enhanced toolbar dialog help
On Wikisource I've been fiddling around with an attempt to make a script which automatically links pages in indices here. I've made a pared down copy of the link tool, the source of which can be found here. But it isn't appearing, and on closer inspection with webkit inspector, it has  applied to it. I would guess that there's some sort of test suite which causes that on failure. Haven't been able to find anything about it though. Anyone know any more? Prosody (talk) 19:45, 19 November 2010 (UTC)
 * Nevermind, I was looking at a way older version of jquery.wikiEditor.toolbar.js. Prosody (talk) 23:00, 19 November 2010 (UTC)

Still: How to use user script?
Could anyone explain it in the most simple way? I carefully read all relevant docs but still didn't get a clue.

Having a page 1: http://ru.wikipedia.org/wiki/Участник:Neolexx/MyCopyrightLawyer.js with a single code line window.alert('OK');

Having a page 2: http://ru.wikipedia.org/wiki/Участник:Neolexx/MyCopyrightLawyer

How to make the page 2 to display 'OK' message onload? NeoLexx (talk) 20:21, 27 November 2010 (UTC)

Country demonym navbox generators
If someone knowledgeable about how to work template coding could help fix the country demonym navbox generators, it would be greatly appreciated. At the moment, the existing country demonym navbox generators are Template:African topic, Template:Asian topic, Template:European topic, and Template:South American topic, but Template:North American topic and Template:Oceanian topic should be created as well. Template:Asian topic is currently up for deletion because it duplicates the functionality of Template:Asia topic even though that is not what it is supposed to do. The country demonym navbox generators are supposed to be the demonym counterparts of the country name navbox generators (ie. Template:Africa topic, Template:Asia topic, Template:North America topic, Template:South America topic, Template:Oceania topic, and Template:Africa topic). While the country name navbox generators create navboxes that create strings like "History of Canada" and "Culture of Iraq", the country demonym navbox generators are supposed to create navboxes that create strings like "Canadian literature" and "Iraqi cuisine". Nonetheless, the country demonym navbox generators have never worked because no one knowledgeable about the code has ever fixed them. If anyone would be willing to take on this task, it would be greatly appreciated. These navbox generators have the potential to make a substantial improvement to navigation between related articles on international topics. Neelix (talk) 16:01, 13 December 2010 (UTC)

Member activity
What is going here? Please remove members there are not anymore here in Wikipedia. Who response the script requests? --Perhelion (talk) 22:48, 3 January 2011 (UTC)
 * Anyone can write any script they want - sometimes, helpful people will write scripts on behalf of people who post here. No one is obliged to either way. A le_Jrb <sup style="color:blue;">talk  19:38, 4 January 2011 (UTC)

Regex problem
I wrote the script User:Jujutacular/closeFPC to close featured picture candidates. I'm currently having a problem with one my regular expressions. I'm using the code:

The code should remove the transclusion of the nomination from the list at WP:FPC. Normally the code works fine, but whenever the nomination page title includes parentheses, the code fails. Anyone know why this may be happening? (P.S. I'm not very experienced in scripts, so my apologies if this is a dumb question)  Jujutacular  talk 22:13, 4 January 2011 (UTC)
 * Parentheses are used in JavaScript regexes to denote capturing groups. If you only need to replace the first occurrence of a text string case-sensitively (as your example seems to suggest), you could just use  If you need a case insensitive search, the ability to replace multiple instances of the substring, or something else regex offers, you could try the approach used by Lupin's tool (search for  ) or one that lists the specific characters to be escaped, and then set the appropriate flags ("g", "i", or "gi" as documented at MSDN). PleaseStand (talk) 00:24, 5 January 2011 (UTC)
 * Thank you, that works perfectly.  Jujutacular  talk 01:17, 5 January 2011 (UTC)

Firebug console doesn't work here - why?
Hello, I'm trying to start making a user script. To begin doing that, I'd like to try out some parts in the Firebug console. But anything I try, even alert("Hello");, has no effect. It works on other sites, but not here. What is Wikipedia doing to prevent Firebug from working, and how can I fix it?

Thanks! -- Ken_g6 (factors &#124; composites) 23:26, 8 January 2011 (UTC)
 * It works here. I just tested it. Gary King  ( talk  ·  scripts )  23:40, 8 January 2011 (UTC)
 * OK, I just disabled a bunch of add-ons and now it works. Now I gotta track down which one it was...(edit) and it's NoScript, even though all scripts are enabled.  Time to file a bug or something. -- Ken_g6 (factors &#124; composites) 06:29, 9 January 2011 (UTC)
 * And resetting the settings fixed it. Thanks for the non-bug report! -- Ken_g6 (factors &#124; composites) 06:47, 9 January 2011 (UTC)

HideTopContrib in all skins and IE works
Just a note to mention User:Markhurd/hidetopcontrib.js now works for all skins (so it is safe to put importScript('User:Markhurd/hidetopcontrib.js'); in your common.js) and the problem Internet Explorer had with new pages has been fixed. Mark Hurd (talk) 06:01, 7 February 2012 (UTC)

OpenOffice.org Calc to MediaWiki
Is there any way to convert OpenOffice.org Calc spreadsheets into MediaWiki format? Most of the tools I've seen on Wikipedia are for OpenOffice.org Writer. Allen (talk) 01:52, 16 March 2012 (UTC)

[Wikitech-l] [ResourceLoader] JavaScript may break on your wiki: Fix it before that happens
Cross posting this from the mailing lists. the wub "?!"  10:16, 12 February 2011 (UTC) Greetings,

As you may know, the Wikimedia tech team has started to upgrade MediaWiki on some wikis. MediaWiki is the software that runs all Wikimedia wikis.

The most visible change for Wikimedia users will be the deployment of ResourceLoader.

ResourceLoader optimizes the use of JavaScript in MediaWiki, speeding up its delivery by compressing it sometimes, and cutting down on the amount of unused JavaScript that gets delivered to the browser in the first place. The installation of ResourceLoader may cause compatibility issues with existing JavaScript code.

Trevor Parscal and Roan Kattouw, the main developers of ResourceLoader, will be available on IRC on Monday, February 14th, at 18:00 (UTC) (all timezones), to answer questions and help fix issues related to ResourceLoader.

If you maintain JavaScript code on your home wiki, please attend. Don't wait until your wiki's JavaScript is all broken.

Please spread this information as widely as possible; it's critical to reach as many local JavaScript maintainers as possible.

Logs of the session will be published publicly.

-- Guillaume Paumier Product manager - Wikimedia Foundation


 * Is this going to effect maintainers of gadgets? Are gadgets going to load correctly or do they have to be changed in order to continue loading?


 * Is this going to effect vector.js javascript code? Is this code going to load correctly or do we have to change it in order to continue loading?

Endo999 (talk) 21:20, 12 February 2011 (UTC)

Infobox adder?
Is there any script or tool that allows one to add an infobox by just filling in fields with the code being generated automatically? – Connormah (talk) 01:21, 18 September 2012 (UTC)
 * That would be great. However, I don't know of anything that can do this. David  1217  What I've done 21:22, 23 September 2012 (UTC)

Talkback
Not directly a talkback, but please add a comment. ;-) <small style="font: 12px Courier New; color: #000000; display:inline;border:#009 1px dashed;padding:1px 3px 1px 4px;background-color:#fff">mabdul 22:24, 4 May 2013 (UTC)

My new articles script
Since the MediaWiki software doesn't seem to have anything to list the pages created by a user without hours of sorting through pages and pages Special:Contributions and past what can be found of what they created in the last month using Special:NewPages, does anyone know of a current userscript that does this? If not, I'd be happy to make one (and suggest some kind of incorporation on bugzilla into special:contribs). Thanks. Technical 13 (talk) 22:40, 15 May 2013 (UTC)
 * if you peek at the bottom of Special:Contributions, you'll notice a link "Articles created". there is no need to spend hours, and no need to write a new script. (it's not a part of mediawiki software - it's a toolserver tool). peace - קיפודנחש (aka kipod) (talk) 23:57, 15 May 2013 (UTC)
 * The only problem with that I have is the fact that Toolserver is only running at about 60% reliability based on my attempts to use it. :( Technical 13 (talk) 00:32, 16 May 2013 (UTC)


 * Toolserver really isn't too reliable. -- (T) Numbermaniac (C) 00:50, 16 May 2013 (UTC)
 * you are both correct, but i think it's a good assumption that these issues are temporary and will be fixed - most probably by migrating most of the functionality to media lab. if the suggestion is for helping with migrating this tool to medialab then all the power to you, but if the suggestion is to try and write some javascript tool that will sift through user contribution and distill "page creation" events out of it, i don't think it's the right thing to do. just my $.02, of course. peace - קיפודנחש (aka kipod) (talk) 15:14, 16 May 2013 (UTC)
 * I was thinking more along the lines of requesting it as a feature request to be added to Special:Contributions actually. Apparently, others thought it worthy of a bug report as well (tracked above).  In the meantime, I'm going try to write up a little userscript that will show up under "user contributions" labeled "user statistics" that will open up special:contributions for the user with only N pages showing. Technical 13 (talk) 15:55, 16 May 2013 (UTC)