checkboxShift( $content.find( 'input[type="checkbox"]:not(.noshiftselect)' ) );
} );
-// Things outside the wikipage content
+// Handle elements outside the wikipage content
$( function () {
var $nodes;
// Turn logout to a POST action
$( '#pt-logout a' ).on( 'click', function ( e ) {
var api = new mw.Api(),
- returnUrl = $( '#pt-logout a' ).attr( 'href' );
+ url = this.href;
mw.notify(
mw.message( 'logging-out-notify' ),
{ tag: 'logout', autoHide: false }
action: 'logout'
} ).then(
function () {
- location.href = returnUrl;
+ location.href = url;
},
- function ( e ) {
+ function ( err ) {
mw.notify(
- mw.message( 'logout-failed', e ),
+ mw.message( 'logout-failed', err ),
{ type: 'error', tag: 'logout', autoHide: false }
);
}