display.html 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <html>
  2. <head>
  3. <title>ArOZ Online Display Test</title>
  4. <link rel="stylesheet" href="../../../script/tocas/tocas.css">
  5. <script src="../../../script/tocas/tocas.js"></script>
  6. <script src="../../../script/jquery.min.js"></script>
  7. <style>
  8. body {
  9. background-color: #f9f9f9;
  10. }
  11. .fs {
  12. position: fixed;
  13. left: 0px;
  14. top: 0px;
  15. width: 100%;
  16. height: 100%;
  17. background-color: black;
  18. }
  19. </style>
  20. </head>
  21. <body>
  22. <div class="fs" onClick="nextColor(this);" style="display:none;">
  23. </div>
  24. <div id="startui" class="ts container">
  25. <br>
  26. <div class="ts segment">
  27. <div class="ts header">
  28. Display Testing
  29. <div class="sub header">This is a function for user to quick test their display.</div>
  30. </div>
  31. <p>This function will popup a new window. Please enter full screen with the new window and click anywhere on screen to change color.<br> Click the button below to start the test.</p>
  32. <button class="ts primary button" onClick='startTest();'>Start Test</button>
  33. </div>
  34. </div>
  35. <script>
  36. function startTest() {
  37. window.open("/SystemAO/info/display.html#test");
  38. }
  39. if (window.location.hash == "#test") {
  40. var colorList = ["black", "red", "blue", "green", "yellow", "purple", "white"];
  41. var code = 0;
  42. $(".fs").show();
  43. $("#startui").hide();
  44. function nextColor(object) {
  45. requestFullScreen(object);
  46. code = code + 1;
  47. if (code > colorList.length - 1) {
  48. code = 0;
  49. }
  50. $(".fs").css("background-color", colorList[code]);
  51. }
  52. function requestFullScreen(element) {
  53. // Supports most browsers and their versions.
  54. var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullScreen;
  55. if (requestMethod) { // Native full screen.
  56. requestMethod.call(element);
  57. } else if (typeof window.ActiveXObject !== "undefined") { // Older IE.
  58. var wscript = new ActiveXObject("WScript.Shell");
  59. if (wscript !== null) {
  60. wscript.SendKeys("{F11}");
  61. }
  62. }
  63. }
  64. }
  65. </script>
  66. </body>
  67. </html>