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

[prism-api] Extract inline script blocks in io/jenkins/plugins/prism/SourceCodeViewModel/index.jelly

XMLWordPrintable

      Problems

      == Inline Script Block
      Line: 16
      ----
      <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: 16
      ----
      <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: