Skip to content

Commit

Permalink
Merge pull request #180 from jenkinsci/csp-refactoring
Browse files Browse the repository at this point in the history
CSP: Extract inline JS into an adjunct
  • Loading branch information
uhafner authored Feb 23, 2024
2 parents bd49ca3 + 167b98b commit c8ec914
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
check-latest: true
cache: 'maven'
- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
- name: Build with Maven
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
cache: maven

- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
check-latest: true
cache: 'maven'
- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
- name: Generate coverage with JaCoCo
Expand Down
7 changes: 2 additions & 5 deletions src/main/resources/io/jenkins/plugins/jquery3.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@
<!--
Use it like <st:adjunct includes="io.jenkins.plugins.jquery3"/>
-->
<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)}

<script type="text/javascript" src="${resURL}/plugin/jquery3-api/js/jquery.min.js"/>
<script type="text/javascript" src="${resURL}/plugin/jquery3-api/plugins/visible.js"/>

<script>
const jQuery3 = $;
jQuery3.noConflict();
</script>
<st:adjunct includes="io.jenkins.plugins.jquery3.init-constant"/>

</j:jelly>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const jQuery3 = $;
jQuery3.noConflict();

0 comments on commit c8ec914

Please sign in to comment.