Youtube

Go to The Main Page Add Youtube to favorite!

Wikipedia:WikiProject User scripts/Requests 

Shortcut:
WP:US/R

This page is for requests for new user scripts or help with modifications to existing user scripts. Please first look through the existing scripts and recently fulfilled requests. Also see Old unfullfilled requests.

Contents

Templates in edit toolbar

Something like this:
Image:Toolbar.pngTemplates

Cleanup
Deletion
Info box           
Nav box
User warnings
Maintenance
Disambig

Software


Taxobox
Chembox


Book
Film
Artist
Golfer

Choosing "Software", could add to edit box:

{{Infobox Software
| name = 
| logo = 
| screenshot = 
| caption = 
| author = 
| developer = 
| released = 
| latest release version = 
| latest release date = 
| latest preview version = 
| latest preview date = 
| operating system = 
| platform = 
| language = 
| status = 
| genre = 
| license = 
| website = 
}}

It's just an example. Is this possible? Mosca2 09:15, 12 May 2007 (UTC)

I think it's possible, but it would be pretty difficult. --ais523 14:36, 12 May 2007 (UTC)
Mr.Z-man might be able to help with that, he did make refTools. – ThatWikiGuy (talk | life | I feel like I'm being watched) 23:43, 2 May 2008 (UTC)

Wikipedia Suggest

If it's possible, it would be cool is someone could add another search bar below the normal one via a portlet modification to create a Wikipedia Suggest. I found this site and was wondering if anyone could write a script to incorporate it. Also, this site has some screenshots of script that perhaps (?) would be helpful. Thanks, thesublime514talk • 00:14, July 10, 2007 (UTC)

Notes to help with possibly making something like this: a search suggestions database query is available at <http://en.wikipedia.org/w/api.php?action=opensearch&search=URL%20encoded%20search%20terms>; this is what Firefox 2 uses for its search suggestions when searching Wikipedia from its own search box. The output's in JSON format. --ais523 16:53, 10 July 2007 (UTC)

Constructing templates and copy to clipboard

I have looked through available scripts and can't find anything quite like what I would like. It it exists already, a pointer would be great.

I would like to have added to popups a facility to construct useful templates. This might even be customizable; not sure. The idea is that when you mouse over a link, you have the option to create some standard templates that would be instantly placed into the clipboard. You could then paste them into comments or pages that you are editing. Here are examples.

  • When you mouse over a user link, there is an option to put "{{user|username}}" into the clipboard.
  • When you mouse over a diff link, there is an option to put "{{wp-diff|page=pagetitle|diff=diffid|oldid=oldid|title=diff}}"

I'm sure other useful possibilities could be given.

Once in the clip board, these could be pasted as required into whatever text you are writing at the time. -- Duae Quartunciae (t|c) 00:20, 21 July 2007 (UTC)

Great idea, I second this. – ThatWikiGuy (talk) 08:53, 27 May 2008 (UTC)

"Undo" button

Please make a script that will add a "Undo" button at the top when viewing articles. The button will undo the current edit, with out having to go though the edit screen. This would be very good for undoing vandalism... thanks! EvilHom3r 02:21, 7 August 2007 (UTC)

From the article page it's not clear how many last edits to undo. If you simply want to skip the eidt screen, I'm not sure but I think that Navigation popups and Twinkle can do that. P.S. Did you really need 3 edits to write your message? ∴ Alex Smotrov 03:15, 7 August 2007 (UTC)

Page edit alert

Hi, there. I was wondering if it is possible to create a user script (to be located on monobook.js) that enables a user to be alerted when a specific WP page gets edited (this would be the talk page of WikProject Olympics). A script that would work in the same way that when a user gets a "new message" alert whenever his/her talk page gets edited by other users. Can anyone help? Thank you. Parutakupiu 17:45, 8 August 2007 (UTC)

This would require additional requests to the server; what's wrong with simply checking your watchlist from time to time? ∴ Alex Smotrov 20:13, 8 August 2007 (UTC)
Perhaps a watchlist notifier is what you are looking for? It will display a message every time a watched page is edited. —Anas talk? 20:49, 8 August 2007 (UTC)

Whatlinkshere sorting

I suppose I'm not the first one to request this, but I would appreciate it greatly if a script that sorts entries in Special:Whatlinkshere is written or suggested. The required feature is bringing redirects to the top of the page, that is pages from the main namespace automatically tagged "(redirect)". The same goes for "(transclusion)" entries for templates. Additionally, entries can be also grouped by namespace at the end of the list. (I'm aware of scripts that add selection tabs, but as far as I know they do not provide sorting redirects and transclusions.) Súrendil 20:49, 12 August 2007 (UTC)

It's a great idea, but it can't be done correctly just with javascript. Any javascript tool will work only on the links that are already shown on the page. OTOH, it should be possible to fake this by listing links and transclusions separately using api.php. I'm not sure about redirects though. All in all, it would probably work best as a Mediawiki feature. Zocky | picture popups 08:41, 13 August 2007 (UTC)
Mightn't it just be possible to ask for the maximum (5000), and then assume that's everything and sort that? That would get around the problem with which links are already shown on the page. ais523 14:17, 13 August 2007 (UTC)

warning scrips

i am just wondering if a warning script that uses uw tags that will work on IE will be created or if there is one already where i can find it--AFUSCO 22:20, 20 September 2007 (UTC)

See user's permission status (administration, rollback, etc.) on User page?

