Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-74287

[emotional-jenkins-plugin] Extract inline script block in org/jenkinsci/plugins/emotional_jenkins/EmotionalJenkinsAction/floatingBox.jelly

XMLWordPrintable

      Problem

      == Inline Script Block
      Line: 3
      ----
      <script>
          Element.setStyle($('side-panel'), {
            <j:choose>
              <j:when test='${result.equals("UNSTABLE")}'>
                'background-image': 'url(${rootURL}/plugin/emotional-jenkins-plugin/images/sad-jenkins.png)'
              </j:when>
              <j:when test='${result.equals("FAILURE")}'>
                'background-image': 'url(${rootURL}/plugin/emotional-jenkins-plugin/images/angry-jenkins.png)'
              </j:when>
              <j:otherwise>
                'background-image': 'url(${rootURL}/plugin/emotional-jenkins-plugin/images/jenkins.png)'
              </j:otherwise>
            </j:choose>
            ,'background-repeat' : 'no-repeat'
            ,'background-size' : '55%'
          });
        </script>
      ----
      

      Solution

      https://www.jenkins.io/doc/developer/security/csp/#inline-javascript-blocks

            Unassigned Unassigned
            basil Basil Crow
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: