change
   <script type="text/javascript" src="/javascripts/prototype.js"></script>
 to
   <script type="text/javascript" src="http://itest2.com/javascripts/prototype.js"></script>
775711
def absolutify_url(src, base_url, parent_url)
      if src.nil? || src.empty? || src == "//:" || src =~ /\s*http:\/\//i
        return src
      end

      return "#{base_url}#{src}" if src =~ /^\s*\//
      return "#{parent_url}#{src}" if parent_url
      return src
    end
320247
function() {
			switch( this.format.toLowerCase() ) {
				case 'microformat2':
					this.sep = ' ';
					this.dsep = '-';
					this.tsep = ':';
					this.tzsep = '';
					this.tzZulu = 'Z';
					break;
				case 'rfc3339':
					this.sep = 'T';
					this.dsep = '';
					this.tsep = '';
					this.tzsep = '';
					this.tzZulu = 'Z';
					break;
				case 'w3c':
					this.sep = 'T';
					this.dsep = '-';
					this.tsep = ':';
					this.tzsep = ':';
					this.tzZulu = 'Z';
					break;
				case 'html5':
					this.sep = ' ';
					this.dsep = '-';
					this.tsep = ':';
					this.tzsep = ':';
					this.tzZulu = 'Z';
					break;
				default:
					// auto - defined by format of input string
					this.sep = this.autoProfile.sep;
					this.dsep = this.autoProfile.dsep;
					this.tsep = this.autoProfile.tsep;
					this.tzsep = this.autoProfile.tzsep;
					this.tzZulu = this.autoProfile.tzZulu;
			}
		}
621145
function _changeHtml(html, onChangeTable) {
  const $tempDiv = $(`<div>${html}</div>`);
  const $tables = $tempDiv.find('table');

  if ($tables.length) {
    $tables.get().forEach(tableElement => {
      const changedTableElement = onChangeTable(tableElement);

      $(tableElement).replaceWith(changedTableElement);
    });

    html = $tempDiv.html();
  }

  return html;
}
700750
public function isTypeJavaScript()
    {
        $redirectType = $this->coreConfig->getConfigByPath(SgCoreInterface::PATH_REDIRECT_TYPE);

        return $redirectType->getValue() === SgCoreInterface::VALUE_REDIRECT_JS;
    }
112980
function addPrettify() {
  var els = document.querySelectorAll('pre');
  for (var i = 0, el; el = els[i]; i++) {
    if (!el.classList.contains('noprettyprint')) {
      el.classList.add('prettyprint');
    }
  }
  
  var el = document.createElement('script');
  el.type = 'text/javascript';
  el.src = PERMANENT_URL_PREFIX + 'prettify.js';
  el.onload = function() {
    prettyPrint();
  }
  document.body.appendChild(el);
}
1006795
function (proto) {
            // Using push instead of resetting the reference because items are not copied from proto but from the
            // parameter of tplScriptDefinition directly
            proto.ICONS.push({
                type : ariaUtilsData.TYPE_ERROR,
                icon : "std:error"
            }, {
                type : ariaUtilsData.TYPE_WARNING,
                icon : "std:warning"
            }, {
                type : ariaUtilsData.TYPE_INFO,
                icon : "std:info"
            }, {
                type : ariaUtilsData.TYPE_FATAL,
                icon : "std:error"
            }, {
                type : ariaUtilsData.TYPE_NOTYPE,
                icon : "std:info"
            }, {
                type : ariaUtilsData.TYPE_CRITICAL_WARNING,
                icon : "std:warning"
            }, {
                type : ariaUtilsData.TYPE_CONFIRMATION,
                icon : "std:confirm"
            });
        }
267311
function generateScript(source) {
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = encodeURI(source);
        script.setAttribute('async', '');
        script.setAttribute('charset', 'utf-8');
        return script;
      }
81394
function somechars() {
		var was = false;
		if(!stringmode && !commentmode) {
			if(prototype) {
				switch (character) {
					case '(':
						prencount ++;
						break;
					case ')':
						was = prencount > 0;
						prencount --;
						if(was && prencount === 0) {
							prototype = null;
						}
						break;
					case '{':
						curlcount ++;
						break;
					case '}':
						was = curlcount > 0;
						curlcount --;
						if(was && curlcount === 0) {
							prototype = null;
						}
						break;
				}
			}
		}
	}
