index.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <!doctype html>
  2. <html lang='en-us'>
  3. <head>
  4. <meta charset='utf-8' />
  5. <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
  6. <link rel="stylesheet" href="/lib/simple-keyboard-3.7.2.css" />
  7. <link rel="stylesheet" href="/lib/keyboard.css" />
  8. <script src="lib/vconsole.js"></script>
  9. <script src="lib/vconsole-stat-plugin.min.js"></script>
  10. <script>
  11. // VConsole will be exported to `window.VConsole` by default.
  12. var vConsole = new window.VConsole();
  13. var parsecPlugin = new VConsole.VConsolePlugin('parsec', 'Parsec')
  14. window.frameInterval = localStorage.getItem('frameInterval') || 40;
  15. parsecPlugin.on('renderTab', function (callback) {
  16. var html = '<div id="vconsole-parsec"></div>';
  17. callback(html);
  18. setInterval(() => {
  19. $('#vconsole-parsec').html('frameInterval=' + (window.frameInterval || 0));
  20. }, 1000);
  21. });
  22. var type;
  23. parsecPlugin.on('addTool', function (callback) {
  24. var button = {
  25. name: 'Reload',
  26. onClick: function (event) {
  27. location.reload();
  28. }
  29. };
  30. function add(i) {
  31. window.frameInterval = (window.frameInterval || 40) + i;
  32. $('#vconsole-parsec').html('frameInterval=' + (window.frameInterval || 0));
  33. localStorage.setItem('frameInterval', window.frameInterval);
  34. }
  35. var button1 = {
  36. name: '-5',
  37. onClick: function (event) {
  38. add(-5)
  39. }
  40. };
  41. var button2 = {
  42. name: '-1',
  43. onClick: function (event) {
  44. add(-1)
  45. }
  46. };
  47. var button3 = {
  48. name: '+1',
  49. onClick: function (event) {
  50. add(1)
  51. }
  52. };
  53. var button4 = {
  54. name: '+5',
  55. onClick: function (event) {
  56. add(5)
  57. }
  58. };
  59. callback([button, button1, button2, button3, button4]);
  60. });
  61. vConsole.addPlugin(parsecPlugin);
  62. </script>
  63. <script src='lib/matoya.js'></script>
  64. <script src='lib/weblib.js'></script>
  65. <script src='lib/parsec.js'></script>
  66. </head>
  67. <body>
  68. <script>
  69. (async function () {
  70. const wasm = 'parsecd';
  71. const userEnv = PARSEC_ENV;
  72. const html = document.querySelector('html');
  73. html.style.width = '100%';
  74. html.style.height = '100%';
  75. html.style.margin = 0;
  76. const body = document.querySelector('body');
  77. body.style.width = '100%';
  78. body.style.height = '100%';
  79. body.style.background = 'black';
  80. body.style.overflow = 'hidden';
  81. body.style.margin = 0;
  82. if (!await MTY_Start(wasm, body, userEnv)) {
  83. body.style.fontFamily = 'sans-serif';
  84. body.style.fontSize = '30px';
  85. body.style.background = 'black';
  86. body.style.color = 'white';
  87. body.style.textAlign = 'center';
  88. body.style.padding = '10% 30px 0 30px';
  89. document.body.innerHTML =
  90. '<div>Your browser does not support the Parsec web app. The web app requires WebGL and WebAssembly 64-bit support.</div>' +
  91. '<div style="margin-top:30px">Check the <a href="https://parsec.app/downloads">Downloads</a> page for our native app.</div>';
  92. }
  93. window.history.replaceState(null, document.title, '/');
  94. })();
  95. console.log('%cSTOP! ✋ This area is intended for developers. Pasting something here could give strangers access to your Parsec account.', 'font-size: 18px; font-weight: 700;');
  96. </script>
  97. <div class="virtual-keyboard-window">
  98. <div class="window-top">Virtual Keyboard
  99. <button class="btn-close">
  100. <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32">
  101. <path
  102. d="M24 9.4L22.6 8L16 14.6L9.4 8L8 9.4l6.6 6.6L8 22.6L9.4 24l6.6-6.6l6.6 6.6l1.4-1.4l-6.6-6.6L24 9.4z"
  103. fill="currentColor"></path>
  104. </svg>
  105. </button>
  106. </div>
  107. <div class="window-content">
  108. <div class="simple-keyboard"></div>
  109. </div>
  110. </div>
  111. <div class="keyboard-toggle">
  112. <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24">
  113. <g fill="none">
  114. <path
  115. d="M19.745 5a2.25 2.25 0 0 1 2.25 2.25v9.505a2.25 2.25 0 0 1-2.25 2.25H4.25A2.25 2.25 0 0 1 2 16.755V7.25A2.25 2.25 0 0 1 4.25 5h15.495zm-2.495 9.5H6.75l-.102.007a.75.75 0 0 0 0 1.486L6.75 16h10.5l.102-.007a.75.75 0 0 0 0-1.486l-.102-.007zM16.5 11a1 1 0 1 0 0 2a1 1 0 0 0 0-2zm-2.995 0a1 1 0 1 0 0 2a1 1 0 0 0 0-2zm-3 0a1 1 0 1 0 0 2a1 1 0 0 0 0-2zm-3 0a1 1 0 1 0 0 2a1 1 0 0 0 0-2zM6 8a1 1 0 1 0 0 2a1 1 0 0 0 0-2zm2.995 0a1 1 0 1 0 0 2a1 1 0 0 0 0-2zm3 0a1 1 0 1 0 0 2a1 1 0 0 0 0-2zm3 0a1 1 0 1 0 0 2a1 1 0 0 0 0-2zm3 0a1 1 0 1 0 0 2a1 1 0 0 0 0-2z"
  116. fill="currentColor"></path>
  117. </g>
  118. </svg>
  119. </div>
  120. <script src="/lib/jquery-3.7.0.min.js"></script>
  121. <script src="/lib/jquery-ui.min.js"></script>
  122. <script src="/lib/jquery.ui.touch-punch.min.js"></script>
  123. <script src="/lib/simple-keyboard-3.7.2.js"></script>
  124. <script src="/lib/keycode.js"></script>
  125. <script src="/lib/keyboard.js"></script>
  126. </body>
  127. </html>