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

[warnings-ng] Extract inline script blocks in io/jenkins/plugins/analysis/core/model/SourceDetail/index.jelly

XMLWordPrintable

      Problems

      == Inline Script Block
      Line: 17
      ----
      <script type="text/javascript">
            /* global jQuery3 */
            /**
             * Scroll to the warning.
             */
            jQuery3.fn.scrollView = function () {
              return this.each(function () {
                jQuery3('html, body').animate({
                  scrollTop: jQuery3(this).offset().top - (jQuery3(window).height() / 2)
                }, 1000);
              });
            };
            jQuery3(document).ready(function () {
              jQuery3('.highlight').scrollView();
            });
            jQuery3('.analysis-collapse-button').click(function () {
              jQuery3('#analysis-description').collapse('toggle');
              jQuery3('.analysis-collapse-button').toggleClass('open');
            });
          </script>
      ----
      
      == Inline Script Block
      Line: 17
      ----
      <script type="text/javascript">
            /* global jQuery3 */
            /**
             * Scroll to the warning.
             */
            jQuery3.fn.scrollView = function () {
              return this.each(function () {
                jQuery3('html, body').animate({
                  scrollTop: jQuery3(this).offset().top - (jQuery3(window).height() / 2)
                }, 1000);
              });
            };
            jQuery3(document).ready(function () {
              jQuery3('.highlight').scrollView();
            });
            jQuery3('.analysis-collapse-button').click(function () {
              jQuery3('#analysis-description').collapse('toggle');
              jQuery3('.analysis-collapse-button').toggleClass('open');
            });
          </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:
              Resolved: