//ipchat_new_window ) { return; } \IPS\Output::i()->endBodyCode .= << $('.elNavigation_app_chat_Chat').click( function( e ){ e.preventDefault(); var joinWith = '?'; if ( $( e.currentTarget ).attr('href').indexOf('?') != -1 ) { joinWith = '&'; } window.open( $( e.currentTarget ).attr('href') + joinWith + '_popup=1', '_blank', "height=480,width=1200,location=0,menubar=0,toolbar=0" ); return false; }); HTML; } /** * Finish * * @return void */ public function finish() { /* Is this a popup? */ if ( \IPS\Request::i()->_popup == 1 AND \IPS\Dispatcher::i()->application->directory == 'chat' ) { \IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->blankTemplate( \IPS\Output::i()->output ), 200, 'text/html', \IPS\Output::i()->httpHeaders ); } parent::finish(); } }