I'd like to be able to see a user's permission status, such as if they are an administrator or have rollback permission, on their user page, if possible. Thanks! Gary King (talk) 22:39, 3 March 2008 (UTC)

I have a script which can show this for any user linked from the page, just need to polish and then publish it, probably next week. —AlexSm 23:00, 7 March 2008 (UTC)
I think that is already in Twinkle LegoKontribsTalkM 18:14, 25 August 2008 (UTC)

Script to count number of revisions in history of a page

So I know that I'm probably just overlooking something, but I've searched and I've searched and I can't find a script that will tell me the number of revisions in a page history. Basically, I'd like a simple little bit of text that looks like this to show up when I look at the history of a page:

From Wikipedia, the free encyclopedia
View logs for this page
There are xxx revisions in the history
(Latest | Earliest) View (newer 50) (older 50) (20 | 50 | 100 | 250 | 500)
For any version listed below, click on its date to view it. For more help, see Help:Page history and Help:Edit summary.
(cur) = difference from current version, (last) = difference from preceding version, m = minor edit, → = section edit, ← = automatic edit summary

In the two weeks or so that I've been an admin, I've had two near-heartstopping times when I've had to delete a couple of pages with revisions in the 1,000s to delete revisions and merge histories. At this rate, I'll be dead of a heart attack before the year is up, so a little script telling me how many revisions a given page has might save me from too much undue shock in the future. --jonny-mt 09:13, 9 April 2008 (UTC)

Only developers can delete pages with over 5000 revisions, by the way. (This was a measure added after a mishap with the WP:SANDBOX.) If that doesn't help, a script could fetch API information until a specified number of revisions is reached (e.g., if query-continue exists in this query, the page has more than 500 revisions). GracenotesT § 15:20, 9 April 2008 (UTC)
Umm... that's a lot of data to fetch. There is another way (someone suggested it on a tech village pump a while ago): 1) on history page click «Earliest», 2) in the bottom row (the very first edit) click «cur», 3) on the diff page look at the text «(NNN intermediate revisions not shown.)» and add 2 to that number. Let me know if you want a script that would do all this in one click. —AlexSm 16:10, 9 April 2008 (UTC)
Ah, that's a much better way. I thought having rvprop empty might be a less intensive database query, but there's still the bandwidth required to get the data back to the client. GracenotesT § 17:57, 9 April 2008 (UTC)

Warning history

Could a script be made that shows an editor the last warning level received by the editor whose talk page they are on? George D. Watson (Dendodge).TalkHelp 19:58, 17 April 2008 (UTC)

You mean like vandalism or other kinds of warning templates? Their use isn't strictly formal, and there really aren't any set "levels" for them. The easiest thing to do is just check the talk page history and see what warnings the user has already received. -- Ned Scott 05:56, 18 April 2008 (UTC)
Well, there's 1, 2, 3, 4 and 4im. If the talk page is used a lot the warning could be a couple of pages through the history. If it's not possible it's easy enough to do it like that but it would certainly make things easier. ...... Dendodge.TalkHelp 10:54, 19 April 2008 (UTC)

Help on a script I'm trying to make

I'm trying to make an assessment script, out of AzaToth's Twinkle RPP. Problem is, I don't know how to program the submit status, so I need a bit of help. Script is here User:Thisisborin9/assessmenttag.js, part of User:Thisisborin9/quickassessment.js Thanks! Thisisborin9sign here! 19:25, 23 April 2008 (UTC)

P.S. The script isn't working. I double-checked everything, but it won't execute it unlike the rpp. Thisisborin9sign here! 22:30, 23 April 2008 (UTC)
There is an assessment script at User talk:Outriggr/assessment.js. GregManninLB (talk) 22:36, 28 April 2008 (UTC)

Edit button for Infoboxes and Persondata

I would like to suggest a new Gadget to add a plus sign or edit button to to infoboxes and persondata templates. This would allow that infobox or persondata template to be modified more easily than opening up the whole page or section.--Kumioko (talk) 16:50, 24 April 2008 (UTC)

This would be pretty hard to do, as such boxes may or may not be templates, or may even be partially formed from templates, or might be templates only in outline and contain all the useful formatting as parameters in the template call, and there is no way for the script to tell which are templates and which are not, without duplicating the parser itself. --Splarka (rant) 20:42, 25 April 2008 (UTC)

Purging subpages

I tagged Ecuador category talk pages with Template:WikiProject Ecuador to place the categories in Category:Category-Class Ecuador pages. This also placed the categories in Category:WikiProject Ecuador articles. Categories are not articles, so I modified Template:WikiProject Ecuador to fix this. The categories still appear in Template:WikiProject Ecuador. One way to fix this is to, for example, open each category page and save them to purge the page. That takes a lot of time. Is there a script that can purge each page listed in Category:Category-Class Ecuador pages so that I don't have to open up each category page and save? Thanks. GregManninLB (talk) 22:25, 28 April 2008 (UTC)

This sort of thing should probably be asked at WP:BOTREQ. Taking care of it, though. Gimmetrow 22:42, 28 April 2008 (UTC)
Done. 183 pages purged in category, image and project talk space. Gimmetrow 23:00, 28 April 2008 (UTC)
I followed up here. GregManninLB (talk) 01:58, 29 April 2008 (UTC)

