Version 4.0.13.1

This commit is contained in:
Neo committed 2025-12-19 04:57:54 -08:00
1 parent f9e857d255
commit c6a86f0d9b
7517 files changed
+597400 -668041

No files matched your search

+53
View File
@@ -0,0 +1,53 @@
//<?php
class chat_hook_tabNewWindow extends _HOOK_CLASS_
{
/**
* Output the basic javascript files every page needs
*
* @return void
*/
protected static function baseJs()
{
parent::baseJs();
if( !\IPS\Settings::i()->ipchat_new_window )
{
return;
}
\IPS\Output::i()->endBodyCode .= <<<HTML
<script type='text/javascript'>
$('.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;
});
</script>
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();
}
}