Welcome to Wikimedia Commons, Jon (WMF)!

-- 13:44, 14 February 2012 (UTC)


Code issues in MediaWiki:Gadget-advanced-search.js edit

Hi Jon (WMF), I am a bored bot (this is kind of a computer program) that is watching the recent changes and tapping buttons like I did now.

Curious about the reason? Possibly not but I will tell you anyway:

  1. You edited MediaWiki:Gadget-advanced-search.js. Thank you for caring about Wikimedia Commons's javascript pages.
  2. Though, that change appears to introduce 1 new jshint issue — the page's status is now having warnings.
  3. To help you understanding where the issues are, I have aggregated a report here and now. If you have questions, don't hesitate to ask users experienced in javascript writing for help. But do not ask the bot's operators (chronically overwrought) unless you suspect an error of mine.
  1. ISSUE: line 195 character 62: Expected an assignment or function call and instead saw an expression. - Evidence: cats = altCat.join( '|' ).replace( /\|$/, '' );

Your CommonsMaintenanceBot (talk) at 16:33, 8 December 2020 (UTC).Reply


Code issues in User:Magnus Manske/sdc tool.js edit

Hi Jon (WMF), I am a bored bot (this is kind of a computer program) that is watching the recent changes and tapping buttons like I did now.

Curious about the reason? Possibly not but I will tell you anyway:

  1. You edited User:Magnus Manske/sdc tool.js. Glad to see you coding in javascript! Have you ever considered becoming a MediaWiki hacker?
  2. Though, that change appears to introduce 1 new jshint issue — the page's status is now having warnings. Note that invalid or ambiguous code often has unwanted side effects like breaking other tools for you. If you cannot find out how to fix it, I suggest blanking the page for now.
  3. To help you understanding where the issues are, I have aggregated a report here and now. If you have questions, don't hesitate to ask users experienced in javascript writing for help. But do not ask the bot's operators (chronically overwrought) unless you suspect an error of mine. If you prefer not getting spammed by me, you can opt-out reports by adding {{ValidationOptOut|type=all}} to your user page or cmb-opt-out anywhere on your your global user page on Meta. Good luck at Wikimedia Commons and happy hacking!
  1. ISSUE: line 54 character 6: Missing semicolon. - Evidence: }
  2. ISSUE: line 67 character 6: Missing semicolon. - Evidence: }
  3. ISSUE: line 132 character 6: Missing semicolon. - Evidence: }
  4. ISSUE: line 207 character 19: Use '===' to compare with ''. - Evidence: if ( query=='' || query==me.last_query ) return ;
  5. ISSUE: line 211 character 61: Missing semicolon. - Evidence: var wgUserLanguage = mw.config.get('wgUserLanguage')
  6. ISSUE: line 226 character 6: Missing semicolon. - Evidence: }
  7. ISSUE: line 265 character 38: Use '===' to compare with '0'. - Evidence: if ( $('a.image').length == 0 ) return ; // No possible thumbnails
  8. ISSUE: line 278 character 77: Use '===' to compare with ''. - Evidence: if ( typeof wgWikibaseItemId == 'undefined' || wgWikibaseItemId == '' ) return ;
  9. ISSUE: line 305 character 53: Missing semicolon. - Evidence: $('#sdc_main').css({bottom:bottom+'px'})
  10. ISSUE: line 317 character 61: Use '===' to compare with '0'. - Evidence: if ( $('input.sdc_checkbox:checked').length == 0 ) {
  11. ISSUE: line 390 character 29: Use '===' to compare with '0'. - Evidence: if ( cbs.length == 0 ) { // All done
  12. ISSUE: line 521 character 47: Use '===' to compare with ''. - Evidence: if ( $('#sdc_dialog_query').val() == '' ) {
  13. ISSUE: line 543 character 59: Missing semicolon. - Evidence: html += "<div style='margin:0.2em;'>Property "
  14. ISSUE: line 641 character 30: Use '===' to compare with '0'. - Evidence: if ( mids.length == 0 ) return ;
  15. ISSUE: line 669 character 33: Use '===' to compare with '0'. - Evidence: if ( to_load.length == 0 ) return ;
  16. ISSUE: line 717 character 29: Use '===' to compare with '0'. - Evidence: if ( out.length == 0 ) {

Your CommonsMaintenanceBot (talk) at 17:19, 30 March 2021 (UTC).Reply


Code issues in User:Bocardodarapti/monobook.js edit

Hi Jon (WMF), I am a bored bot (this is kind of a computer program) that is watching the recent changes and tapping buttons like I did now.

Curious about the reason? Possibly not but I will tell you anyway:

  1. You edited User:Bocardodarapti/monobook.js. Glad to see you coding in javascript! Have you ever considered becoming a MediaWiki hacker?
  2. Though, that change appears to introduce 1 new jshint issue — the page's status is now having warnings. Note that invalid or ambiguous code often has unwanted side effects like breaking other tools for you. If you cannot find out how to fix it, I suggest blanking the page for now.
  3. To help you understanding where the issues are, I have aggregated a report here and now. If you have questions, don't hesitate to ask users experienced in javascript writing for help. But do not ask the bot's operators (chronically overwrought) unless you suspect an error of mine. If you prefer not getting spammed by me, you can opt-out reports by adding {{ValidationOptOut|type=all}} to your user page or cmb-opt-out anywhere on your your global user page on Meta. Good luck at Wikimedia Commons and happy hacking!
  1. ISSUE: line 11 character 5: Unreachable 'var' after 'return'. - Evidence: var toolbar, isReady, $toolbar, queue, slice, $currentFocused;
  2. ISSUE: line 1809 character 11: Missing semicolon. - Evidence: editForm

Your CommonsMaintenanceBot (talk) at 14:59, 31 March 2021 (UTC).Reply


Hello, thanks for your help. Now it works again. (I only use it on German Wikiversity, but there heavily; here was only a test, because today it didn t work anymore). Dont mind when I empty it here again, I made the changes on Wikiversity. For future reference: Who can one ask, if the personal js does not work anymore due to global changes? Thanks again. Bocardodarapti (talk) 19:15, 31 March 2021 (UTC)Reply

Tech news would be the best source of information relating to keeping your user scripts working. We usually report potential breakages, at least a week in advance on meta:Tech/News. Tell your friends :) Jon Robson, WMF 21:28, 31 March 2021 (UTC)Reply

Your edit in my commons.js-file edit

Hello Jon (WMF). Thanks for your edit in my common.js-file in my user-room. But my computer technical-english isn't that good.

I'm not really sure what your brief edit-comment meant: «maintenance: more info ReferenceError: wgNamespaceNumber is not defined»

Do you think my user-room-file need any more updates, if so can you help me ? I just copied this file from somewhere I now can't recall from where I did the copy from back in the summer of 2014. Thanks and best regards Migrant (talk) 19:52, 1 April 2021 (UTC)Reply

No more updates necessary :) ! Jdlrobson (talk) 20:20, 1 April 2021 (UTC)Reply
Okay thanks again then. Happy holidays and best regards Migrant (talk) 22:44, 1 April 2021 (UTC)Reply


Code issues in User:Deadstar/monobook.js edit

Hi Jon (WMF), I am a bored bot (this is kind of a computer program) that is watching the recent changes and tapping buttons like I did now.

Curious about the reason? Possibly not but I will tell you anyway:

  1. You edited User:Deadstar/monobook.js. Glad to see you coding in javascript! Have you ever considered becoming a MediaWiki hacker?
  2. Though, that change appears to introduce 1 new jshint issue — the page's status is now having warnings. Note that invalid or ambiguous code often has unwanted side effects like breaking other tools for you. If you cannot find out how to fix it, I suggest blanking the page for now.
  3. To help you understanding where the issues are, I have aggregated a report here and now. If you have questions, don't hesitate to ask users experienced in javascript writing for help. But do not ask the bot's operators (chronically overwrought) unless you suspect an error of mine. If you prefer not getting spammed by me, you can opt-out reports by adding {{ValidationOptOut|type=all}} to your user page or cmb-opt-out anywhere on your your global user page on Meta. Good luck at Wikimedia Commons and happy hacking!
  1. ISSUE: line 2 character 2: document.write can be a form of eval. - Evidence: document.write('<script type="text/javascript" src="'
  2. ISSUE: line 18 character 4: Missing semicolon. - Evidence: wfg

Your CommonsMaintenanceBot (talk) at 15:06, 9 April 2021 (UTC).Reply


Code issues in User:Rillke/MwJSBot.js edit

Hi Jon (WMF), I am a bored bot (this is kind of a computer program) that is watching the recent changes and tapping buttons like I did now.

Curious about the reason? Possibly not but I will tell you anyway:

  1. You edited User:Rillke/MwJSBot.js. Glad to see you coding in javascript! Have you ever considered becoming a MediaWiki hacker?
  2. Though, that change appears to introduce 1 new jshint issue — the page's status is now having warnings. Note that invalid or ambiguous code often has unwanted side effects like breaking other tools for you. If you cannot find out how to fix it, I suggest blanking the page for now.
  3. To help you understanding where the issues are, I have aggregated a report here and now. If you have questions, don't hesitate to ask users experienced in javascript writing for help. But do not ask the bot's operators (chronically overwrought) unless you suspect an error of mine. If you prefer not getting spammed by me, you can opt-out reports by adding {{ValidationOptOut|type=all}} to your user page or cmb-opt-out anywhere on your your global user page on Meta. Good luck at Wikimedia Commons and happy hacking!
  1. ISSUE: line 333 character 13: Unreachable 'mw' after 'return'. - Evidence: mw.libs.commons.api.query( {

Your CommonsMaintenanceBot (talk) at 15:16, 5 May 2021 (UTC).Reply

Your maintenance changes to ImageAnnotator's main JS in September 2020 edit

Hi Jon,

It seems that while fixing some bugs in MediaWiki:Gadget-ImageAnnotator.js in September 2020, you also partially undid ESanders' "eslint-config-wikimedia autofix" coding style fixes from September 2018. Nevermind the busy diff, but I'm wondering if you could revert the spacing changes, i.e. change the tabs that you/your IDE accidentally converted to spaces back to tabs?

Similarly, I wonder if there's anything quick 'n' automated to fix things like

				onpreview: function ( editor ) {
					if ( this.tooltip ) { this.tooltip.size_change(); }
				},
	
				cancel: function ( editor ) {
					if ( !this.note ) { return; }
					if ( !this.note.content ) {
						// No content: Cancel and remove this note!
						this.note.destroy();
						this.note = null;
					}
					if ( editor ) { this.hide_editor(); }
				},

into

				onpreview: function ( editor ) {
					if ( this.tooltip ) {
						this.tooltip.size_change();
					}
				},
	
				cancel: function ( editor ) {
					if ( !this.note ) {
						return;
					}

					if ( !this.note.content ) {
						// No content: Cancel and remove this note!
						this.note.destroy();
						this.note = null;
					}

					if ( editor ) {
						this.hide_editor();
					}
				},

Probably not, but a little bit of stylization would go a long way in improving the readability of that over 3k lines long page. Functionality-wise, ImageAnnotator is just awesome, but the codebase could do with quite a bit of maintenance, given that there's things like fixes/workaround for browsers for which WMF sites don't load JS anymore and haven't loaded for quite some time...not to mention that jQuery has been available since MW 1.16 but parts of ImageAnnotator/its dependencies include partial copies of jQuery's .offset method because circa 2009 or so it wasn't OK to assume that jQuery is always available and usable.

Having played around with ImageAnnotator a bit locally over the past couple days, I'm also willing to submit a bunch of stylization-only changes as an edit request once the spacing is fixed so that the diffs don't end up unreadable and people willing to review code can still do so relatively easily.

Thanks!

--Jack Phoenix (talk) 21:31, 1 May 2022 (UTC)Reply

Done! I'm not sure who officially maintains this, but having more official maintainers here would be greatly appreciated. I have no idea what the process for taking ownership of gadgets on Commons is though but I highly encourage that! Jdlrobson (talk) 16:45, 2 May 2022 (UTC)Reply
(meant to do that from my staff account!) Jon Robson, WMF 16:45, 2 May 2022 (UTC)Reply
Hi Jon and @Jack Phoenix: there are further considerable issues with the image annotator gadget, concerning probably thousands of images, see MediaWiki talk:Gadget-ImageAnnotator.js and Commons:Village pump/Archive/2022/10#No activation button in Vector 2022 skin. I'm afraid that the person who created the gadget (User:Lupo) has not been around since 2019/2020 and, according to w:User talk:Lupo, does not have time for Wikipedia / Commons currently. Also User:Krinkle (m:User:Timo Tijhof (WMF), who has also done several modifications to the gadget, is not really maintaining it, as he expressed in the gadget's talk page on April 28th, 2022. I'm sorry that I don't have the slightest clue of JS myself. Do you have any idea how we can proceed here? Is there any possibility of finding a new voluntary "gadget maintainer" with good JS skills? --Kuhni74 (talk) 09:54, 30 December 2022 (UTC)Reply
Hi @Kuhni74, thanks for your message.
Of all the various implementations of this feature (Wikia's ImageTagging and the WMF's FileAnnotations being the other somewhat relevant but historical and currently unusable ones), ImageAnnotator is the best and the most stable, so I think that many of us have a vested interest in keeping the feature usable and maintained. :-) Plus, let's be honest, it's mighty impressive how it's basically all implemented via JS and some MW: messages; no server-side logic needed!
As for the actual issue in question: I do see the "Add a note" button on the "Vector 2022" version of the Vector skin when logged in, just as I see it on the regular Vector or MonoBook when logged in; as an anon it doesn't show up, but if memory serves me correct, that's "by design".
In any case, having spent, frankly, all too much time playing around with the code on my local test wiki in late April and early May 2022, I'm willing to look into bugs and provide expertise and whatnot regarding it, and should some other brave soul step up, I'd love to get the code cleaned up some; but unfortunately I'm not able to do that myself ("thanks", WMF!) so I'm not able to step up as an actual, dedicated maintainer of the gadget. Still, please feel free to be bold in pinging me about matters related to ImageAnnotator! Jack Phoenix (talk) 12:22, 2 January 2023 (UTC)Reply
@Jack Phoenix: yes, it's a very cool tool, I love it (especially for use with mountain photographs), and most of the time, it works. As described in the gadget talk page (both sections; interesting new insights from User:Aschroet at the end of the first section), there is a (large) number of occasions when it doesn't, however. Thank you very much in advance for looking into the bugs. --Kuhni74 (talk) 13:34, 2 January 2023 (UTC)Reply