1108869
function(src, regex, substr, options, index, actionName) {
    //takes the src content and changes the content
    var regExp = null,
        updatedSrc;
    if (typeof regex ===  'string') {
      regExp = new RegExp(regex , options); //regex => string
    } else {
      regExp = regex; //regex => RegExp object
    }
    updatedSrc = String(src).replace(regExp, substr); //note: substr can be a function
    index = typeof index === 'undefined' ? '' : index;
    if (!actionName) {
      grunt.log.verbose.ok(index + 1 + ' action(s) completed.');
    } else {
      grunt.log.verbose.ok(actionName + ' action completed.');
    }
    return updatedSrc;
  }
660834
function toJavascript() {

	// find each matching pair of handlebars blocks
	var text = this.html;
	var pairs = [];
	var opens = [];
	var opener = -1;
	var closer = -1;
	var cursor = 0;
	var block = '';
	var blocks = [];
	var snipped = '';
	var openexpr = null;
	var closexpr = null;
	var nextopen = null;
	var template = this;
	var i;


	// FIND ONLY THE OUTER BLOCKS
	// 
	// Continuously find next token (opener or closer)
	// 	if opener, opens.push(opener)
	// 	elseif closer
	// 		pop and pair IFF opens.length == 0
	// 		
	cursor = 0;
	do {

		// Find next opener and closer relative to the cursor
		opener = text.indexOf('{{#', cursor);
		closer = text.indexOf('{{/', cursor);

		// Next token is an opener?
		if ((opener > -1) && ((closer == -1) || (opener < closer))) {
			opens.push(opener);
			cursor = opener + 3;
		}

		// Next token is a closer?
		else if ((closer > -1) && ((opener == -1) || (closer < opener))) {
			if (opens.length == 0) {
				throw new Error('Unmatched close block');
			}
			opener = opens.pop();
			if (opens.length === 0) {
				pairs.push([opener, closer]);
			}
			cursor = closer + 3;
		}

	} while ((opener > -1) || (closer > -1));


	// this should never happen
	if (opens.length > 0) {
		throw new Error('Unmatched open block');
	}

	// snip 
	cursor = 0;
	snipped = '';
	for (i=0; i<pairs.length; i++) {
		openexpr = readExpression(text, pairs[i][0]);
		closexpr = readExpression(text, pairs[i][1]);
		snipped += text.substr(cursor, pairs[i][0] - cursor);
		snipped += _blockStub;
		cursor = pairs[i][0] + openexpr.length; // move cursor to the end of the open block tag
		block = text.substr(cursor, pairs[i][1] - cursor);
		this.blocks.push(new Block(Expression.delimited(openexpr), new Template(block, {newStack: false})));
		cursor = pairs[i][1] + closexpr.length; // move cursor to the end of the close block tag
	}
	snipped += text.substr(cursor);
	
	
	// Parse HTML or Text
	// This is where the blocks are unraveled
	// This is where the text is parseInterpolated
	switch(this.type) {

		// htmlparser2
		case 'html':
			if (!this.parser) {
				this.parser = new htmlparser.Parser({
					// Let's ignore comments for now
					// This does not enable the <!DOCTYPE>
					// oncomment: function(data) {
					// 	template.appendChild(new VText(data));
					// },
					onopentag: function(tagname, attributes){
						// TODO: improve so VNode does not hold attributes as javascript (use Attributes object)
						template.appendChild(new VNode(ontext(template, tagname, {virtual: false}).pop(), attributesToJavascript(template, attributes)));
						template.push();
					},
					ontext: function(text) {
						template.appendChildren(ontext(template, text));
					},
					onclosetag: function(tagname){
						template.pop();
					}
				});
			}

			this.parser.write(snipped);
			break;

		// plaintext
		default:
			ontext(this, snipped);
			break;
	}

	// compile to js
	return [
		'(function(context){',
			this.newStack ? 'var stack = [], env = ' + Template.Runtime + ';' : '',
			'return (function(){',
				'stack.push(this);',
				'var r = ', this.root.children.toJavascript(), ';',
				'stack.pop();',
				'return r;',
			'}).call(context);',
		'})'
	].join('');
}
1322747
function stripAttrs(tagType, attrs) {
    var ret = extend({}, attrs);

    switch (tagType) {
    case 'script':
      // don't care about these properties.
      delete ret.type;
      delete ret.async;
      delete ret.defer;
      break;
    case 'iframe':
      // don't care about these properties.
      delete ret.width;
      delete ret.height;
      delete ret.style;
      delete ret.scrolling;
      delete ret.frameBorder;
      break;
    default:
      // no default case
    }

    return ret;
  }