Multiple watchlists

  • A pull down menu which replaces the my watchlist link, to add multiple watchlists using Special:RecentChangesLinked and the orginal Special:Watchlist.
  • A pull down menu which replaces the watch this page radio button and adds the page to the selected page, in a new tab/window.
  • Oh, and it could be like a tab (replaces watch/unwatch) and a pulldown menu for the Watch this page radio button on the edit forms, if thats posssible. (quote from original text)
  • Notification (like when someone edits your talk page), if possible.

Example; Lets say the watchlist is at User:ThatWikiGuy/deletions and the page to be watched WP:AfD

Original watchlist
General watchlist
XfD
Add/Remove watchlists

They can add/remove watchlists at Special:Mypage/watchlists.js. —Preceding unsigned comment added by ThatWikiGuy (talkcontribs) 00:01, 3 May 2008

Personally, I dislike the idea of making an edit each time you add or remove a title from these additional "watchlists". I suggest you use additional sockpuppet accounts or maybe try gWatch on toolserver. —AlexSm 03:10, 3 May 2008 (UTC)
OK but can I have my watchlist redirect to gWatch? – ThatWikiGuy (talk|I feel like I'm being watched) 12:09, 3 May 2008 (UTC)

Redirect locator script

Is there a script that I can run to find all redirects to all articles tagged with a particular category? In other words, I could use a script that finds all redirects to all articles tagged with Category:Start-Class Ecuador articles, for example. Thanks. GregManninLB (talk) 02:08, 4 May 2008 (UTC)

You might be looking for User:Dschwen/highlightredirects.js. LegoKontribsTalkM 18:19, 25 August 2008 (UTC)

Search customization

I use this code;

// ==UserScript==
// @name          Wikipedia - Nicer search box
// @namespace     http://userstyles.org
// @description   Here some improvements to the Wikipedia search box. This style add icons and modify the text area appearance. You can also use it in your personal monobook.css in your Wikipedia account
// @author        Nicosmos
// @homepage      http://userstyles.org/styles/4262
// @include       http://wikipedia.org/*
// @include       https://wikipedia.org/*
// @include       http://*.wikipedia.org/*
// @include       https://*.wikipedia.org/*
// @include       http://*
// @include       https://*
// ==/UserScript==
var css = "@namespace url(http://www.w3.org/1999/xhtml); .searchButton { width: 20px !important; height: 20px !important; border: none !important; font-size: 0 !important; background-color: #FFF !important; } #searchGoButton { background-image: url(http://upload.wikimedia.org/wikipedia/commons/1/1e/Crystal_Clear_action_forward.png) !important; } #mw-searchButton { background-image: url(http://upload.wikimedia.org/wikipedia/commons/1/1b/Crystal_Clear_action_find.png) !important; } #searchInput { border: 1px solid !important; -moz-border-radius: 10px !important; padding-left: 8px !important; padding-right: 8px !important; width: 100px !important; border-color: #AAA !important; margin: 5px !important; }";
if (typeof GM_addStyle != "undefined") {
        GM_addStyle(css);
} else if (typeof addStyle != "undefined") {
        addStyle(css);
} else {
        var heads = document.getElementsByTagName("head");
        if (heads.length > 0) {
                var node = document.createElement("style");
                node.type = "text/css";
                node.appendChild(document.createTextNode(css));
                heads[0].appendChild(node); 
        }
}

to customize the search bar on wikimedia project but it's not working. It original from this;

// ==UserScript==
// @name          Wikipedia - Nicer search box
// @namespace     http://userstyles.org
// @description   [en] Here some improvements to the Wikipedia search box. This style add icons and modify the text area appearance. You can also use it in your personal monobook.css in your Wikipedia account
// @author        Nicosmos
// @homepage      http://userstyles.org/styles/4262
// @include       http://wikipedia.org/*
// @include       https://wikipedia.org/*
// @include       http://*.wikipedia.org/*
// @include       https://*.wikipedia.org/*
// ==/UserScript==
var css = "@namespace url(http://www.w3.org/1999/xhtml); .searchButton { width: 20px !important; height: 20px !important; border: none !important; font-size: 0 !important; background-color: #FFF !important; } #searchGoButton { background-image: url(http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/Nuvola_apps_bookcase.png/20px-Nuvola_apps_bookcase.png) !important; } #mw-searchButton { background-image: url(http://upload.wikimedia.org/wikipedia/commons/thumb/6/61/Searchtool.svg/20px-Searchtool.svg.png) !important; } #searchInput { border: 1px solid !important; -moz-border-radius: 10px !important; padding-left: 8px !important; padding-right: 8px !important; width: 100px !important; border-color: #AAA !important; margin: 5px !important; }";
if (typeof GM_addStyle != "undefined") {
        GM_addStyle(css);
} else if (typeof addStyle != "undefined") {
        addStyle(css);
} else {
        var heads = document.getElementsByTagName("head");
        if (heads.length > 0) {
                var node = document.createElement("style");
                node.type = "text/css";
                node.appendChild(document.createTextNode(css));
                heads[0].appendChild(node); 
        }
}

for greasemonkey. Can somebody tell me whats wrong? – ThatWikiGuy (talk) 21:13, 8 May 2008 (UTC)

google with monobook (unrelated to wikipedia,sortof)

Hi, err can somebuild my a script where I can make google look like the monobook skin? More info here and here. Thanks. – ThatWikiGuy (talk) 21:34, 9 May 2008 (UTC)

AfD close tool

I was wondering if another tool could be made to close AfDs, similar to User:Johnleemk's CloseAfD which has apparently stopped working. Thanks, PeterSymonds (talk) 19:49, 18 May 2008 (UTC)

watchlist patroller

I'd like a link next to each change the watchlist that would help the user see at a glance which changes they have not looked into. I see two options: either 1) click a symbol to color-code a change as uninteresting/looked at (sort like the coloring-coding in the sidebar list of New Changes Patroller or RC Patroller) or 2) click a symbol hide/show any change. — eitch 03:02, 22 May 2008 (UTC)

Script request

Can anyone make a script that moves the "User contribs" from the toolbox to cactions? Cheers, Thisisborin9sign here! 17:59, 26 May 2008 (UTC)

Use addPortletLink ('p-cactions', '/wiki/Special:Contributions', 'User contribs'); to add it to the cactions. I'll work on removing it from the toolbox for you. – ThatWikiGuy (talk) 20:17, 26 May 2008 (UTC)
This code should work.
addPortletLink ('p-cactions', '/wiki/Special:Contributions', 'User Contribs');
var el = document.getElementById('pt-mycontris');
if (el) el.style.display = 'none';

ThatWikiGuy (talk) 20:55, 26 May 2008 (UTC)

Can you tell me if it works or not, its not working for me but it might for you. Thank you! – ThatWikiGuy (talk) 21:03, 26 May 2008 (UTC)
No, it doesn't work at all. Not even the cactions part. Cheers, Thisisborin9sign here! 00:45, 27 May 2008 (UTC)
I found the problems. You had to make it ONLY for userspace, there was no addOnloadHook function, and "pt-mycontibs" was spelled wrong. And I still don't know how to make the contribs for the page name. (e.g. /wiki/Special:Contributions/AnyUser) Cheers, Thisisborin9sign here! 01:29, 27 May 2008 (UTC)
Try this. --Splarka (rant) 07:20, 27 May 2008 (UTC)
if(wgNamespaceNumber == 2 || wgNamespaceNumber == 3) addOnloadHook(function() {
  var c = document.getElementById('t-contributions');
  if(!c) return;
  var a = c.getElementsByTagName('a')0;
  addPortletLink('p-cactions',a.href,'Contribs','',a.title);
  c.style.display = 'none';
});

Additional request

Can someone also make a script that completely removes the language toolbar. I don't need it, and it helps for the floating sidebar. Cheers, Thisisborin9sign here! 01:29, 27 May 2008 (UTC)

That can be done in css. --Splarka (rant) 07:22, 27 May 2008 (UTC)
#p-lang {display:none;}
Thanks!!! Both of these work fine. Cheers, Thisisborin9sign here! 17:20, 27 May 2008 (UTC)

Additional, additional request

Can someone make a script that removes the "Contents, Featured content, and Current events" link from the p-navigation box? Thanks for all the help! Cheers, Thisisborin9sign here! 19:50, 27 May 2008 (UTC)

Just view the page's html source and search for "Featured content", you'll see something like:
<li id="n-featuredcontent"><a href="/Portal:Featured_content">Featured content</a></li>
This li is the object that holds that link (li stands for list item). In CSS, you can hide anything with an id="" by:
#id {display:none;}
So for this you'd just add to your monobook.css:
#n-featuredcontent {display:none;}
--Splarka (rant) 07:16, 28 May 2008 (UTC)
Thanks! It works fine!!! Go ahead and archive this into the /Fulfilled requests page. Thanks again! Cheers, Thisisborin9sign here! 03:22, 29 May 2008 (UTC)

sidebar

Can I have a script that moves Article/Discussion, edit, history and move to a section at the top of the sidebar (but below the logo)? – ThatWikiGuy (talk) 19:12, 26 May 2008 (UTC)

That can also be done in CSS, but is actually easier in Javascript. --Splarka (rant) 07:27, 27 May 2008 (UTC)
addOnloadHook(function() {
  var pc = document.getElementById('p-cactions');
  //change the ID, hides it from #p-caction styling in http://en.wikipedia.org/skins-1.5/monobook/main.css
  pc.id = 'p-cactions-side';
  appendCSS('li#ca-talk, li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print {margin: 0 .3em 0 0; }');
});
Either, this ain't working or my cache don't wan't to clear.
What about the CSS way? – ThatWikiGuy (talk) 07:59, 27 May 2008 (UTC)
It works now. – ThatWikiGuy (talk) 08:01, 27 May 2008 (UTC)

more

Also;

  • make 'edit' italic instead of bold.
CSS:
#ca-edit a { font-weight: normal !important; font-style:italic; }
  • add my monobook.js and monobook.css to the top part (with contribs, logout...) – ThatWikiGuy (talk) 08:15, 27 May 2008 (UTC)
Javascript:
addOnloadHook(function(){
  addPortletLink('p-personal','/wiki/User:' + wgUserName + '/monobook.js','monobook.js');
  addPortletLink('p-personal','/wiki/User:' + wgUserName + '/monobook.css','monobook.css');
});
--Splarka (rant) 07:25, 28 May 2008 (UTC)
Thank you Splarka. – ThatWikiGuy (talk) 09:26, 28 May 2008 (UTC)

status checker

Can I have a script that will check scan User:ThatWikiGuy/Status for the words in, busy and out.

  • in will make that little guy next to your name (at the top) coloured (normal)
  • busy will make it a red '!'
  • out will make the guy black and white (greyscale)

Thank you. – ThatWikiGuy (talk) 19:09, 27 May 2008 (UTC)

more

As my p-personal is getting clogged up, can some body make a show/hide (</>) script which hides all but [the little man], [wp-user], my talk and my watchlist (shortened to w/list?). Thank you. – ThatWikiGuy (talk) 07:31, 29 May 2008 (UTC)

red link removal

I would realy appreciate a red link removal scipt that adds a remove this link in the popups script or a replacement for the popups with the red link removal tool built in, I cant get that to work.
Hintss (talk) 02:38, 29 May 2008 (UTC)
In addition I dont want a popup script. Just make one that takes out the link after horering over it for two or three seconds
Hintss (talk) 14:48, 29 May 2008 (UTC)

Can you clarify what it is exactly that you want then, for those of us who don't know what you mean? That is, describe the behavor, not what else does it. --Splarka (rant) 08:00, 30 May 2008 (UTC)
I think he wants a script that edits the page to remove a red link when found by him. (possibly the edit happens in a new tab/window) NOTE: I could be wrong. – ThatWikiGuy (talk) 08:40, 30 May 2008 (UTC)

you're correct but I want it to also close the tab or windowHintss (talk) 01:01, 31 May 2008 (UTC)

"Securepedia"

I'd love to see a script for Wikipedia, maybe with a Greasemonkey version, that changed each and every link to Wikipedia into its secure version.

Let me explain: while it's not possible to type https://en.wikipedia.org/wiki/Main_Page (notice the "httpS" bit), it is possible to access a secure version of Wikipedia at https://secure.wikimedia.org/wikipedia/en/wiki/Main_Page. This works for meta, commons, all language versions etc.

However, most people don't know this, and besides, when external pages link to Wikipedia, or Wikipedia articles themselves link to special pages in the form http://en.wikipedia.org/w/index.php?blah or sometimes to images and other media stored at commons, we who prefer browsing at the secure site always end up reaching the non-secure version again.

Thus, a Wikipedia script able to change these links, when they appear on articles, to the secure version, would be very handy. And a Greasemonkey one able to do it to any external page's links to Wikipedia even more so.

Sooo, can someone please develop it/them? :-)

