main.js 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. (function() {
  2. var d = "Translate",
  3. e = this || self;
  4. function f(a, w) {
  5. a = a.split(".");
  6. var b = e;
  7. a[0] in b || "undefined" == typeof b.execScript || b.execScript("var " + a[0]);
  8. for (var c; a.length && (c = a.shift());) a.length || void 0 === w ? b[c] && b[c] !== Object.prototype[c] ? b = b[c] : b = b[c] = {}: b[c] = w
  9. };
  10. var g = {
  11. 0 : d,
  12. 1 : "Cancel",
  13. 2 : "Close",
  14. 3 : function(a) {
  15. return "Google has automatically translated this page to: " + a
  16. },
  17. 4 : function(a) {
  18. return "Translated to: " + a
  19. },
  20. 5 : "Error: The server could not complete your request. Try again later.",
  21. 6 : "Learn more",
  22. 7 : function(a) {
  23. return "Powered by " + a
  24. },
  25. 8 : d,
  26. 9 : "Translation in progress",
  27. 10 : function(a) {
  28. return "Translate this page to: " + (a + " using Google Translate?")
  29. },
  30. 11 : function(a) {
  31. return "View this page in: " + a
  32. },
  33. 12 : "Show original",
  34. 13 : "The content of this local file will be sent to Google for translation using a secure connection.",
  35. 14 : "The content of this secure page will be sent to Google for translation using a secure connection.",
  36. 15 : "The content of this intranet page will be sent to Google for translation using a secure connection.",
  37. 16 : "Select Language",
  38. 17 : function(a) {
  39. return "Turn off " + (a + " translation")
  40. },
  41. 18 : function(a) {
  42. return "Turn off for: " + a
  43. },
  44. 19 : "Always hide",
  45. 20 : "Original text:",
  46. 21 : "Contribute a better translation",
  47. 22 : "Contribute",
  48. 23 : "Translate all",
  49. 24 : "Restore all",
  50. 25 : "Cancel all",
  51. 26 : "Translate sections to my language",
  52. 27 : function(a) {
  53. return "Translate everything to " + a
  54. },
  55. 28 : "Show original languages",
  56. 29 : "Options",
  57. 30 : "Turn off translation for this site",
  58. 31 : null,
  59. 32 : "Show alternative translations",
  60. 33 : "Click on words above to get alternative translations",
  61. 34 : "Use",
  62. 35 : "Drag with shift key to reorder",
  63. 36 : "Click for alternative translations",
  64. 37 : "Hold down the shift key, click, and drag the words above to reorder.",
  65. 38 : "Thank you for contributing your translation suggestion to Google Translate.",
  66. 39 : "Manage translation for this site",
  67. 40 : "Click a word for alternative translations, or double-click to edit directly",
  68. 41 : "Original text",
  69. 42 : d,
  70. 43 : d,
  71. 44 : "Your correction has been submitted.",
  72. 45 : "Error: The language of the webpage is not supported.",
  73. 46 : "Language Translate Widget"
  74. };
  75. var h = window.google && google.translate && google.translate._const;
  76. if (h) {
  77. var k;
  78. a: {
  79. for (var l = [], m = [""], n = 0; n < m.length; ++n) {
  80. var p = m[n].split(","),
  81. q = p[0];
  82. if (q) {
  83. var r = Number(p[1]);
  84. if (! (!r || .1 < r || 0 > r)) {
  85. var t = Number(p[2]),
  86. u = new Date,
  87. v = 1E4 * u.getFullYear() + 100 * (u.getMonth() + 1) + u.getDate(); ! t || t < v || l.push({
  88. version: q,
  89. ratio: r,
  90. a: t
  91. })
  92. }
  93. }
  94. }
  95. var x = 0,
  96. y = window.location.href.match(/google\.translate\.element\.random=([\d\.]+)/),
  97. z = Number(y && y[1]) || Math.random();
  98. for (n = 0; n < l.length; ++n) {
  99. var A = l[n];
  100. x += A.ratio;
  101. if (1 <= x) break;
  102. if (z < x) {
  103. k = A.version;
  104. break a
  105. }
  106. }
  107. k = "TE_20190916_00"
  108. }
  109. var B = "/element/%s/e/js/element/element_main.js".replace("%s", k);
  110. if ("0" == k) {
  111. var C = " element %s e js element element_main.js".split(" ");
  112. C[C.length - 1] = "main.js";
  113. B = C.join("/").replace("%s", k)
  114. }
  115. if (h._cjlc) h._cjlc(h._pas + h._pah + B);
  116. else {
  117. var D = h._pas + h._pah + B,
  118. E = document.createElement("script");
  119. E.type = "text/javascript";
  120. E.charset = "UTF-8";
  121. // E.src = D;
  122. E.src = resourcesUrl+"/js/element_main.js";
  123. var F = document.getElementsByTagName("head")[0];
  124. F || (F = document.body.parentNode.appendChild(document.createElement("head")));
  125. F.appendChild(E)
  126. }
  127. f("google.translate.m", g);
  128. f("google.translate.v", k)
  129. };
  130. }).call(window)