mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-11 05:56:11 +00:00
27 lines
1 KiB
JavaScript
27 lines
1 KiB
JavaScript
( function( $, mw, undefined ) {
|
|
|
|
$(document).ready( setupSpecial );
|
|
|
|
function setupSpecial() {
|
|
|
|
var feedback = new mw.Feedback( {
|
|
'title': new mw.Title( 'Visual editor/Feedback' ),
|
|
'dialogTitleMessageKey': 'visualeditor-feedback-dialog-title',
|
|
'bugsLink': new mw.Uri( 'https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki%20extensions&component=VisualEditor' ),
|
|
'bugsListLink': new mw.Uri( 'https://bugzilla.wikimedia.org/buglist.cgi?query_format=advanced&component=VisualEditor&resolution=---&resolution=LATER&resolution=DUPLICATE&product=MediaWiki%20extensions' )
|
|
} );
|
|
|
|
var $feedbackLink = $( '<a></a>' )
|
|
.attr( { 'href': '#' } )
|
|
.text( mw.msg( 'visualeditor-feedback-prompt' ) )
|
|
.click( function() { feedback.launch(); } );
|
|
|
|
// Right before the line with the test "documents" we prepend a float-right
|
|
// div, which puts it on the same line as the documents at right.
|
|
$( '#es-docs' ).before(
|
|
$( '<div></div>' ).css( { 'float': 'right' } ).append( $feedbackLink )
|
|
);
|
|
}
|
|
|
|
} )( jQuery, window.mediaWiki );
|