Talk:Community Wishlist/W209
Add topicAppearance
Latest comment: 1 month ago by JAn Dudík in topic Userscript
There already is an autocompleting box for categories in the Upload Wizard
[edit]I don't think an upload button on all the category page is needed and it may clutter the page. Moreover, files usually (should) get several categories, not just one. A better approach to simplify addition of coordinates and categories could be to
- Show suggested categories in the Upload Wizard based on for example the file title and description and other categories set by the user
- Simplify and facilitate the addition of coordinates – for example by prompting the user to select the precise location on a map if a category about location was added to the file.
Prototyperspective (talk) 17:14, 1 October 2025 (UTC)
- Actually there already is an upload button in a large fraction of categories: the "Upload media" link in the Wikidata infobox. However, not all categories have the Wikidata infobox. Prototyperspective (talk) 23:34, 4 October 2025 (UTC)
Userscript
[edit]I somewhere found userscript for this case.
if (mw.config.get('wgNamespaceNumber') === 14) {
$(function () {
// upload in cat
mw.util.addPortletLink('p-cactions', '//commons.wikimedia.org/w/index.php?title=Special:UploadWizard&categories=' + encodeURIComponent(mw.config.get('wgTitle')), 'Upload to this category', 'UW');
$("#contentSub").prepend(
'<a href="//commons.wikimedia.org/w/index.php?title=Special:UploadWizard&categories=' + encodeURIComponent(mw.config.get('wgTitle')) +
'" title="Upload to this category">' +
'<img alt="Upload to this category" src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/42/Camera-photo_Upload.svg/30px-Camera-photo_Upload.svg.png"' +
' style="vertical-align:sub" height="30" width="30">' +
'</a>');
});
}