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

[deploy-dashboard] Extract inline script block in org/jenkinsci/plugins/environmentdashboard/DeploymentView/main.jelly

XMLWordPrintable

      Problem

      == Inline Script Block
      Line: 137
      ----
      <script language="javascript">
                      function toggle(id) {
                          var modal = document.getElementById('popup_' + id);
                          var span = modal.querySelector('.close');
                          modal.style.display = 'block';
      
                          function close() {
                              modal.style.display = 'none';
                              span.removeEventListener('click', close);
                              window.removeEventListener('click', windowClose);
                          }
      
                          function windowClose(event) {
                              if (event.target === modal) {
                                  close()
                              }
                          }
      
                          window.addEventListener('click', windowClose);
                          span.addEventListener('click', close);
                      }
                  </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: