| 1 |
module.exports = function () { |
| 2 |
const menus = require( './menu.js' ); |
| 3 |
|
| 4 |
|
| 5 |
menus.init(); |
| 6 |
|
| 7 |
( function ( wgRedirectedFrom ) { |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
if ( wgRedirectedFrom === null ) { |
| 12 |
return; |
| 13 |
} |
| 14 |
|
| 15 |
const redirectedFrom = mw.Title.newFromText( wgRedirectedFrom ); |
| 16 |
|
| 17 |
if ( redirectedFrom ) { |
| 18 |
|
| 19 |
const title = redirectedFrom.getPrefixedText(); |
| 20 |
const $msg = $( '<div>' ).html( |
| 21 |
mw.message( 'mobile-frontend-redirected-from', title ).parse() |
| 22 |
); |
| 23 |
$msg.find( 'a' ).attr( 'href', mw.util.getUrl( title, { redirect: 'no' } ) ); |
| 24 |
mw.notify( $msg ); |
| 25 |
} |
| 26 |
}( mw.config.get( 'wgRedirectedFrom' ) ) ); |
| 27 |
|
| 28 |
}; |