GSA/code-gov-front-end

View on GitHub
404.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html lang="en">
  <head>
    <script>
      var location = window.location;

      // like ?agencies=DOD,USAID&languages=Python
      var search = location.search;

      var pathName = location.pathname;

      var newSearch;
      if (search && search.length > 0 && search[0] === "?") {
        newSearch = search + "&p=" + pathName;
      } else {
        newSearch = "?p=" + pathName;
      }

      // don't include the pathname (e.g. '/browse-projects')
      const newUrl = location.origin + newSearch;

      location.replace(newUrl);
    </script>
  </head>
  <body>
  </body>
</html>