index.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>ZeroTier One</title>
  8. <link rel="stylesheet" href="zerotier.css">
  9. <script src="simpleajax.min.js"></script>
  10. <!-- <script src="https://fb.me/react-0.13.2.js"></script> -->
  11. <script src="react.min.js"></script>
  12. <script src="ztui.min.js"></script>
  13. </head>
  14. <body><div style="width: 100%; height: 100%;" id="main"></div></body>
  15. <script src="main.js"></script>
  16. <script>
  17. /* Windows hacks */
  18. function isIE() {
  19. var myNav = navigator.userAgent.toLowerCase();
  20. return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;
  21. }
  22. var ieVersion = isIE();
  23. function resizeMiddleScrollClasses() {
  24. var elems = document.getElementsByTagName('*'), i;
  25. for (i in elems) {
  26. if ((' ' + elems[i].className + ' ').indexOf(' middleScroll ') > -1) {
  27. elems[i].style.height = (document.body.clientHeight - (elems[i].parentNode.parentNode.previousElementSibling.clientHeight + elems[i].parentNode.parentNode.nextElementSibling.clientHeight)) + "px";
  28. }
  29. }
  30. }
  31. if (ieVersion !== false) {
  32. if (ieVersion < 7) {
  33. alert("Upgrade Internet Explorer on your system to use this interface. (detected version: " + ieVersion + ")");
  34. } else {
  35. resizeMiddleScrollClasses();
  36. window.onresize = resizeMiddleScrollClasses;
  37. }
  38. }
  39. /* MacGap hacks */
  40. if (typeof macgap !== 'undefined') {
  41. if (macgap.menu) {
  42. var tmp = macgap.menu.getItem("Help");
  43. if (tmp)
  44. tmp.remove();
  45. tmp = macgap.menu.getItem("Format");
  46. if (tmp)
  47. tmp.remove();
  48. tmp = macgap.menu.getItem("View");
  49. if (tmp)
  50. tmp.remove();
  51. tmp = macgap.menu.getItem("File");
  52. if (tmp)
  53. tmp.remove();
  54. }
  55. }
  56. </script>
  57. </html>