Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Any JavaScript here will be loaded for all users on every page load. */
/* ===== BlueSpice Galaxy – chatbot hero banner by Claude.ai=====
Makes "Chat with Nova" open your existing chatbot instead of following the link.
Without JavaScript, the link still leads to the Help:ChatBot page as a fallback. */
mw.hook( 'wikipage.content' ).add( function ( $content ) {
$content.find( '.bs-hero__cta a' ).each( function () {
var link = this;
// bind only once, even if the hook fires several times
if ( link.dataset.bsChatBound ) {
return;
}
link.dataset.bsChatBound = '1';
link.setAttribute( 'role', 'button' );
link.addEventListener( 'click', function ( e ) {
var launcher = document.getElementById( 'maximizeChat' );
if ( !launcher ) {
return; // no chat on this page: follow the link to the help page
}
e.preventDefault();
// keep this click from reaching the chat's own "click outside" handling
e.stopPropagation();
// open the chat after this click has finished
setTimeout( function () {
launcher.click();
}, 0 );
} );
link.addEventListener( 'keydown', function ( e ) {
if ( e.key === ' ' ) {
e.preventDefault();
link.click();
}
} );
} );
} );