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

[neoload-jenkins-plugin] Extract inline script block in org/jenkinsci/plugins/neoload/integration/NeoResultsAction/index.jelly

XMLWordPrintable

      Problem

      == Inline Script Block
      Line: 5
      ----
      <script>
      
      		// correct the size of the frame
      		function correctSizeOfFrame() {
      		var neoReportIFrame = document.getElementById('neoReportIFrame');
      		neoReportIFrame.height = window.innerHeight - 150;
      		}
      
      		// add a window resize event
      		if (window.onresize) {
      		var curronresize = window.onresize; // store the old function
      		window.onresize = function() {
      		curronresize();
      		correctSizeOfFrame();
      		};
      		} else {
      		window.onresize = correctSizeOfFrame;
      		}
      
      
      		// add an onload event to resize the frame.
      		// from http://stackoverflow.com/questions/807878/javascript-that-executes-after-page-load
      		if (window.onload) {
      		var curronload = window.onload; // store the old function
      		window.onload = function() {
      		curronload();
      		correctSizeOfFrame();
      		};
      		} else {
      		window.onload = correctSizeOfFrame;
      		}
      
      	</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: