index.html 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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>
  9. <%= htmlWebpackPlugin.options.title %>
  10. </title>
  11. <script type="text/javascript">
  12. if (typeof require != "undefined") {
  13. window.nodeRequire = require;
  14. }
  15. </script>
  16. <script>
  17. (function () {
  18. // 按Ctrl+Shift+U,放开U,在一秒内再按Ctrl+Shift+P,可以调出开发者工具
  19. let firstStepKey = false;
  20. document.addEventListener("keydown", function (e) {
  21. if (e.ctrlKey && e.shiftKey && e.code === "KeyU") {
  22. firstStepKey = true;
  23. setTimeout(() => {
  24. firstStepKey = false;
  25. }, 1000);
  26. }
  27. if (firstStepKey && e.ctrlKey && e.shiftKey && e.code === "KeyP") {
  28. window.nodeRequire("electron")
  29. .remote.getCurrentWindow()
  30. .toggleDevTools();
  31. }
  32. });
  33. })();
  34. </script>
  35. </head>
  36. <body>
  37. <noscript>
  38. <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
  39. properly without JavaScript enabled. Please enable it to
  40. continue.</strong>
  41. </noscript>
  42. <div id="app"></div>
  43. <!-- built files will be auto injected -->
  44. </body>
  45. </html>