code: def _javascript_helper(self, position):
          
          if position not in ["header", "footer"]:
              position = "footer"
  
          # Load javascript files from plugins
          if position == "header":
              entries = [entry for entry in self._plugin_manager.call_hook("javascript_header") if entry is not None]
          else:
              entries = [entry for entry in self._plugin_manager.call_hook("javascript_footer") if entry is not None]
          # Load javascript for the current page
          entries += self._get_ctx()["javascript"][position]
          entries = ["<script src='" + entry + "' type='text/javascript' charset='utf-8'></script>" for entry in entries]
          return "\n".join(entries)
docs: Add javascript links for the current page and for the plugins