Skip to content

Commit

Permalink
CSP: Extract inline JS into an adjunct.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Feb 23, 2024
1 parent e3e1b2f commit cf61cea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/resources/io/jenkins/plugins/bootstrap5.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--
Use it like <st:adjunct includes="io.jenkins.plugins.bootstrap5"/>
-->
<j:jelly xmlns:j="jelly:core">
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler">

<j:new var="h" className="hudson.Functions" />
${h.initPageVariables(context)}
Expand All @@ -14,9 +14,7 @@ Use it like <st:adjunct includes="io.jenkins.plugins.bootstrap5"/>
<script type="text/javascript" src="${resURL}/plugin/bootstrap5-api/js/bootstrap.min.js"/>
<script type="text/javascript" src="${resURL}/plugin/bootstrap5-api/js/theme-support.js"/>

<script>
const bootstrap5 = bootstrap;
</script>
<st:adjunct includes="io.jenkins.plugins.bootstrap5.init-constant"/>

</j:jelly>

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const bootstrap5 = bootstrap;

0 comments on commit cf61cea

Please sign in to comment.