Skip to content

Commit

Permalink
Extract side effects from config.js file
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Jun 28, 2022
1 parent 3560dcf commit 3feb1f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions js/src/config.js
Expand Up @@ -824,6 +824,3 @@ window.Config = {
};
}
};

window.AJAX.registerTeardown('config.js', window.Config.off());
window.AJAX.registerOnload('config.js', window.Config.on());
3 changes: 3 additions & 0 deletions js/src/main.js
Expand Up @@ -13,3 +13,6 @@ window.AJAX.registerTeardown('keyhandler.js', window.KeyHandlerEvents.off());
window.AJAX.registerOnload('keyhandler.js', window.KeyHandlerEvents.on());

window.crossFramingProtection();

window.AJAX.registerTeardown('config.js', window.Config.off());
window.AJAX.registerOnload('config.js', window.Config.on());
2 changes: 1 addition & 1 deletion libraries/classes/Header.php
Expand Up @@ -141,9 +141,9 @@ private function addDefaultScripts(): void
$this->scripts->addFile('vendor/jquery/jquery-ui-timepicker-addon.js');
$this->scripts->addFile('menu_resizer.js');
$this->scripts->addFile('cross_framing_protection.js');
$this->scripts->addFile('main.js');
$this->scripts->addFile('messages.php', ['l' => $GLOBALS['lang']]);
$this->scripts->addFile('config.js');
$this->scripts->addFile('main.js');
$this->scripts->addFile('doclinks.js');
$this->scripts->addFile('functions.js');
$this->scripts->addFile('navigation.js');
Expand Down

0 comments on commit 3feb1f7

Please sign in to comment.