Skip to content

Commit

Permalink
separate styles and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidely committed May 8, 2024
1 parent cf3f4c5 commit 280f704
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@
}
},
"ResourceModules": {
"ext.networknotice.Notice": {
"ext.networknotice.Notice.styles": {
"styles": [
"styles/ext.networknotice.Notice.less"
],
"position": "bottom"
},
"ext.networknotice.Notice.scripts": {
"scripts": [
"scripts/ext.networknotice.Notice.js"
],
Expand Down
3 changes: 2 additions & 1 deletion src/Hooks/MainHookHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class MainHookHandler implements
* @param Skin $skin
*/
public function onBeforePageDisplay( $out, $skin ): void {
$out->addModules( 'ext.networknotice.Notice' );
$out->addModuleStyles( 'ext.networknotice.Notice.styles' );
$out->addModules( 'ext.networknotice.Notice.scripts' );
}

/**
Expand Down

0 comments on commit 280f704

Please sign in to comment.