Advertisement
Guest User

index.html

a guest
May 24th, 2017
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.96 KB | None | 0 0
  1. <html itemscope itemtype="http://schema.org/Product" prefix="og: http://ogp.me/ns#" xmlns="http://www.w3.org/1999/html">
  2. <head>
  3. <meta charset="utf-8">
  4. <meta http-equiv="content-type" content="text/html;charset=utf-8">
  5. <!--#include virtual="base.html" -->
  6. <script>
  7. window.indexLoadedTime = window.performance.now();
  8. console.log("(TIME) index.html loaded:\t", indexLoadedTime);
  9. // XXX the code below listeners for errors and displays an error message
  10. // in the document body when any of the required files fails to load.
  11. // The intention is to prevent from displaying broken page.
  12. var criticalFiles = [
  13. "config.js",
  14. "utils.js",
  15. "do_external_connect.js",
  16. "interface_config.js",
  17. "logging_config.js",
  18. "lib-jitsi-meet.min.js",
  19. "app.bundle.min.js",
  20. "all.css"
  21. ];
  22. var loadErrHandler = function(e) {
  23. var target = e.target;
  24. // Error on <script> and <link>(CSS)
  25. // <script> will have .src and <link> .href
  26. var fileRef = (target.src ? target.src : target.href);
  27. if (("SCRIPT" === target.tagName || "LINK" === target.tagName)
  28. && criticalFiles.some(
  29. function(file) { return fileRef.indexOf(file) !== -1 })) {
  30. window.onload = function() {
  31. // The whole complex part below implements page reloads with
  32. // "exponential backoff". The retry attempt is passes as
  33. // "rCounter" query parameter
  34. var href = window.location.href;
  35.  
  36. var retryMatch = href.match(/.+(\?|&)rCounter=(\d+)/);
  37. var retryCountStr = retryMatch ? retryMatch[2] : "0";
  38. var retryCount = Number.parseInt(retryCountStr);
  39.  
  40. if (retryMatch == null) {
  41. var separator = href.indexOf("?") === -1 ? "?" : "&";
  42. var hashIdx = href.indexOf("#");
  43.  
  44. if (hashIdx === -1) {
  45. href += separator + "rCounter=1";
  46. } else {
  47. var hashPart = href.substr(hashIdx);
  48.  
  49. href = href.substr(0, hashIdx)
  50. + separator + "rCounter=1" + hashPart;
  51. }
  52. } else {
  53. var separator = retryMatch[1];
  54.  
  55. href = href.replace(
  56. /(\?|&)rCounter=(\d+)/,
  57. separator + "rCounter=" + (retryCount + 1));
  58. }
  59.  
  60. var delay = Math.pow(2, retryCount) * 2000;
  61. if (isNaN(delay) || delay < 2000 || delay > 60000)
  62. delay = 10000;
  63.  
  64. var showMoreText = "show more";
  65. var showLessText = "show less";
  66.  
  67. document.body.innerHTML
  68. = "<div style='"
  69. + "position: absolute;top: 50%;left: 50%;"
  70. + "text-align: center;"
  71. + "font-size: medium;"
  72. + "font-weight: 400;"
  73. + "transform: translate(-50%, -50%)'>"
  74. + "Uh oh! We couldn't fully download everything we needed :(" // jshint ignore:line
  75. + "<br/> "
  76. + "We will try again shortly. In the mean time, check for problems with your Internet connection!" // jshint ignore:line
  77. + "<br/><br/> "
  78. + "<div id='moreInfo' style='"
  79. + "display: none;'>" + "Missing " + fileRef
  80. + "<br/><br/></div>"
  81. + "<a id='showMore' style='"
  82. + "text-decoration: underline;"
  83. + "font-size:small;"
  84. + "cursor: pointer'>" + showMoreText + "</a>"
  85. + "&nbsp;&nbsp;&nbsp;"
  86. + "<a href='" + href + "' style='"
  87. + "text-decoration: underline;"
  88. + "font-size:small;"
  89. + "'>reload now</a>"
  90. + "</div>";
  91.  
  92. var showMoreElem = document.getElementById("showMore");
  93. showMoreElem.addEventListener('click', function () {
  94. var moreInfoElem
  95. = document.getElementById("moreInfo");
  96.  
  97. if (showMoreElem.innerHTML === showMoreText) {
  98. moreInfoElem.setAttribute(
  99. "style",
  100. "display: block;"
  101. + "color:#FF991F;"
  102. + "font-size:small;"
  103. + "user-select:text;");
  104. showMoreElem.innerHTML = showLessText;
  105. }
  106. else {
  107. moreInfoElem.setAttribute(
  108. "style", "display: none;");
  109. showMoreElem.innerHTML = showMoreText;
  110. }
  111. });
  112.  
  113. window.setTimeout(
  114. function () { window.location.replace(href); }, delay);
  115. };
  116. window.removeEventListener(
  117. 'error', loadErrHandler, true /* capture phase */);
  118. }
  119. };
  120. window.addEventListener(
  121. 'error', loadErrHandler, true /* capture phase type of listener */);
  122. </script>
  123. <script><!--#include virtual="config.js" --></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
  124. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
  125. <script src="utils.js?v=1"></script>
  126. <!--#include virtual="connection_optimization/connection_optimization.html" -->
  127. <script src="ceo-vision-connection.js?v=1"></script>
  128. <script src="connection_optimization/do_external_connect.js?v=1"></script>
  129. <script><!--#include virtual="interface_config.js" --></script>
  130. <script><!--#include virtual="logging_config.js" --></script>
  131. <script src="libs/lib-jitsi-meet.min.js?v=139"></script>
  132. <script src="libs/app.bundle.min.js?v=139"></script>
  133. <!--#include virtual="title.html" -->
  134. <link rel="stylesheet" href="css/all.css">
  135. <!--#include virtual="plugin.head.html" -->
  136. </head>
  137. <body>
  138. <div id="react"></div>
  139. <div id="keyboard-shortcuts" class="keyboard-shortcuts" style="display:none;">
  140. <div class="content">
  141. <ul id="keyboard-shortcuts-list" class="shortcuts-list">
  142. </ul>
  143. </div>
  144. </div>
  145. </body>
  146. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement