code: function getInlineScriptFromCallerSource(callerFnSource, eligibleScripts) {
    var i, inlineScriptText,
        script = null,
        callerSourceText = normalizeWhitespace(callerFnSource);
  
    eligibleScripts = eligibleScripts || scripts;
  
    if (callerFnSource && callerSourceText) {
      for (i = eligibleScripts.length; i--; ) {
        // Only look at inline scripts
        if (!eligibleScripts[i].hasAttribute("src")) {
          inlineScriptText = normalizeWhitespace(eligibleScripts[i].text);
          if (inlineScriptText.indexOf(callerSourceText) !== -1) {
            // If more than one match is found, don't return any
            if (script) {
              script = null;
              break;
            }
            script = eligibleScripts[i];
          }
        }
      }
    }
  
    return script;
  }
docs: Get script object based on the caller function's source code body (text)