index.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. <title>
  8. <%= htmlWebpackPlugin.options.title %>
  9. </title>
  10. <style>
  11. img {
  12. pointer-events: none;
  13. -webkit-user-select: none;
  14. -moz-user-select: none;
  15. user-select: none;
  16. }
  17. </style>
  18. </head>
  19. <body>
  20. <noscript>
  21. <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
  22. Please enable it to continue.</strong>
  23. </noscript>
  24. <div id="app"></div>
  25. <script>
  26. if (!window.location.href.includes('&T=1')) {
  27. document.addEventListener("contextmenu", function (e) {
  28. e.preventDefault();
  29. });
  30. document.onkeydown = () => {
  31. //禁用F12
  32. if (window.event && window.event.keyCode == 123) {
  33. return false;
  34. //禁用ctrl+shift+i,
  35. } else if (
  36. window.event.ctrlKey &&
  37. window.event.shiftKey &&
  38. window.event.keyCode == 73
  39. ) {
  40. return false;
  41. //屏蔽Shift+F10
  42. } else if (window.event.shiftKey && window.event.keyCode == 121) {
  43. return false;
  44. }
  45. };
  46. }
  47. </script>
  48. <!-- built files will be auto injected -->
  49. </body>
  50. </html>