Jump to content

Wikipedia:Gadget/proposals/Archive 6

From Wikipedia, the free encyclopedia
Archive 1Archive 4Archive 5Archive 6Archive 7

intropreload

I would like to propose User:Huji/Gadget-intropreload.js to be added as a Gadget for edit pages. It is a much needed tool (explained here), in my humble opinion. hujiTALK 19:38, 5 January 2013 (UTC)

The very few times I've needed to do this, I've just looked in the URL for the "editintro" or "preload" parameters and went to the corresponding pages manually. This does not seem like a much-needed gadget to me. Anomie 21:14, 5 January 2013 (UTC)

Display Wikidata Info on Wikipedia

I find the tool Display Wikidata Info on Wikipedia pretty helpful. Hungarian Wikipedia has add it to their gadgets already. --Kolja21 (talk) 15:52, 24 January 2013 (UTC)

I am trying the script. I seems functional, but I'm not yet sure how I would use it. Wikidata is not yet enabled on the English Wikipedia, so I haven't done any work yet. --— Gadget850 (Ed) talk 13:36, 25 January 2013 (UTC)
Very nice tool for Wikidata contributors (also on enwp)! Please make it selectable. Mange01 (talk) 23:31, 30 January 2013 (UTC)

Proposal for Gadget 'Revision_Counter'

I would propose a gadget called 'Revision Counter'.

It's a handy, useful tool which shows the total number of revisions of a given article, also displaying the count of revisions made by the respective author. The Revision Counter is already enabled and installed as a gadget on the German Wikipedia.

Its loadout – not that it produces a huge amount – was already reduced as it was limited onto the history sub-page, despite the fact that's only client-sided.

Thanks for reading so far …

Smartcom5 (Talk ?) 21:51, 9 February 2013 (UTC)

Addition:
The user Formafix rewrote part of the script and changed its mechanics to AJAX instead of JSONP, which may be found over here.
Smartcom5 (Talk ?) 22:15, 9 February 2013 (UTC)
Addition Part II:
If you wish to test the script you may use the following snippet on your 'common.js':
importScriptURI("//de.wikipedia.org/w/index.php?title=MediaWiki:Gadget-revisionCounter.js&action=raw&ctype=text/javascript");
Best wishes on your test drive, Smartcom5 (Talk ?) 22:27, 9 February 2013 (UTC)

Wikidata items

I would propose a gadget that can show items from Wikidata, under the title of a page. (We have it in greek WP). Xaris333 (talk) 13:06, 4 May 2013 (UTC)

Yes. Xaris333 (talk) 13:37, 4 May 2013 (UTC)

Adding proposed OBOD replacement prototypes to the test category

Would anyone object to me temporarily adding some of the proposed OBOD replacement prototypes to the test category, so that people can try them out and give feedback to the WMF? The current user scripts are:

They would of course be opt-in (rather than default) and only available for a limited time (probably a few days). Kaldari (talk) 22:24, 7 May 2013 (UTC)

I would not oppose, as long as they are marked as mockups. Are they actually functional? I notice that when I preview the importScripts in my common.js (or just typing them in my console), they always pop up, even if I don't have new messages. Is that intentional? Edokter (talk) — 22:38, 7 May 2013 (UTC)
The behavior should actually be the same as the old OBOD - they pop-up until you go to your talk page or view the diff. But if you don't actually have any new talk page messages, you shouldn't get an alert. Kaldari (talk) 23:06, 7 May 2013 (UTC)
Weird then. In any case, feel free to add them. That gives you the chance to test them with ResourceLoader as well. Edokter (talk) — 00:02, 8 May 2013 (UTC)
I removed all of these from the gadget list, with the exception of "topalert". Considering how many folks seem to want an alert similar to the old "orange bar of doom", I decided to leave this one for them to use. If anyone objects, let me know. Kaldari (talk) 20:38, 14 May 2013 (UTC)

I'm considering making my script TheDJ/Print dialog a gadget. It gives users some extra options to refine their print according to their own wishes. What do you think ? —TheDJ (talkcontribs) 15:07, 21 April 2013 (UTC)

SignWriting Viewer gadget

I would like to propose User:Slevinski/signwriting_viewer.js to be added as a Gadget. It enables the viewing of SignWriting. The gadget wraps the ASCII codes of Formal SignWriting in a div span with background SVG images.

M518x529S14c20481x471S27106503x489 M518x533S1870a489x515S18701482x490S20500508x496S2e734500x468 S38800464x496 Slevinski (talk) 07:12, 26 May 2013 (UTC)

Where would SignWriting be useful? --  Gadget850 talk 10:45, 26 May 2013 (UTC)
Primarily for the ASL Wikipedia on Incubator, where the script has been wrapped as a gadget and enabled by default.
I believe it would be useful on the English Wikipedia where sign language is discussed. Slevinski (talk) 18:40, 28 May 2013 (UTC)

Prosesize

