User:AFigureOfBlue/filescripts.js/doc

FileScripts is a collection of new and existing user scripts that allow you to speed up editing of image files and related pages; right now all of its functions relate to moving images to Wikimedia Commons, but additional functionality is planned (although I don't know when I'll get a chance to add them!) Please note that this script is still new, so there may still be bugs and not all of its final functionality has been implemented. Additionally, as the script is being worked on, errors may be introduced which cause it (and possibly other user scripts which you are using) to stop functioning for a short time, although this should usually be fixed within a few minutes.

This script includes a set of "original" user scripts, which provide the functionality described in "use", below. In addition, the #Installation section contains links to a pair of related scripts which you may find useful to use in conjunction with FileScripts.

Use edit

When FileScripts is installed (see #Installation), you should see new links in the toolbox on file description pages, which, including easy ways of moving images to Commons and tagging them as such. "Old revs deleted" is primarily useful for administrators after deleting images in Category:Rescaled fairuse images more than 7 days old. More functions will be added over time.

Category pages and articles also have an additional "Free image search" link in the toolbox. This allows you to search Google Images for images with licenses compatible with Wikipedia. This function is still underconstruction and is not yet fully complete, although it is functional.

There will also be one additional tab on user talk pages, "notify about commons". Clicking this tab will add {{un-commons}} to the page, notifying the user that they should upload free images to Commons rather than Wikipedia.

Installation edit

To install FileScripts for your own use, simply add the following to your monobook.js page (if you're using a non-standard skin, you probably know what to do).

importScript('User:Drilnoth/filescripts.js'); //See [[User:Drilnoth/filescripts.js/doc]] for details

After adding this, just purge your cache and the script should begin working.

There are a number of other scripts which can also be useful when editing images: FurMe adds fair-use rationales and image tags, QuickImgDelete helps with deletion processes, and Twinkle's TwinkleImage functionality assists with additional image tagging. To install all of these, add the following to your monobook. Note that FurMe and Twinkle may not work in all browsers (notably not in Internet Explorer).

importScript('User:AzaToth/morebits.js'); //This library is required for FurMe and Twinkle to work!
importScript('User:AzaToth/twinkleimage.js');
importScript('User:AWeenieMan/furme.js');
importScript('User:Howcheng/quickimgdelete.js');

Bugs and to-do list edit

If you have found a bug: Please leave a descriptive entry here and a note on my talk page about the issue. Thanks!

  • Add more "sub scripts" that could be helpful with images. –Drilnoth (TC) 21:56, 2 April 2009 (UTC)
  • Automate notifying of users about Wikimedia Commons when you tag a page with the "now commons" button. –Drilnoth (TC) 21:56, 2 April 2009 (UTC)
  • It doesn't seem to work for images with an ampersand (&) or single-quote (') in the filename. – Quadell (talk) 01:39, 3 April 2009 (UTC)
    • Hmm... interesting. I'm not sure if I can really do anything to fix that... ampersands at least are, to my knowledge, very difficult to fix in situations like this, and I still don't know enough coding to get around it. Are you trying to move the image to Commons or tag it as now being at Commons? –Drilnoth (TC) 01:42, 3 April 2009 (UTC)
      • Oh, moving it to commons. If the image is named "foo&bar", it just fills "foo" in the textbox. Could it be solved by replacing & with %26? – Quadell (talk) 02:28, 3 April 2009 (UTC)
        • Okay; I did a quick test and it looks like the full file name is added to the url correctly, but Commonshelper can't interpret it because of the ampersand. Using the %26 does work correctly (thanks for mentioning that), so now I just need to figure out a way to replace that ampersand in the URL with the code. I'm not sure how long that'll take... it seems like it should be relatively easy, but I've never tried anything like that before and I haven't seen it in any other scripts. I'll look into it further over the next few days and see what I can do. Thanks for mentioning this! –Drilnoth (TC) 02:46, 3 April 2009 (UTC)
          • Great! And don't forget the single-quote, which is much more common than the ampersand. – Quadell (talk) 12:35, 3 April 2009 (UTC)
            • Right; I'll work on this soon. –Drilnoth (TC) 13:01, 3 April 2009 (UTC)