User talk:Ilmari Karonen/nfurbacklink.js
This is a MediaWiki user script written to help in adding missing article backlinks to {{Non-free use rationale}} templates. To use it, add the line:
importScript("User:Ilmari Karonen/nfurbacklink.js");
to your monobook.js (or the equivalent .js subpage for users of other skins) and clear your browser cache. Please also add this page to your watchlist, so that you'll notice any updates.
What does it do?
[edit]When you visit an image description page with:
- a single {{Non-free use rationale}} template,
- no
Article
parameter on that template, and - a single page listed in the "File links" section,
then the script will suggest setting the Article
parameter to that page by adding a special edit link into the rationale tag. If the suggestion seems correct, click the link: the script will then automatically try to make the change, and, if successful, will show you the changes and ask you to confirm them. You may then simply click the "Save" button, or make further edits to the image description page before saving.
(If you're feeling really impatient and eager to take risks, you can also set window.nfurbacklinkautosave = true;
to make the script save the page automatically. I'd like to very strongly recommend against doing this, since the script does make occasional mistakes, but as some people have created alternative versions of this script with this functionality anyway, I thought I ought to provide it for those who want it.)
See also
[edit]See Category:Wikipedia non-free files lacking article backlink for images to be fixed. Note that the huge backlog that used to be there has been mostly cleared by now, leaving just the occasional new images with unfilled rationale templates. As such, the usefulness of this script has been reduced significantly.
Comments
[edit]Please report any bugs below or at User talk:Ilmari Karonen. Thank you!
nfurbacklink.js
[edit]Hi, Thanks for your nice tool. What do you think about auto saving? That's faster, I guess..--OsamaK (talk) 20:31, 21 November 2007 (UTC)
- I have created my auto save version based on yours, you can check it there. Thanks--OsamaK (talk) 08:52, 22 November 2007 (UTC)
logo fur
[edit]Your script does not support logo fur. Can you please modify the script so that it can fix logo fur as well? --Sreejith K (talk) 11:39, 17 October 2011 (UTC)
Legacy JavaScript
[edit]Hello! This script has been detected as using deprecated parameters that need to be replaced with the updated version. Examples include addOnloadHook( ... )
needs to be replaced with $( ... )
or $( function() { ... } )
(depending on use); all wgGlobalVariables need to be properly gotten with mw.config.get( 'wgGlobalVariable' )
; and addPortletLink
needs to be called with mw.util.addPortletLink
. Please see MW:ResourceLoader/Legacy JavaScript for details. Thank you. — {{U|Technical 13}} (e • t • c)
21:30, 19 January 2015 (UTC)