Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//<source lang='javascript'>
 /* Extra buttons in toolbar [[File:Krinkle_insertVectorButtons.js]] */
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/insertVectorButtons.js&action=raw&ctype=text/javascript');

function kCustomMainInsertButton_config(){
	// Copy to Commons :
	if ( mw.config.get('wgNamespaceNumber') === 6 ) {
		kCustomMainInsertButton(
			'cwc', //imageId
			'//upload.wikimedia.org/wikipedia/commons/thumb/c/c7/Commons-logo-square.png/22px-Commons-logo-square.png', //imageFile
			'Copy to Commons', //speedTip
			'', //tagOpen
			'{' + '{' + "Copy to Wikimedia Commons by BotMultichill}}\n", //tagClose
			'', //sampleText
			//callbackFunc:
			function(){ $( '#wpSummary' ).val( 'This image is ready to be moved to Wikimedia Commons' ); }
		);
	}


	// Commons cat :
	if ( mw.config.get('wgNamespaceNumber') === 14 ) {
		kCustomMainInsertButton(
			'commonscat', //imageId
			'//upload.wikimedia.org/wikipedia/commons/thumb/9/97/Commons_in_image_icon.svg/22px-Commons_in_image_icon.svg.png', //imageFile
			'Commons cat', //speedTip
			'{' + '{' + 'Commons cat' + '|', //tagOpen
			"}}\n", //tagClose
			'', //sampleText
			//callbackFunc:
			function(){ $( '#wpSummary' ).val( 'Adding link to Wikimedia Commons' ); }
		);
	}
} 
//</source>