2011-12-13 02:46:31 +00:00
|
|
|
( function( $, mw, undefined ) {
|
|
|
|
|
|
|
|
$(document).ready( setupSpecial );
|
|
|
|
|
|
|
|
function setupSpecial() {
|
|
|
|
|
2011-12-13 10:28:44 +00:00
|
|
|
var feedback = new mw.Feedback( {
|
|
|
|
'title': new mw.Title( 'Visual editor/Feedback' ),
|
|
|
|
'dialogTitleMessageKey': 'visualeditor-feedback-dialog-title'
|
|
|
|
} );
|
2011-12-13 02:46:31 +00:00
|
|
|
|
|
|
|
$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 );
|