User:Stevenliuyi/depicts.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* Add a link in the Tools section to display depictions of items on Commons */
( function ( mw, $ ) {
if ( !mw.config.exists( 'wbEntityId' ) ) {
return;
}
var entityId = mw.config.get( 'wbEntityId' );
mw.util.addPortletLink(
'p-tb',
'//tools.wmflabs.org/depicts/#/' + entityId,
'Commons Depicts',
't-depicts',
'Display images on Wikimedia Commons that depict this item'
);
}( mediaWiki, jQuery ) );