index.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width,initial-scale=1.0" />
  7. <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
  8. <title><%= htmlWebpackPlugin.options.title %></title>
  9. <script>
  10. (function() {
  11. // 按Ctrl+Shift+U,放开U,在一秒内再按Ctrl+Shift+P,可以调出开发者工具
  12. let firstStepKey = false;
  13. document.addEventListener("keydown", function(e) {
  14. if (e.ctrlKey && e.shiftKey && e.code === "KeyU") {
  15. firstStepKey = true;
  16. setTimeout(() => {
  17. firstStepKey = false;
  18. }, 1000);
  19. }
  20. if (firstStepKey && e.ctrlKey && e.shiftKey && e.code === "KeyP") {
  21. require("electron")
  22. .remote.getCurrentWindow()
  23. .toggleDevTools();
  24. }
  25. });
  26. })();
  27. </script>
  28. </head>
  29. <body>
  30. <noscript>
  31. <strong
  32. >We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
  33. properly without JavaScript enabled. Please enable it to
  34. continue.</strong
  35. >
  36. </noscript>
  37. <div id="app"></div>
  38. <!-- built files will be auto injected -->
  39. </body>
  40. </html>