Thanks! -- alexgieg (talk) 18:42, 11 June 2008 (UTC)

See userscripts.org #26924 --Splarka (rant) 08:12, 12 June 2008 (UTC)
Thank you very much! I had been searching for "wikipedia"-named scripts, it never occurred me to search for "wikimedia"-named ones. I'll edit the scripts page to mention it. -- alexgieg (talk) 12:02, 13 June 2008 (UTC)

Checking for active users

Could a script be made to show the activity of a user? It happens a lot when I search through a list or category of users (for example: members of a wikiproject, some-language-speaking users category...), for contact, most of the time, I end up posting for inactive users. I started the habit to check before posting the contribution page of each user to see whether he's still contributing or not. But It's a tedious task. It would be better if the link to an inactive user (which could be defined as someone with no edits in the last month) be highlighted (just as broken links or stubs are colored in red). Is this possible? Thank you. Eklipse (talk) 21:52, 15 June 2008 (UTC)

That would produce too much server load to do constantly, all the time. However, I think it would be feasible to have a link in the toolbox saying something like "check user activity" that did the higlighting on request. --ais523 12:55, 16 June 2008 (UTC)
What about only links in categories. Does this still load the server? Because the main point was not to check for every user in a long list, but to immediately find the active user. Instead of clicking the "check user activity", I could've just checked "User Contributions". Eklipse (talk) 03:40, 17 June 2008 (UTC)
As far as I know, a JavaScript tool only does automatically what you would be doing by hand. In this case it would have to actually load the history for each and every article in the category, do some text processing, then present you a result. So, if a category had 300 articles, that's on one hand your browser actually downloading 300 histories, and on the other the server having to generate on the fly those same 300 histories, something that I think neither you nor the server would want automatically happening each and every time you entered a Category: namespace page. A toolbox link for you yourself to initiate the process only when you actually need it is thus a much more sensible approach. -- alexgieg (talk) 13:33, 17 June 2008 (UTC)
I think categories of users were mentioned above, so the script just needs to check users contribs. With (outdated) Query.php this can be even done with just one query (example). So the script is definitely possible (as long as it's started manually, of course). —AlexSm 16:31, 17 June 2008 (UTC)
Yes, it is only activated when you open a category of users, and only checks the last edit in the Contribution page, and not the whole history. I suppose it is feasible. Eklipse (talk) 17:03, 17 June 2008 (UTC)
Ah, I see! Sorry for the misunderstanding. And by the way: I didn't know "query.php". It seems to be a cool feature even when used directly, no matter that raw XML isn't easy to read. Thanks for pointing it out! -- alexgieg (talk) 17:35, 17 June 2008 (UTC)
I think that api.php, the newer version of query.php, can do that too: same example. api.php tends to be better supported by the developers nowadays. --ais523 12:07, 18 June 2008 (UTC)
Sorry, ignore me, I misinterpreted the query.php query. I still think there's some way to do it with api.php, but it's not as easy. --ais523 12:08, 18 June 2008 (UTC)
It seems that no one had the time to create this script. Thanks anyways :-) Eklipse (talk) 14:39, 2 July 2008 (UTC)