Prosesize is a tool to count the words of a given article, excluding text in templates and references. It also provide a convenient way of calculating the readable prose size. I believe it would be useful for both experienced editors, who might be worried about an article being excessively long, and to the casual reader, who might be just be interested in knowing the 'real' size of an article (as opposed to the size of all the wikicode that appears in the history page).--eh bien mon prince (talk) 11:00, 11 August 2013 (UTC)

Does it produce results that are comparable with those given by the tools that are suggested at WP:DYK#Eligibility criteria? If so, why not advertise it there too? --Redrose64 (talk) 11:44, 11 August 2013 (UTC)

Show size of original image (in pixels wide) when hovering over image thumbnail

This would be very useful for when you want to quickly check if any images in an article might be Featured picture-worthy. Adam Cuerden (talk) 05:48, 11 August 2013 (UTC)

I imagine its not of interest to readers and most editors, but could be good as a gadget. Or perhaps it could be added as a feature of WP:POPUPS. the wub "?!" 06:30, 11 August 2013 (UTC)
Aye. This one's mostly for us image people; but very, very useful to us. I presume this page is meant for optional gadgets, not just sitewide launches? Adam Cuerden (talk) 19:20, 14 August 2013 (UTC)
Yes; this page is for anything that could potentially be listed at Preferences → Gadgets. Usually these are opt-in, but sometimes they are opt-out. Of the existing gadgets, you can tell which are opt-out by examining Special:Gadgets and looking for the text "Enabled for everyone by default"; alternatively, examine MediaWiki:Gadgets-definition and look for "default" inside square brackets, possibly preceded by a pipe as in "[ResourceLoader|default]".
It's best to have the new gadget already in a working form as a user script - if you don't know how to write one of those you could ask for assistance at WP:US/R. --Redrose64 (talk) 05:55, 15 August 2013 (UTC)

Please make the MOSNUM dates script into a gadget

MOS:DATEUNIFY says, "Access and archive dates in references should all have the same format".

User:Ohconfucius/script/MOSNUM dates is very useful: with a single click, it can convert all dates in an article to use one format. (It can also do other things.) It's a cross-browser script, though there's a known bug on IE 8.

Dear administrators: I wonder if you could please make it installable as a gadget?

Unforgettableid (talk) 01:58, 28 November 2013 (UTC)

  • I have no objection in principle, although I am wondering if making it into a gadget would have any impact on its development and maintenance. The browser bug is old. As I don't use IE and am not interested in going down that route, I don't know if the problem still exists. -- Ohc ¡digame! 02:18, 28 November 2013 (UTC)
The script worked for me when I used IE11 to make this edit. GoingBatty (talk) 00:39, 29 November 2013 (UTC)

MediaWiki:Gadget-UTCLiveClock without showing seconds

Maybe it's just me, but I find clocks that display seconds to be a bit distracting. Hours and minutes is good enough.

So, I tweaked our existing UTC clock gadget to create it: User:HectorMoffet/clock.js. Might be useful to others who can't code. --HectorMoffet (talk) 11:42, 8 December 2013 (UTC)

Prosesize again

I would like to revive my earlier proposal to add Prosesize to the gadgets. Prosesize is a tool to count the words of a given article, and many wikipedians confuse article size with the size of its prose, which is not helpful when discussing the length of an article. An easy way to add this tool and use it would be sure to avoid many of these issues, and many editors would find the word count to be an interesting statistics in its own right.--eh bien mon prince (talk) 16:57, 31 January 2014 (UTC)

Disable AJAX search suggestions

 Done

The option to disable search suggestions was removed in early December and debates about the merits of this decision have taken place on the Village Pump and Bugzilla. The suggestions can be disabled (not just hidden) with a simple line of Javascript making search return to the old behaviour.

$( document ).ready( function() {
    mw.loader.unload('mediawiki.searchSuggest');
} );

Please make this a gadget. Connor Behan (talk) 19:03, 3 January 2014 (UTC)

Well that was a joke of a first gadget request. I used a function that didn't exist. It only appeared to work because my invalid code broke all scripts including mediawiki.searchSuggest! Here is the real code.
mw.loader.using( 'mediawiki.searchSuggest', function () {
    $(document).ready( function () {
        $('#searchInput').unbind();
        $('#searchInput').attr('autocomplete', 'on');
    } );
} );
THIS is what needs to be a gadget. Connor Behan (talk) 08:11, 5 January 2014 (UTC)
Actually this one will get rid of suggestions in all the boxes, so please use this. Connor Behan (talk) 23:16, 11 January 2014 (UTC)
mw.loader.using( 'mediawiki.searchSuggest', function () {
    $(document).ready( function () {
    	searchBoxes = ['#searchInput', '#powerSearchText', '#searchText', '.mw-searchInput'];
    	$(searchBoxes.join(', ')).unbind();
    	$(searchBoxes.join(', ')).attr('autocomplete', 'on');
    } );
} );
I support adding back this gadget. Hate the AXAX suggestions and am currently turning them off with a css hack.--Fuhghettaboutit (talk) 13:34, 4 February 2014 (UTC)

Opt-in gadget to undo the recent typography change in vector skin

See WP:Village pump (technical)#Font size and style. Helder.wiki 20:28, 3 April 2014 (UTC)

