public function getAppendedScripts()
    {
        $currentView = Openbizx::$app->getCurrentViewName();
        $initScripts = "<script>var APP_URL='" . OPENBIZ_APP_URL . "'; var APP_CONTROLLER='" . OPENBIZ_APP_URL . "/bin/controller.php';</script>\n";
        $initScripts .= "<script>var APP_VIEWNAME='" . $currentView . "';</script>\n";
        $extraScripts = implode("", $this->_extraScripts);
        $extraScript_array = explode("</script>", $extraScripts);
        /* if (defined("OPENBIZ_RESOURCE_PHP")) {
          $js_scripts = OPENBIZ_RESOURCE_PHP."?f=";
          foreach ($extraScript_array as $script)
          {
          // extract src part from each line
          if (preg_match('/.+src="([^"]+)".+/', $script, $matches) > 0 && !empty($matches[1])) {
          if (substr($js_scripts, -2)=='f=') $js_scripts .= $matches[1];
          else $js_scripts .= ','.$matches[1];
          }
          }
          return $initScripts."<script type=\"text/javascript\" src=\"".$js_scripts."\"></script>";
          } */
        $cleanScript_array = array();
        foreach ($extraScript_array as $script) {
            if (in_array($script . "</script>", $cleanScript_array) == FALSE and strlen($script) != 0) {
                $cleanScript_array[] = $script . "</script>";
            }
        }
        return $initScripts . implode("\n", $cleanScript_array);
    }