Skip to content

Commit d2dcbb0

Browse files
authored
Merge pull request #275 from jenkinsci/csp-refactoring
CSP: Extract inline JS into an adjunct
2 parents e3e1b2f + cf61cea commit d2dcbb0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/main/resources/io/jenkins/plugins/bootstrap5.jelly

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!--
33
Use it like <st:adjunct includes="io.jenkins.plugins.bootstrap5"/>
44
-->
5-
<j:jelly xmlns:j="jelly:core">
5+
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler">
66

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

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

2119
</j:jelly>
2220

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const bootstrap5 = bootstrap;

0 commit comments

Comments
 (0)