Done, according to Wikipedia:Village pump (technical)#Gadget to opt-out. Helder.wiki 00:15, 4 April 2014 (UTC)

This script adds lovely picture banners to the top of the page for many articles on locations (screenshot). (Data comes from Wikidata's d:P:P948, which is mostly (entirely?) imported from Wikivoyage.) What do people think of making it a gadget? --Yair rand (talk) 05:22, 16 December 2013 (UTC)

Sounds like a nice addition to me! :) --Nicholasjf21 (talk) 14:52, 15 January 2014 (UTC)

...Any other comments? --Yair rand (talk) 09:55, 24 April 2014 (UTC)

Ajax preview with refs

A similar script was proposed over four years ago. Times have changed and I think we should take a look at User:Anomie's effort with User:Anomie/ajaxpreview.js. It seems wild to me that this isn't already in the MediaWiki core, or at least set as a default enabled gadget on the Wikipedias. It addresses the common frustration of not being able to see references when you preview changes to articles. It's also significantly faster than the default page preview. Thoughts? — MusikAnimal talk 01:19, 7 May 2014 (UTC)

Wikidata items again

This was raised previously at Wikipedia:Gadget/proposals/Archive 6#Wikidata items. I think this would be useful to have available for everyone as a gadget. The code is at d:User:Yair rand/WikidataInfo.js by user:Yair rand. It is currently enabled on six Wikipedias[1]. It would be great if it could also be extended so that it shows the label in a different language (using {{Babel}} or user preference language), and very cool if it allowed adding a label in a different language. That would allow people to see the title in their preferred language, making the 'title' essentially become part of the interface instead being only available in the content language. John Vandenberg (chat) 12:56, 16 May 2014 (UTC)

MoreMenu

I'm excited to present my implementation of the drop-down menus gadget, which I'm calling MoreMenu. It adds drop-down menus containing useful links for pages and users, including several admin tools. The old gadget resembled the MonoBook theme, with very small text, and is difficult to maintain. The author has since become inactive on Wikipedia. This newer implementation adds many more useful links and tools and utilizes the native menus of the Vector skin. The links that populate the menu and their structure are presented as a JavaScript object that can easily be updated or have new links added to it. Especially with the added tools, I think this gadget will be an asset to many regular users. Try it with:

importScript('User:MusikAnimal/MoreMenu.js'); // Linkback: User:MusikAnimal/MoreMenu.js

The downside is that it only works in Vector. It doesn't make sense to add support for other skins as they do not play nice with menu functionality as it is. Tag on your Twinkle and other gadgets and you have a very cluttered menu bar, hardly room for a gadget that has many more links than Twinkle. We could consider checking which skin is being used and source the old drop-down menu script if it is not Vector, however.

Thanks to all for their input. — MusikAnimal talk 02:08, 17 June 2014 (UTC)

Proposed addition of a pop-up decision box to the Articles for creation submission process

Dear gadget experts:

