MediaWiki:Gadget-errorLinks.js

if ( typeof wikibase !== 'undefined' && typeof wikibase.ui !== 'undefined' ) { wikibase.ui.Tooltip.prototype._buildErrorTooltip = function { var $mainMessage = ( $( ' ', { 'class': 'wb-error wb-tooltip-error', text: this._error.message } ) );

// append detailed error message if given, hide it behind toggle: if( this._error.detailedMessage ) { $mainMessage.addClass( 'wb-tooltip-error-top-message' );

var $detailedMessage = $( ' ', {           'class': 'wb-tooltip-error-details',            html: this._error.detailedMessage.replace(/\[\[(.*?)\]\]/g, '' + '$1' + '').replace( /\wiki:/g,':')//correcting wiki link        } ).hide; // hide detail message initially!

var $toggle = wb.utilities.ui.buildToggle(           mw.msg( 'wikibase-tooltip-error-details' ),            $detailedMessage        ); $toggle.addClass( 'wb-tooltip-error-details-link' );

$mainMessage = $mainMessage.after( $toggle ).after( $detailedMessage ); }

return $mainMessage; }; }