Watchlist filter for + and - bytes ?

I would like to be able to click something on my watchlist page similar to "hide bot edits" which would toggle limits of what is reported based on the bytecount change number. For some kinds of articles I care most about when the byte count rises (material added), on other articles I care most about when it drops (material deleted). Low Sea (talk) 21:30, 1 July 2008 (UTC)

Try this: User:Splarka/wbfilter.js. You can test it with importScript('User:Splarka/wbfilter.js'); if you want. It has 4 controls: A byte input box (try something like 1000), a plus/minus indicator (to indicate both positive and negative byte changes), and two buttons, determining whether to hilight byte changes greater than or less than the threshhold. In this test version it only hilights. --Splarka (rant) 08:31, 2 July 2008 (UTC)

Auto-{{talkback}}

I'd like an option to automatically add the {{talkback|My username|title of section on my userpage}} template to several users' pages when I click the submit button on my own talk page. I imagine the following near the [Submit] button:

 Add {{talkback}} to the following users' talk pages:

  [ ] [[User talk:Example]]
  [x] [[User talk:Example2]]
  [ ] [[User talk:Example3]]
  [x] [[User talk:Example4]]
~ Wakanda's Black Panther!/ 01:46, 8 July 2008 (UTC)

"Hidden template" help request on Wikiquote.