Some time ago this addition to the AfC process was proposed HERE, approved HERE and then a javascript implementation was created by Writ Keeper (User:Writ Keeper/Scripts/afcDialog.js. To see how it works, import this script and click the button on this page. The idea would be to make new users who are submitting their first article aware of the need for references, and to cut down the number of blank submissions, test pages, unsourced articles-to-be, etc.

The process broke down at the testing phase. I was fairly new to Wikipedia at the time, and I failed to interest anyone in the technical community enough to get this implemented. Recently, though, there has been some renewal of interest at Wikipedia talk:WikiProject Articles for creation, and it was suggested that I bring it here for technical approval. I would appreciate any feedback or help. —Anne Delong (talk) 13:38, 30 June 2014 (UTC)

URL updating

It might be a good idea if you can disable the option of updating the URL when you land on a redirect. /wiki/Google_maps Google maps will remain that, not automatically correct to the target capitalized Maps /wiki/Google_Maps ; it's annoying.A Great Catholic Person (talk) 23:29, 2 September 2014 (UTC)

Yeah, Thryduulf, you're right. I HATE it!! A Great Catholic Person (talk) 02:20, 5 September 2014 (UTC)
I would definitely appreciate such a gadget. Having the software change the displayed URL is quite unhelpful, and if someone finds it useful, we who don't should be able to do without it. Nyttend (talk) 06:05, 5 September 2014 (UTC)
I'm not sure if this is possible... this behavior triggers VERY early in the page load, i'm not sure if gadgets can be earlier... Will have to test that. I'm still not entirely clear on what in your workflow makes this so annoying for you. If you guys can try and describe that a bit more accurate, then perhaps I can find other methodologies to enable that. —TheDJ (Not WMF) (talkcontribs) 09:23, 5 September 2014 (UTC)
I assumed that it was a rather late thing, due to the way it displays in my browser. Let's say I go to WP:AN; the URL stays https://en.wikipedia.org/wiki/WP:AN until after the page contents have largely loaded, and until after the page in general has begun to appear normal. To answer the "why" issue, let's stay at WP:AN. Maybe I want to go to WP:ANI next; it's easier just to add the "I" at the end of the URL than to type "Incidents" or to find a link to the latter page, or to delete "Administrators' noticeboard" from the URL and replace it with "ANI". In the same manner, I just went to WP:BAN and decided that I should have gone to WP:BANEX, so I have to retype the name instead of adding two letters. Alternately, we have a lot of pages in which people decided to reject naming conventions or in which the conventions didn't exist in the first place, but for whatever reason, redirects exist for the convention. For example, near me are communities with Wikipedia articles entitled Eastvale, Pennsylvania, Beaver Falls, Pennsylvania, and Pittsburgh. If I go to the existing and working Pittsburgh, Pennsylvania redirect, it's helpful to have the ", Pennsylvania" remain in the URL, since if I want to go to the Eastvale article, it's more convenient to delete "Pittsburgh" and type "Eastvale" than it is to delete "Pittsburgh" and type "Eastvale, Pennsylvania". Does this explain my reasoning well? The new development isn't something outrageous in my mind, and I can imagine that other people would be happy with having their URLs and their page titles be the same; that's why I'm simply wishing for a gadget to get around it, rather than asking for its removal. Nyttend (talk) 12:03, 5 September 2014 (UTC)
Who could we ask if no one else will respond soon? If I want to see a specific page, I could use a shortcut to redirect, and I want that URL to stay that way. Now I have to deal with a hard time. It was easier before, why make things difficult? Don't change the good things! A Great Catholic Person (talk) 17:52, 6 September 2014 (UTC)
This is Nyttend signed-out, using a public computer with IE9. URL changing doesn't happen on this machine; if I go to https://en.wikipedia.org/wiki/WP:RDC, it stays there and doesn't go to http://en.wikipedia.org/wiki/Wikipedia:Reference_desk/Computing. The same is true of https://en.wikipedia.org/wiki/WP:AFC/R. TheDJ, do you know what the difference is? 65.210.65.16 (talk) 12:44, 8 September 2014 (UTC)
Does it happen with IE 10 and later? I'll go to my school, test on IE and I'll let you know if it happens. On those school computers it happens on Chrome. My school cannot allow me to use Firefox. A Great Catholic Person (talk) 23:46, 8 September 2014 (UTC)
I don't know about IE10. All I can use is IE9 (public computer) or IE11 (my own); the former sometimes changes the URL and sometimes doesn't, and the latter always does. 65.210.65.16 (talk) 15:03, 9 September 2014 (UTC)
My school computers have IE 11, so the updating would occur.A Great Catholic Person (talk) 19:27, 10 September 2014 (UTC)

How about a citation link, that is, something in the navigation toolbar that allows you to quickly and easily get the relevant citation for the current article. You can't just put the URL in, there has to be the version number, the date of creation. These change everytime an article changes.

Millions of school kids use Wikipedia as a source every day, they need some quick way to get the citation of the article they are citing for their school reports.

(I'm not saying I'm going to do this, I just think it would be a great idea. I'd use it).

Please tell me if this already exists.

Endo999 (talk) 16:06, 15 September 2014 (UTC)

Okay, I just looked and the citation link is under tools in the navigation bar under the link 'cite this page'. I hadn't noticed it before.

Endo999 (talk) 16:10, 15 September 2014 (UTC)

MOSNUM script

This script fulfils all the criteria for a gadget. It is well-documented, runs on all platforms (no recent compatibility problems have been reported), has existed since 2010 and highly evolved, is stable and has been extensively tested. It was proposed as a gadget but unfortunately there was no follow through. It is widely used but I believe that it could be more so, and bring greater awareness of our style guide on dates and numbers if this is available in the preferences palette. -- Ohc ¡digame! 05:15, 26 September 2014 (UTC)

EngvarB script

This script fulfils all the criteria for a gadget. It is well-documented, runs on all platforms (no recent compatibility problems have been reported), has existed since 2010 and highly evolved, is stable and has been extensively tested. Although the script currently supports unification only to British English and Canadian English, I believe that it could be useful to many editors to ensure consistent spellings within about one-half of all en.wp articles, and bring greater awareness of our style guide on spelling variants if this is available in the preferences palette. -- Ohc ¡digame! 05:15, 26 September 2014 (UTC)

Sources script

This script fulfils all the criteria for a gadget. It is well-documented, runs on all platforms (no recent compatibility problems have been reported), has existed since before 2012 and is a highly evolved composite script that functions as one integral unit (it's split into 4 parts for simplicity of maintenance). It is stable, has been extensively tested, and works well on the vast majority of articles. I believe that it could be useful to many editors to ensure consistent citation formatting within articles, and bring greater awareness of how our citations should be styled. These happen to include aspects of titles, capitalisation, if this is a gadget available in the preferences palette. -- Ohc ¡digame! 06:50, 26 September 2014 (UTC)

There is a gadget that shows after each external link a small link to the Archive.org cached version of that link. This a very useful gadget, in my opinion. You can find the script here: ro:MediaWiki:Cache.js. Also, with a very small modification, it can show the Archive.is cached version of the links - here you can find that version. The script originated with fr:Utilisateur:Pmartin - he implemented first such a gadget but for cached links at WikiWix.com, but WikiWix.com doesn't work well - Archive.org and Archive.is are much better because they archive the external links automatically. The gadget is activated on Romanian Wikipedia, you can see how it works if you activate it in preferences (ro:Special:Preferences#mw-prefsection-gadgets - the last one: "Versiunea arhivată pentru legăturile externe"). Then if you want to see how the archives are shown, go to a page like for example ro:Nadia Comăneci. Please add this gadget! Thanks —  Ark25  (talk) 00:48, 28 August 2013 (UTC)

Note that Archive.is is deprecated per an RfC - these links should be removed and blacklisted. --Dirk Beetstra T C 09:24, 25 April 2014 (UTC)
Update: ro:MediaWiki:Cache.js adds the Archive.is links and ro:MediaWiki:Cache-Archive.org.js adds the Archive.org links. —  Ark25  (talk) 21:19, 13 October 2014 (UTC)

Mobile sidebar

Mobile sidebar proto-gadget adds the ability to open the mobile view (same as on en.m.wikipedia.org) of any viewed page in a right-aligned sidebar; when opened it remains persistent across page navigations.

This is intended to help editors identify problematic page and template rendering -- such as tables that do not fit on a 320px screen -- without having to dig out a separate browser or device for side-by-side testing.

Provisional code:

To test with the github copy add to your common.js:

mw.loader.load('https://rawgit.com/brion/MediaWiki-MobileSidebar/master/mobile-sidebar.js', 'text/javascript');
mw.loader.load('https://rawgit.com/brion/MediaWiki-MobileSidebar/master/mobile-sidebar.css', 'text/css');

Known to work in current Firefox & Chrome, Safari 7.1, and IE 11.

May need testing or adjustment for skins other than Vector; fixes appreciated.

Do you want a local copy, or import it from meta? -- [[User:Edokter]] {{talk}} 07:27, 13 October 2014 (UTC)
It should be usable on any wiki, so if it's not problematic to have it load live from a master on meta that'd be easier on maintenance. But if that's funky, a local copy in the gadget definition pages is fine. --brion (talk) 13:12, 13 October 2014 (UTC)
I prefer local, to take advantage on RL. But while the gedget is in development, I'll import it from meta. -- [[User:Edokter]] {{talk}} 13:56, 13 October 2014 (UTC)
+1 for keeping the gadget central. Helder 13:58, 13 October 2014 (UTC)

X-Frame-Options

  • Refused to display 'https://en.wikipedia.org/wiki/User%3AEdokter?useformat=mobile' in a frame because it set 'X-Frame-Options' to 'DENY'. about:blank:1
  • Uncaught SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Sandbox access violation: Blocked a frame at "https://en.wikipedia.org" from accessing a frame at "null". The frame being accessed is sandboxed and lacks the "allow-same-origin" flag.

-- [[User:Edokter]] {{talk}} 14:18, 13 October 2014 (UTC)

Works for me on Google Chrome 38. Helder 15:19, 13 October 2014 (UTC)
Works on articles, but why not user pages? -- [[User:Edokter]] {{talk}} 16:54, 13 October 2014 (UTC)
Confirmed on Firefox 32: Load denied by X-Frame-Options: https://en.wikipedia.org/wiki/User%3AEdokter?useformat=mobile does not permit framing. TypeError: frame.contentDocument is null. Helder 19:11, 13 October 2014 (UTC)
It must be a specific template on my page that causes the error; your user page also works fine. -- [[User:Edokter]] {{talk}} 07:08, 14 October 2014 (UTC)
Mobile-sidebar-gadget with WP diver communications

Hi, I wondered what this looked like... so i tried it, liked it, made a screenshot :-) Nice! (I assume this is not meant as a default gadget, but as a opt-in gadget) I like the smartphone icon. --Atlasowa (talk) 09:13, 14 October 2014 (UTC)

brion, is there a (permanent) link where the description can point to, to report bugs etc.? Or should I just link to this section? -- [[User:Edokter]] {{talk}} 10:03, 21 October 2014 (UTC)

Especially for the edit summary field, where URLs are not clickable as opposite to wikilinks, I would love to have a gadget that does the conversion for me. See examples below:

Is anyone able and willing to create such a gadget? --Leyo 22:23, 11 November 2014 (UTC)

Open Access Button integration

This is a proposal to implement Open Access Button functionality to inform users about open access content status in references and allow users to report blocked content as imagined in this video: [2]

I have implemented a prototype in my common.js. The prototype parses out DOI links, except those on a list of know open access publications, and shows their status with icons and text added to the end of the reference using a provided API key to demonstrate the core functionality. The API seems a bit in flux so we will have to track their changes. Also several questions remain:

  • Accounts with openaccessbutton.org : oab.org requires an account and API key. We should let the button code handle account management, but for the purposes of this demo the api key is hard coded. But we might also have a wikipedia-wide API key that aggregates reports. We will have to determine this taking into account both the needs and desires of wikipedia and oab.org.
  • UI integration : We load the Open Access Button using their scriptlet, but it does not yet accept a parameter that says which URL is under scrutiny, so we will have to coordinate with open access button people to add this capability. Currently it seems to report whatever page it is currently being shown on, which is not the behavior we want here. (So it should not be actually used yet.)
  • All links or DOI links? : The script could easily find references by looking for all links within span.citation.journal elements instead of also only using DOI links, which should increase coverage to all journal links. This should not cause problems because it appears that OAB is using Google Scholar to normalize links to articles. (We should get the details on this to be sure.)

Dfko (talk) 05:51, 25 November 2014 (UTC)

Switcher gadget

There seems to be a consensus at MediaWiki talk:Common.js#Proposal to add a switcher to add my switcher script as a default-enabled gadget (over a month, 4 supporters, no opposers). I'd like for someone (pinging User:Edokter) to look over my code, and if it looks fine and there's no further objections, then I'll set the gadget up. Jackmcbarn (talk) 03:13, 24 November 2014 (UTC)

I feel it needs work, and four supports is a little thin. Would it be OK to make it a test/beta gadget first? One of my issues is that it is not very intuitive and even confusing, because the link to the current image/map is not shown. -- [[User:Edokter]] {{talk}} 08:47, 24 November 2014 (UTC)
@Edokter: I'm not sure whether I should show the self-link, since my reason for hiding it in the first place was that I thought having it would be confusing. Other than that, what sort of work do you think it should have? Also, by "test/beta gadget", do you mean an opt-in gadget? Jackmcbarn (talk) 23:34, 24 November 2014 (UTC)
Yes, opt-in for testing. I think having the current 'link'/image showing would be an improvement, not as link pre se, but as bold or greyed. And generally, if there is some indication of what the links do, something like "Show map:", or radio buttons, I think it would be much more intuitive. (I'm an UI guy, so forgive my for thinking in UI terms.) -- [[User:Edokter]] {{talk}} 08:56, 25 November 2014 (UTC)
@Edokter: I changed it from links to radio buttons. Jackmcbarn (talk) 17:04, 25 November 2014 (UTC)
That is much better. -- [[User:Edokter]] {{talk}} 19:01, 25 November 2014 (UTC)
@Edokter: Good, thanks. By the way, as I've thought about this, I'm really not sure that making the gadget opt-in is the best way to proceed. By its nature, it does nothing on most pages, only operating on pages it's been specifically set up on (of which there are currently none except my demo page). Do you think it would be okay to make the gadget on by default and be eased in per-page rather than per-user? (Especially since everyone seemed to want it that way in the other discussions.) Jackmcbarn (talk) 04:26, 26 November 2014 (UTC)
@Edokter: ping. (Sorry, I just don't want this to drop off the radar.) Jackmcbarn (talk) 17:50, 28 November 2014 (UTC)
I can't make that call on my own. The proper venue is probably Wikipedia:Gadget/proposals, or for wider input, Wikipedia:Village pump (proposals). Technically, the code is sound. -- [[User:Edokter]] {{talk}} 19:37, 28 November 2014 (UTC)
Okay, I moved this there. Since I already got support before, if nobody objects to this in a few days, I'm going to set it up that way. Jackmcbarn (talk) 20:23, 28 November 2014 (UTC)
I've now set this up. Jackmcbarn (talk) 02:06, 2 December 2014 (UTC)

Proposed vector replacement for Gadget-dropdown-menus

I, along with some help of some friends, have created User:MusikAnimal/MoreMenu, which is a complete rewrite of the current dropdown menus gadget for the vector skin. The problem is the original dropdown menus contains deprecated code, some of the links are outdated, and the text appears very tiny on the vector skin. This rewrite utilizes vector's native menu functionality, and introduces lots of new features and links. In addition I've come up with a data structure format that should make it very easy to update and maintain the links (I'll document it), including the ability to restrict links to only show in certain namespaces, wikis or for users with certain user rights.

A discussion has been going on at MediaWiki talk:Gadget-dropdown-menus.js#Proposed replacement for vector skin where we have expanded features, resolved bugs and ensured compliance with MediaWiki JavaScript conventions. As it stands participants there have endorsed this rewrite. Note this only affects vector skin users. Non-vector users will still see the original dropdown menus. This is accomplished by first checking the skin then importing the appropriate script. See the source at User:MusikAnimal/MoreMenu.js and User:MusikAnimal/MoreMenu-core.js. I believe this update will greatly benefit vector users with this gadget installed. Thanks to all for their input. — MusikAnimal talk 05:17, 7 January 2015 (UTC)

Is there any easy way to execute it? I was hoping to click on a link and experiment with my preferences.... —EncMstr (talk) 08:26, 7 January 2015 (UTC)
We can set it up as a test gadget. -- [[User:Edokter]] {{talk}} 10:06, 7 January 2015 (UTC)
@Edokter: You mean under "Testing and development"? I'm okay with that! I believe the code to be technically sound but of course better off safe than sorry. Otherwise EncMstr you can put {{subst:iusc|User:MusikAnimal/MoreMenu.js}} in your common.js. — MusikAnimal talk 16:23, 7 January 2015 (UTC)
Responsible scripts are now at MediaWiki:Gadget-MoreMenu.js and MediaWiki:Gadget-MoreMenu-core.js. @Edokter: To install this as a test gadget, I just follow the directions at Wikipedia:Gadget and include the definition under MediaWiki:Gadgets-definition#test? — MusikAnimal talk 00:02, 8 January 2015 (UTC)
MusikAnimal, that is correct. Don't forget the desctiption at MediaWiki:Gadget-MoreMenu. At some point, the loader script will need to be changed to use mw.loader, as the import functions are not efficient. I'm also not sure about the fallback to the old menus. -- [[User:Edokter]] {{talk}} 08:56, 8 January 2015 (UTC)
Now using mw.loader. MoreMenu is intended to uncontroversially replace the old dropdowns for Vector, so it makes little sense to have as a separate gadget. Meanwhile stripping non-Vector users of the dropdowns gadget will probably make a lot of people unhappy, so taking the fallback approach seemed to be the most favourable. — MusikAnimal talk 17:55, 8 January 2015 (UTC)

 Done It's been 10 days with this in test mode with no complaints. I've boldly merged the new vector skin script in with the old. MediaWiki:Gadget-dropdown-menus.js moved to MediaWiki:Gadget-dropdown-menus-nonvector.js, and Gadget-dropdown-menus.js now sources either -nonvector.js or MediaWiki:Gadget-dropdown-menus-vector.js based on the skin. This seamlessly upgrades vector users to the new script, while non-vector users are unaffected. I do not anticipate any opposition given it fixes many of the old links, adds new ones, is conducive to the vector skin appearance, and finally does not use deprecated functions and variables that will eventually cause the original dropdown-menus to break. For now I think we're in a good place. More updates are sure to come based on feedback received at MediaWiki talk:Gadget-dropdown-menus.js. Many thanks to all! — MusikAnimal talk 19:43, 18 January 2015 (UTC)

eraser Undone for now. The method used for loading the files (raw) is not recommended for a production gadget; it was fine for testing, but it is better to set up a core gadget that can be loaded as a module rahter then raw files. This will save two HTTP requests per page view. If you did any page moves, can you move them back? Then we can set this up using more efficient loading. Sorry for the inconveniance. -- [[User:Edokter]] {{talk}} 20:17, 18 January 2015 (UTC)
@Edokter: No need to apologize, whatever makes it more efficient is of course preferable. I've made no page moves other than that of MoreMenu. The two reverts you made have fully restored the gadget to it's previous state. Is there anything I can do to assist? The goal here if it is not clear is to make the seamless upgrade so that vector users are automatically using the new version. Is that going to be possible? — MusikAnimal talk 20:23, 18 January 2015 (UTC)
That is possible, but I would like to set it up as a test gadget first. Then the switch-over is a matter of a single edit. I just need to know all files involved, and their dependencies. -- [[User:Edokter]] {{talk}} 20:27, 18 January 2015 (UTC)
@Edokter: There are three files, the newly named MediaWiki:Gadget-dropdown-menus-vector.js (MoreMenu), MediaWiki:Gadget-dropdown-menus-nonvector.js (a direct copy of the old script) and MediaWiki:Gadget-dropdown-menus.css. For clarity the latter should probably be moved to MediaWiki:Gadget-dropdown-menus-nonvector.css as it is not needed for the vector version. Presumably there is a fourth file that determines which of the aforementioned to load based on the skin. — MusikAnimal talk 20:33, 18 January 2015 (UTC)
There is no fourth file; you are querying a JavaScript variable. I may need the old test loader back for a while. -- [[User:Edokter]] {{talk}} 20:39, 18 January 2015 (UTC)
@Edokter: Oh.. another thing I forgot to mention, just to make sure we're on the same page: Not only are we trying to automatically upgrade vector users to the new script, we also do not want to download the original script and CSS when it is not going to be used. This is why I made them into separate files and had a fourth import only the ones needed for that skin. I can re-add the test gadget, but do you want just MoreMenu (dropdown-menus-vector.js)? The old test gadget was equivalent to User:MusikAnimal/MoreMenu.js. — MusikAnimal talk 21:08, 18 January 2015 (UTC)
Just re-enable the old gadget; the filename doesn't matter for. That will all be sorted during setup. -- [[User:Edokter]] {{talk}} 21:33, 18 January 2015 (UTC)
@Edokter: Test gadget now re-enabled, source at MediaWiki:Gadget-MoreMenu.js. Forgive me for my misunderstanding, I'm still not sure exactly what we're trying to do. By "module" do mean loading dependencies with ResourceLoader, which we'd specify at MediaWiki:Gadgets-definition? Would we be able to ensure that only the scripts/css needed for that skin are downloaded? Many thanks for your help. PS – let me know if I should stop pinging you! — MusikAnimal talk 21:51, 18 January 2015 (UTC)
That's OK, no need to ping; I watch this page. The main gadget will function as the 'lazy loader', just as it doe now. Only the method of loading will be different. The two main scripts will be turned into invisible gadgets, enabling the loader (the visible gadget) to load them as modules instead of raw files. So the only difference is how they are loaded. -- [[User:Edokter]] {{talk}} 21:56, 18 January 2015 (UTC)

New setup

Allright. The test gadget is setup loading as modules. Can you test? The old (nonvector) may not work, because it has not been tested before under ResourceLoader. -- [[User:Edokter]] {{talk}} 22:29, 18 January 2015 (UTC)

I don't think either are working. I looked in my browser's network monitor and didn't see a request made when mw.loader.load( 'gadget.dropdown-menus-vector' ); was called, but I'm not sure if it is actually meant to make an AJAX call or not. Maybe in MediaWiki:Gadgets-definition the hidden gadgets need to be defined first? — MusikAnimal talk 23:38, 18 January 2015 (UTC)
I made a mistake. Try again. Working for me in Vector. -- [[User:Edokter]] {{talk}} 23:44, 18 January 2015 (UTC)
Testing Monobook... -- [[User:Edokter]] {{talk}} 23:56, 18 January 2015 (UTC)
Monobook and modern worked for me, then I did that "test" by undoing your edit at MediaWiki:Gadget-MoreMenu.js (I was fiddling with running mw.loader.load manually), restored the "ext." fix, and anyway now both monobook and modern skins don't appear to work. I can run mw.loader.load( 'gadget.dropdown-menus-vector' ); and I see the vector version appear on the left (which is expected), but running mw.loader.load( 'gadget.dropdown-menus-nonvector' ); doesn't appear to add the dropdowns. Wouldn ResourceLoader complications produce inconsistent results like this? — MusikAnimal talk 00:01, 19 January 2015 (UTC)
I had it working too before you made your test edit. Now I can't get Monobook to work. ResourceLoader may be confused now (due to slow caching). I'm going to give it a few hours. It's late anyway. -- [[User:Edokter]] {{talk}} 00:09, 19 January 2015 (UTC)
Whoops! Well it's actually back to working function for me now, however the menus don't hide anymore. The console reports the "hideMenu" function is not defined, although it clearly is. Maybe also somehow a caching issue? Let's give it some time. Thank you for the help! — MusikAnimal talk 00:13, 19 January 2015 (UTC)
(ec) Monobook just kicked in, but getting error 'hideMenu is not defined', probably a RL incompatibility. Will investigate tomorrow. -- [[User:Edokter]] {{talk}} 00:14, 19 January 2015 (UTC)
I believe I've fixed it. There's a setTimeout where the first argument is a string containing the syntax to call hideMenu. Never seen anything like that, and that explains why in the console when I try to debug it brings me to browser's VM (not helpful). Anyway I just supplied a function that calls hideMenu, and viola all seems to fine. I think it's stable but let's do a little more testing to be sure. — MusikAnimal talk 01:58, 19 January 2015 (UTC)
Seems to be working on my end. Can you migrate this fix to the original script? I intend to use that file to preserve the history. -- [[User:Edokter]] {{talk}} 10:47, 19 January 2015 (UTC)
Done. When it comes time, should we just move -dropdown-menus.js to -dropdown-menus-nonvector w/o redirect then quickly recreate the new -dropdown-menus.js? Users will have to go without the script for a tad bit (due to caching or what have you), but it'll return sooner than later and we'll have the original history intact in it's new location. If not I'll take the same approach I did before. Either way, I'm ready when you are! Thanks for the help :) — MusikAnimal talk 23:54, 19 January 2015 (UTC)

Okay, I've rolled it out, again, hopefully correctly this time. I've gone with the above approach. MediaWiki:Gadget-dropdown-menus-nonvector.js contains it's full original history. No issues observed with vector, monobook or modern. However, when I attempted to add ResourceLoader to the core dropdown-menus and it flaked out. No errors were in JS console. Probably a caching issue, I presume, but I played it safe and removed RL. — MusikAnimal talk 02:05, 21 January 2015 (UTC)

Autocomplete gadget

For proposal on adding a new gadget for autocomplete of links and templates, please see Wikipedia:Village_pump_(technical)#Autocomplete_gadget. Eran (talk) 06:15, 10 March 2015 (UTC)

@MusikAnimal: Would it be possible based on Wikipedia:Village_pump_(technical)/Archive_135#Autocomplete_gadget to import this gadget? (e.g importing he:MediaWiki:Gadget-autocomplete.js to MediaWiki:Gadget-autocomplete.js for the code). thanks, Eran (talk) 19:34, 18 March 2015 (UTC)
Yep, definitely possible. After consensus has been met (you may want to post at WP:VPR too), we can move things over. We may initially put it into a test phase to ensure there's no issue with ResourceLoader. MusikAnimal talk 19:43, 18 March 2015 (UTC)
The gadget is ResourceLoader compatible, and its dependencies are:
  • autocomplete[ResourceLoader|dependencies=jquery.ui.widget,jquery.ui.autocomplete,jquery.textSelection]|autocomplete.js
(jquery.ui.autocomplete - for the autocomplete, and textSelection to get caret position). Thanks, Eran (talk) 21:41, 18 March 2015 (UTC)