You call "init.isAvailable( mw.config.get( 'wgRelevantPageName' ) )" twice - maybe worth assigning to local variable?