Hi, I'm trying to make {{tl:hidden}} work on Wikiquote, but I need a special sort of tweak - I need a template that displays part of a line, and hides the other part of the same line. The outcome would look like something this when hidden:

  • Short citation for quote. [show]

And like this when shown:

  • Short citation for quote. Hidden longer portion of citation (maybe including ISBN, edition information, other comments) that will appear when the "show/hide" link has been clicked. [hide]

Can anyone advise with this? bd2412 T 06:22, 11 July 2008 (UTC)

Wikiquote doesn't seem to have the code for collapsibles at all (q:MediaWiki:Common.js). —AlexSm 13:25, 11 July 2008 (UTC)
How would we get it? Ask a dev? bd2412 T 18:45, 11 July 2008 (UTC)
No, ask a local (Wikiquote) admin. You'll probably copy the code from en.wp MediaWiki:Common.js (although imho it's flawed). Don't forget to copy hasClass() function too. —AlexSm 18:54, 11 July 2008 (UTC)
Oh. I'm a Wikiquote admin - didn't know I could do that. bd2412 T 19:13, 11 July 2008 (UTC)

Random page FROM...

I don't know whether this aleady exists or not—heck, I don't even know whether this falls into the scope of what a JavaScript user script can do!—but is it possible to make a script that will choose a random page, much in the same way that Special:Random does, but you can do it within a certain category/namespace? Basically, when I visit a Wikipedia-maintenance-related category that has hundreds of pages, I like to be able to go through them randomly, not alphabetically. To do this, I have to keep clicking various pages, putting various parameters into the URL, etc.—it's a lot of unnecessary hassle, and I'm hoping there's a better way! If this is not possible, let me know. If such a script/tool/whatever already exists, let me know for sure! I'd greatly appreciate a reply on my talk page. :) —Skittleys (talk) 11:38, 14 July 2008 (UTC)

External links

I need the script which adds the external link in the right upper corner on all pages in main namespace (a few links). Equadus (talk) 12:29, 27 July 2008 (UTC) Equadus (talk) 10:30, 28 July 2008 (UTC)

AutoRedirect to the true page of an article

When you type in a keyword which is slightly different(letter case, punctuation) from the true name of an article and you search for it, a "Redirected from..." mini field apppears just below the headline of the article and it's sometimes unpractical to copy&paste the true URL in order to avoid the inclusion of this field when you like to print the page(selecting the 'Printable Version' mode and then printing).

So, a user script which examines the list of all articles and automatically redirects you without the " (Redirected from ...)" field would be a good idea. A better workaround is to simply place more accurate redirects within the body of articles.

Ve4ernik (talk) 13:46, 28 July 2008 (UTC)

First, it's not some "keywords", it's Wikipedia:Redirects created by other users. If you suggest a script that would replaces redirects to direct links, imho this is not practical. It' much easier to simply hide that message below headline. The code goes to monobook.css (if you use default Monobook skin):
@media print {
 body.ns-0 div#contentSub {display:none}
}
This should hide it only for articles and only when printing (however it will not hide it in MediaWiki "Printable version" view). —AlexSm 22:04, 28 July 2008 (UTC)

Time Traveller: Browse wikipedia "as of" a given date in the past

The goal would be to have a simple way to browse wikipedia as it appeared on a given date in the past. This would be helpful in understanding the history of a discussion, as talk pages are often archived. The script would allow the user :

  • to choose a date/time on a calendar, or to ask to use the time of the version of the page that is currently displayed
  • click on a page / talk / user / user talk page or their history --> show the page as it would have appeared at the selected time
  • reset the clock to today.

I have no clear idea of the user interface yet, but I'm willing to work this out further. I'm using FireFox. Pcarbonn (talk) 16:41, 1 August 2008 (UTC)

