Wikipedia:WikiProject User scripts/Requests

From Wikipedia, the free encyclopedia

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.

Click here to create a new request.

Contents

[edit] 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)

[edit] 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)

[edit] 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)

[edit] "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)

[edit] 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)

[edit] 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)

[edit] 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)

[edit] 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)

[edit] 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)

[edit] 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)

[edit] 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] 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)

[edit] 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)

[edit] 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

  • The one on the edit pages and the tab will add
    *[[Wikipedia:Articles for Deletion]]
    
    on User:ThatWikiGuy/deletions
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)

[edit] 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)

[edit] 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)

[edit] 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)

[edit] 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)

[edit] 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)

[edit] 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';
});

[edit] 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)

[edit] 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="/wiki/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)

[edit] 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)

[edit] 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)

[edit] 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)

[edit] 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)

[edit] 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)