8,564
edits
Red Leader (talk | contribs) (Updates from https://en.wikipedia.org/wiki/MediaWiki:Common.js. Should we use mw.loader.using? I'm going to test and see if it all works) |
(Test directionally for Arabic) |
||
Line 218: | Line 218: | ||
} | } | ||
mw.hook( 'wikipage.content' ).add( | /* text directionality */ | ||
mw.hook( 'wikipage.content' ).add( function ( $content ) { | |||
if(mw.config.get('wgTitle').startsWith('ar/') || mw.config.get('wgTitle').startsWith('Ar/') ){ | |||
$content.find( '#mw-content-text' ) | |||
.removeClass( 'mw-content-ltr' ) | |||
.addClass( 'mw-content-rtl' ); | |||
} | |||
} ); |