I don't know if that would even be possible, as a userscript. Retrieving old versions of templates and images would be difficult, and in some cases impossible where they were deleted/renamed/reuploaded/commons'd, etc. If however, you mean a cascading oldid browser, then that might be possible. Perhaps using a URL parameter, or cookie, which selected the oldid of the revision closest to but older than the given date. But using oldid= it wouldn't show you how the page looked on a given date, just how it would look now with the wikitext of then. --Splarka (rant) 07:14, 2 August 2008 (UTC)
I understand and agree. We don't need to go that far: just showing the old wikitext with the current images and templates would be fine. No need to rewrite wikimedia ! Just bring more convenience to the current user interface, using the wikimedia api, and particularly a query like this one. Pcarbonn (talk) 07:24, 2 August 2008 (UTC)
Mmm, possible then, but how should it operate? Would it, on page load in &action=view where no &oldid was present (and with date cookie set on you), do an API query to the page's history and find the revision closest to (but older than) the date specified and load that &oldid? Or, should it usurp all links on a page to local non-special non-red pages, linking instead to action=history where upon load it then selects the closest date (via API) so that you are not forced to load the full current version? before seeing the old one? The calendar date interface poses a bit of a problem too, it might be easier to have a button on an &oldid= view which lets you select "Time travel to this date or older". Thoughts? --Splarka (rant) 03:53, 5 August 2008 (UTC)
A simple version would work without calendar nor other new buttons as follows : as soon as you load a page with an oldid in your normal browsing of wikipedia, onload replaces the href in all the (relevant) anchors of the loaded page by 'javascript:get(pageName)'. When the user clicks an anchor, get(pageName) calls the API to get the URL of the old page from the revision history, and opens it. Because it has an oldid, the story starts again, this time with the time of the new page (it would better to save the first date in a global variable to avoid time drift). You return to the current time by doing a search, or clicking on the wikipedia logo to get to the home page, or simply by clicking on the back button on your browser. Pcarbonn (talk) 06:43, 5 August 2008 (UTC)
Ahh, okay... but better than having cascading oldid (which would cause timedrift) or a cookie, we'd just create a passing URI parameter, like timetravel=20080805070643. You'd break out of this easily by removing that URI parameter, and engage it by, when viewing an oldid, clicking a timetravel tab or something. I'll start tinkering with this later. --Splarka (rant) 07:06, 5 August 2008 (UTC)
Thanks. While I know Javascript, I don't have any experience with WP gadgets. So I'm sure you'll do it faster than I can. I'll be happy to review the program and add my 2 cents. Pcarbonn (talk) 07:25, 5 August 2008 (UTC)

Here is an initial test version of the program: User:Splarka/timetravel.js. You can copy it or use the code below in your js (which lets you get new versions automatically as I fix it). the UI is very ugly, but try testing it for functionality. Note that on a given page, there are actually quite a lot of links that aren't appropriate for time travel. --Splarka (rant) 09:29, 5 August 2008 (UTC)

if(wgAction == 'view') importScript('User:Splarka/timetravel.js');
That's a good start. Thanks. Some comments:
  • I personnally think that timeTravel should be the default when browsing old pages, so I don't need the "time travel" tab. But I can understand that this may not be a shared view. Your thoughts ?
  • one key function is to move from an article to its talk page and vice versa. This does not seem to work yet.
  • for your info, I'm testing it with the links on my timeline of the cold fusion dispute: it has plenty of links to the past.
  • it does not seem to work yet on project pages such as this one or request for arbitrations. These can be very active pages, and traveling in time in them is much easier than looking at the archive.
In any case, you are already much further than what I could have done. Many thanks !
Pcarbonn (talk) 10:06, 5 August 2008 (UTC)
Hmm, it isn't really practical to have it trigger on all oldid=, not in the way I've written it anyways. I've extended the link scraping to include the whole body, so now it catches the talk tab, but it also catches some things like the "donate" link which would be a pain to try to exclude. Also, I fixed a bug with anchors in the document.location so it should work on those two broken examples now. --Splarka (rant) 10:48, 5 August 2008 (UTC)
Thanks. The script still misses links such as Wikipedia:Administrators#Dealing_with_grievances found in here. I believe it is because of the anchor # in the URL. Pcarbonn (talk) 11:26, 5 August 2008 (UTC)
Yah, I'm not really sure how to deal with those specifically. I have to skip all the links in the TOC and other local anchors, but there is no ironclad way of determining which are which in javascript, as the object.href has the server and page name even if the href="" does not (I don't expect to make sense this late). I'll look at it later. Sleep needed now. --Splarka (rant) 13:51, 5 August 2008 (UTC)
It's great to see what you have accomplished in a day. You are almost done already !
I believe a way to fix the local anchor is to compare your 'link' variable to 'wgPageName' : if they are the same, it's a local anchor --> don't change the href; otherwise, change it.
I realize that I was not clear with the back button of the browser. If you go back to a page that you have viewed while timetravelling, it should still be displayed as timetravelling. You only return to the current time by clicking the back button enough times to return to a page that you have viewed using the present time. In its current version, the script return to present as soon as you click the back button: it shouldn't, in my view. Sorry for the lack of clarity. Pcarbonn (talk) 14:51, 5 August 2008 (UTC)
(de-indent) It isn't as easy as comparing 'wgPageName' to 'link', due to the various ways to encode the page title depending on how you are accessing a page (script path, article path), and the various ways browsers handle href attributes in javascript (some escape it, some urlencode it, some prepend the full server and protocol). What I've done instead is just activate *all* anchor links. Unfortunately, the anchor itself is then lost (this can't really be helped, or at least, I don't know how to fix it, due to the fact the title is thrown to the API and then returned without knowing who threw it). This will give you more functionality, but slightly useless behavior on more links (such as in the TOC).
As for the 'back' button, that is a consequence of using document.location.href to set the location. Some browsers do not recognize this as clicking a link, and the history is lost. If you want to preserve the history, each visit might require two clicks, or a vist to an interm "dummy" page (although the dummy page might make backward navigation hard). --Splarka (rant) 04:34, 6 August 2008 (UTC)
For the first point, is it possible to call the API with synchronous AJAX, so that you don't lose the anchor ? Or simpler, save the anchor in a global variable in timetravel(), and read it in timetravelCB() ?
I now understand the issue with the second point. A possible workaround would be to use onMouseOver to get the correct href in the anchor before the user clicks on it. If the API is fast enough, the user won't notice, the click will be considered as a normal click by Firefox, and thus added to the history. Here is how it could work in more details:
  • on page load: empty the href of all anchors, and set their onMouseOver.
  • when the user mouses over an anchor for the first time, call the API to get the correct revision of the page, and set href.
  • if the user moves away then over the anchor again, no need to call the API again
  • when the user clicks, if href is still empty, nothing happens, otherwise, he gets the correct revision.
