File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
resources/io/jenkins/plugins Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ Use it like <st:adjunct includes="io.jenkins.plugins.bootstrap5"/>
1515 <script type =" text/javascript" src =" ${resURL}/plugin/bootstrap5-api/js/popper.min.js" />
1616 <script type =" text/javascript" src =" ${resURL}/plugin/bootstrap5-api/js/bootstrap.min.js" />
1717 <script type =" text/javascript" src =" ${resURL}/plugin/bootstrap5-api/js/no-prototype.js" />
18+ <script type =" text/javascript" src =" ${resURL}/plugin/bootstrap5-api/js/theme-support.js" />
1819
1920 <script >
2021 const bootstrap5 = bootstrap;
Original file line number Diff line number Diff line change 1+ if ( window . getThemeManagerProperty ) {
2+ const setBsTheme = ( ) => document . body . dataset [ 'bsTheme' ] = getThemeManagerProperty ( 'bootstrap' , 'theme' ) ;
3+ setBsTheme ( ) ;
4+
5+ if ( window . isSystemRespectingTheme ) {
6+ window . matchMedia ( '(prefers-color-scheme: dark)' ) . addEventListener ( 'change' , event => {
7+ setBsTheme ( )
8+ } ) ;
9+ }
10+ }
You can’t perform that action at this time.
0 commit comments