1152802
function() {
    this.lastText = this.assignment.arg.text;

    var field = this.terminal.field;
    if (field) {
      field.onFieldChange.remove(this.terminal.fieldChanged, this.terminal);
      field.destroy();
    }

    var fields = this.terminal.system.fields;
    field = this.terminal.field = fields.get(this.assignment.param.type, {
      document: this.terminal.document,
      requisition: this.requisition
    });

    this.focusManager.setImportantFieldFlag(field.isImportant);

    field.onFieldChange.add(this.terminal.fieldChanged, this.terminal);
    field.setConversion(this.assignment.conversion);

    // Filled in by the template process
    this.terminal.errorEle = undefined;
    this.terminal.descriptionEle = undefined;

    var contents = this.terminal.tooltipTemplate.cloneNode(true);
    domtemplate.template(contents, this.terminal, {
      blankNullUndefined: true,
      stack: 'terminal.html#tooltip'
    });

    util.clearElement(this.terminal.tooltipElement);
    this.terminal.tooltipElement.appendChild(contents);
    this.terminal.tooltipElement.style.display = 'block';

    field.setMessageElement(this.terminal.errorEle);
  }
589211
function inject_script_shim () {
      if (options.include_js) {
        var script_tag = '<script type="text/javascript" src="' + options.include_js + '"></script>';
        if (options.js_insert_marker && html.indexOf(options.js_insert_marker) !== -1) {
          html = html.replace(options.js_insert_marker, script_tag);
        }
        else {
          var shims = ["</body>", "</html>", "</head>"];
          inject(script_tag, shims);
        }
      }
    }
241944
function() {
	var mappables = ["script" , "style"]
	for(var m in mappables) {
	  var which = mappables[m]
	  if($vars[which+'s']) {//if we have $vars["scripts"] or $vars["styles"]
		var page_scripts = $vars[which+'s'];
		var map_json = JSON.parse(fs.readFileSync($data_dir + "/common/"+which+"-mapping.json"));
		var mapped_scripts = [];
		for(var i in page_scripts) {
			if(page_scripts[i] in map_json) {
				if(typeof map_json[page_scripts[i]] == "string") mapped_scripts.push(map_json[page_scripts[i]])
				else if(typeof map_json[page_scripts[i]] == "object") //two or more scripts should be included for this to work, like dataTables, jQuery UI, etc ...
				{
					for(var m in map_json[page_scripts[i]])
						mapped_scripts.push(map_json[page_scripts[i]][m])
				}
			}
		}
		$vars[which+'s'] = mapped_scripts;

		if(('ie_'+which+'s') in $vars) {
			var ie_scripts = $vars['ie_'+which+'s'];//ie_scripts || ie_styles
			var ie_mapped_scripts = [];
			for(var i in ie_scripts) if(map_json[ie_scripts[i].name])
			{
				ie_mapped_scripts.push({"version" : ie_scripts[i].version , "file_name" : map_json[ie_scripts[i].name]})
			}

			$vars['ie_'+which+'s'] = ie_mapped_scripts
		}
	  }
	}
 }
732489
function () {

        var A = $prototype ({ toString: function () {} })
        var B = $extends (A)
        var C = $prototype ()

        $assert ([$prototype.defines (B, 'toString'),
                  $prototype.defines (C, 'toString')], [true, false]) }
1361212
function toJSType(config) {
    //config.XXX is either undefined or string
  var falsyNotations = ['false', '0', undefined];
  if (!config.enabled || falsyNotations.indexOf(config.enabled.toLowerCase()) >= 0) {
    config.enabled = false;
  } else {
    config.enabled = true;
  }
  config.port = config.port ? parseInt(config.port, 10) : undefined;
  return config;
}
172610
static private function setMimeType()
	{
		$UserBrowser = '';
		if( preg_match( '@Opera(/| )([0-9].[0-9]{1,2})@', $_SERVER['HTTP_USER_AGENT'] ) )
			$UserBrowser = "Opera";
		elseif( preg_match( '@MSIE ([0-9].[0-9]{1,2})@', $_SERVER['HTTP_USER_AGENT'] ) )
			$UserBrowser = "IE";
		$mime_type = ( $UserBrowser == 'IE' || $UserBrowser == 'Opera' ) ? 'application/octetstream' : 'application/octet-stream';
		header( "Content-Type: ". $mime_type);
	}