Pcarbonn (talk) 12:16, 6 August 2008 (UTC)
You'll find an updated version of your script here. It fixes the 2 issues above, but may have introduced some over... I'd be glad if you had a look. Pcarbonn (talk) 17:05, 6 August 2008 (UTC)
I've worked a bit more on it, and it now works OK as far as I'm concerned. Some minor issues remain, such as when accessing old revisions of WP:AN (the ' may be the pblm), and filtering some more links (e.g. the current version link should not link to the past !). Pcarbonn (talk) 21:48, 6 August 2008 (UTC)
This version is ready for beta test. Any comments welcome. It does not add any new element to the UI, but when you click on a link in a old page, it opens the corresponding page as of that time (if it finds it). It does not deal with redirection though. Pcarbonn (talk) 07:57, 7 August 2008 (UTC)
I have now released the final version here.Pcarbonn (talk) 12:06, 30 August 2008 (UTC)

display advertising

If there was a gadget to display advertising relevant to the selected page, it could generate revenue for wikipedia. I would think that many people would select it, instead of giving money out of their pocket (I would). Pcarbonn (talk) 07:24, 4 August 2008 (UTC)

Certainly an interesting idea; however, it would be very difficult to write without a stock of adverts handy, and even more difficult to make sure the money went to the Wikimedia Foundation without a carefully organised plan involving them, which would then spark off the whole advertising-on-Wikipedia row again. Therefore, I doubt such a script will be written any time soon, except maybe with the Foundation's involvement. --ais523 15:45, 4 August 2008 (UTC)
I'm not entirely sure, but I think some of the sites that mirror our content do this to some extent. Oh, and Wikipedia:Tools/1-Click Answers does do this. If you use the Wikipedia version of the 1-Click Answers software, then part if the advertising revenue gets shared with the Foundation. At least that was the plan (there really hasn't been an update on that partnership). -- Ned Scott 07:09, 5 August 2008 (UTC)

FastReader

Are you using a wide screen ? Wouldn't you want to have each sections of an article displayed in 2 or 3 columns, for easier reading ? A userscript should be able to do this, I would think. Any thoughts ? Pcarbonn (talk) 14:25, 1 September 2008 (UTC)

simple: Request

Hi, I'm from the Simple English Wikipedia. I was wondering if you guys could make us a standalone script that gives a link somewhere to a new section of the second-last editor's talk page. You see, we revert, but then have to go back into the history to see which vandal it was, to go to their userpage, click "new section", stick in a warning and then save, which is rather long winded. Thankyou in advance, Microchip 08 11:49, 3 September 2008 (UTC)

In case you're talking about rollback, most of this can be achieved by editing MediaWiki:Rollback-success which is shown after rollback action, just by adding a "new section" link to editor's talk page with editintro/preload parameters. —AlexSm 14:53, 3 September 2008 (UTC)
Oh wait, I was wrong, the $1 parameter seems to be in the form "user (talk | block)", so we cannot use it to construct a link. —AlexSm 14:57, 3 September 2008 (UTC)
No, that's not what I meant. We don't have rollback on Simple. As we're stuck with revert, it would be nice to have a link as a new tab on the top of the screen, linking us to a new section in a user's talk page. We revert the vandalism, and then need to click "history", and look at the identity of the penultimate user to edit the article (i.e. the vandal, who edited just before we reverted) followed by the talk link, followed by "new section", before finally typing in a warning (we already have a gadget for the last part). My question is whether you can automate the process, with a script that delves into the history, picks up the name of the vandal, and gives up a link to their usertalk &section=new to make vandal whacking a bit quicker. Hope this helps, Microchip 08 18:53, 25 September 2008 (UTC)

GA review

I am looking for something to make GA reviews a bit easier. I use the {{GAList}} template and if I could hit a button say if I am on article Talk:Example/GA1 (or GA2, etc...) that this tab appears and gives me dialog boxes to fill out the parameters for this template.

Example:

I hit the GA review tab for the article above and the dialog pops up and asks "1a) It is reasonably well written: Prose?" and either have buttons for aye nay ??? or wtf which are the options that the template takes, or just a field for me to enter those in. The template also allows for comments, so after each section prompt me for comments on the section ("Comments for section 1?").

Thoughts? Can it be done? Thanks in advance --Admrb♉ltz (talk) 21:30, 7 September 2008 (UTC)

Could not update stat
UP