template.html 987 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title><%= htmlWebpackPlugin.options.title %></title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <%= require('html-loader!./partial.html') %>
  8. </head>
  9. <body>
  10. <script type="text/javascript">
  11. /* Remove token from URL. */
  12. (function () {
  13. var location = window.location;
  14. var search = location.search;
  15. // If there is no query string, bail.
  16. if (search.length <= 1) {
  17. return;
  18. }
  19. // Rebuild the query string without the `token`.
  20. var query = '?' + search.slice(1).split('&')
  21. .filter(function (param) { return param.split('=')[0] !== 'token'; })
  22. .join('&');
  23. // Rebuild the URL with the new query string.
  24. var url = location.origin + location.pathname +
  25. (query !== '?' ? query : '') + location.hash;
  26. if (url === location.href) {
  27. return;
  28. }
  29. window.history.replaceState({ }, '', url);
  30. })();
  31. </script>
  32. </body>
  33. </html>