Admin Forum:WantedFiles issue

I'm having an issue with Special:WantedFiles at Gran Turismo Wiki. Whenever I click a red-link in the Wanted Files list, I am sent to an edit page, rather than an upload page. Can I change some settings to fix this?

Thanks

MTracey1 PSN/XBL: Mackem1985 23:54, March 5, 2012 (UTC)


 * I don't think there is a setting to fix this lameness, but you can make some Javascript to fix it. When I get more time I'll post some JS to remove the &action=edit from the redlink which should make it do what you want. -- Fandyllic (talk &middot; contr) 6 Mar 2012 2:32 PM Pacific


 * Okay, I tested this here on Community at User:Fandyllic/wikia.js and it seems to work. It basically changes the link into an upload link.

 function ImgDescEditLink2Upload { $('ol.special > li > a.new').each(function {   this.setAttribute("href", this.getAttribute("href").replace(/\&action\=edit\&redlink\=1/, ""));    this.setAttribute("href", this.getAttribute("href").replace(/File:/, "Special:Upload&wpDestFile="));  }); } addOnloadHook(ImgDescEditLink2Upload);
 * As with all my JS code, I have to give a standard disclaimer: I'm not the best coder, so it is probably not the most efficient way to do this and it may have unintended consequences, since testing was minimal. I think it will only affect links of this sort on Special:WantedFiles, but it might work too globally. -- Fandyllic (talk &middot; contr) 6 Mar 2012 4:05 PM Pacific


 * Here's a simplified version of the above that just removes &action=edit:

 function ImgDescEditLink2ImgLink { $('ol.special > li > a.new').each(function {   this.setAttribute("href", this.getAttribute("href").replace(/\&action\=edit/, ""));  }); } addOnloadHook(ImgDescEditLink2ImgLink);
 * -- Fandyllic (talk &middot; contr) 6 Mar 2012 4:26 PM Pacific


 * Thanks. I assume if I put this into User:MTracey1/wikia.js it will only affect my editing, but if I add it to MediaWiki/Common.js (which I don't intend to) it would affect everyone?  Please excuse my lack of knowledge on the subject - I know my WikiMarkup pretty well, but js gives me a headache.
 * MTracey1 PSN/XBL: Mackem1985 01:58, March 7, 2012 (UTC)