WoTStatScript

More info for World of Tanks profile page. Updated for the new style.

当前为 2014-05-15 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name WoTStatScript
  3. // @version 0.9.0.88
  4. // @description More info for World of Tanks profile page. Updated for the new style.
  5. // @author Orrie
  6. // @contributor Boom_Box
  7. // @namespace http://forum.worldoftanks.eu/index.php?/topic/263423-
  8. // @icon http://dl.dropboxusercontent.com/u/12497046/wot/projects/statscript/img/icon.png
  9. // @match http://worldoftanks.eu/*/*/*
  10. // @match http://worldoftanks.com/*/*/*
  11. // @match http://worldoftanks.ru/*/*/*
  12. // @match http://worldoftanks.asia/*/*/*
  13. // @match http://worldoftanks.kr/*/*/*
  14. // @include http://worldoftanks.eu/*/*/*
  15. // @include http://worldoftanks.com/*/*/*
  16. // @include http://worldoftanks.ru/*/*/*
  17. // @include http://worldoftanks.asia/*/*/*
  18. // @include http://worldoftanks.kr/*/*/*
  19. // @grant GM_xmlhttpRequest
  20. // ==/UserScript==
  21. /*
  22. Changelog: http://dl.dropboxusercontent.com/u/12497046/wot/projects/statscript/WoTStatScript-changelog.txt
  23. */
  24.  
  25. // script variables
  26. var scripthost = "https://greasyfork.org/scripts/661-wotstatscript";
  27. threadlink = "http://forum.worldoftanks.eu/index.php?/topic/263423-";
  28. sid = "orrie_js_174043"; // noobmeter api id
  29. nm_host = "http://noobmeter.com";
  30. scriptlink = "<div class='b-scriptlink'><a target='_blank' href="+scripthost+">Script</a> version 0.9.0.88 - <a target='_blank' href="+threadlink+">Thread</a></div>";
  31.  
  32. // get server info and webpage
  33. var wg_host = document.location.host;
  34. server = wg_host.match(/\.([^\.]+)$/)[1];
  35. wg_path = document.location.pathname;
  36. wg_accounts = wg_path.match(/(community|uc)\/accounts\/\d+/);
  37. if (wg_path.match(/(edit|battles|provinces|reserve|treasury)/)) {
  38. wg_clans = null;
  39. }
  40. else {
  41. wg_clans = wg_path.match(/(community|uc)\/clans\/[\w\-]+/);
  42. }
  43.  
  44. // determine browser types, beware inconsistencies, no method is reliable.
  45. var gecko = /Mozilla/.test(navigator.appCodeName), // true for ff (and chrome lol)
  46. opera = /Opera/.test(navigator.appName), // only true for opera
  47. chrome = /Chrome/.test(navigator.userAgent);
  48. if (opera || chrome) { gecko = false; }
  49.  
  50. // globally inserting functions into head as scripts
  51. var scripts = [copyClipboard];
  52. for (i=0; i<scripts.length; ++i) {
  53. var script = document.createElement('script');
  54. script.className = "wotstatscript";
  55. script.type = "text/javascript";
  56. script.textContent = scripts[i].toString();
  57. document.head.appendChild(script);
  58. }
  59.  
  60. // global colour defines
  61. var stat = (function() {
  62. var color = {
  63. sup_uni: "5A3175", // super unicum
  64. unicum: "6A4B9F", // unicum
  65. great: "4A92B7", // great
  66. v_good: "4C762E", // very good
  67. good: "589031", // good
  68. avg: "D7B600", // average
  69. b_avg: "D84300", // below average
  70. bad: "D00900", // bad
  71. v_bad: "940000", // very bad
  72. none: "6B6B6B" // default gray
  73. };
  74. return { color: color };
  75. })();
  76.  
  77. // colour scale array
  78. var colStatArr = [
  79. { color: stat.color.sup_uni, wn8: 2900, scale_wn8: 100, wn7: 2050, scale_wn7: 97.56, eff: 2050, scale_eff: 99.67, nm: 2000, battles: 25000, winrate: 65, survrate: 50, hitrate: 80 },
  80. { color: stat.color.unicum, wn8: 2350, scale_wn8: 87.96, wn7: 1850, scale_wn7: 90.31, eff: 1800, scale_eff: 94.94, nm: 1950, battles: 21000, winrate: 60, survrate: 45, hitrate: 75 },
  81. { color: stat.color.great, wn8: 1900, scale_wn8: 73.54, wn7: 1550, scale_wn7: 74.56, eff: 1500, scale_eff: 78.50, nm: 1750, battles: 17000, winrate: 57, survrate: 40, hitrate: 70 },
  82. { color: stat.color.v_good, wn8: 1600, scale_wn8: 62.72, wn7: 1350, scale_wn7: 62.75, battles: 13000, winrate: 54, survrate: 35, hitrate: 65 },
  83. { color: stat.color.good, wn8: 1250, scale_wn8: 50.21, wn7: 1100, scale_wn7: 48.21, eff: 1200, scale_eff: 56.71, nm: 1450, battles: 10000, winrate: 52, survrate: 30, hitrate: 60 },
  84. { color: stat.color.avg, wn8: 900, scale_wn8: 38.33, wn7: 900, scale_wn7: 37.44, eff: 900, scale_eff: 36.26, nm: 1250, battles: 7000, winrate: 48, survrate: 25, hitrate: 50 },
  85. { color: stat.color.b_avg, wn8: 600, scale_wn8: 28.07, wn7: 700, scale_wn7: 27.69, eff: 600, scale_eff: 14.42, nm: 1150, battles: 3000, winrate: 46, survrate: 20, hitrate: 45 },
  86. { color: stat.color.bad, wn8: 300, scale_wn8: 16.13, wn7: 500, scale_wn7: 18.87, battles: 1000, winrate: 43, survrate: 15, hitrate: 40 },
  87. { color: stat.color.v_bad, wn8: 0, scale_wn8: 0, wn7: 0, scale_wn7: 0, eff: 0, scale_eff: 0, nm: 0, battles: 0, winrate: 0, survrate: 0, hitrate: 0 }
  88. ];
  89.  
  90. // localization
  91. // cz-czech - Crabt33
  92. // de-german - ArtiOpa and Crakker
  93. // fr-french - SuperPommeDeTerre
  94. // pl-polish - KeluMocy
  95. // ru-russian - dimon222
  96. var locale = {
  97. // profile page
  98. p01: { lang: "Go to Bottom", ru: "Пролистать вниз", cz: "Konec stránky", de: "nach unten", fr: "Aller à la fin", pl: "Koniec strony" },
  99. p02: { lang: "Go to Top", ru: "Пролистать наверх", cz: "Začátek stránky", de: "nach oben", fr: "Aller au début", pl: "Początek strony" },
  100. p03: { lang: "Days Ago", ru: "Дней назад", cz: "dnů", de: "Tage in WOT aktiv", fr: "jours", pl: "Dni temu" },
  101. p04: { lang: "Player Stats:", ru: "Статистика игрока:", cz: "Stat. hráče:", de: "Spielerstatistik", fr: "Statistiques du joueur:", pl: "Statystyki gracza:" },
  102. p05: { lang: "Signature:", ru: "Подпись:", cz: "Podpis:", de: "Forumsignatur", fr: "Signature:", pl: "Sygnatura do forum:" },
  103. p06: { lang: "Light", ru: "Светлые тона", cz: "Světlý", de: "Signatur Weiß", fr: "Claire", pl: "Jasna" },
  104. p07: { lang: "Dark", ru: "Тёмные тона", cz: "Tmavý", de: "Signatur Schwarz", fr: "Foncée", pl: "Ciemna" },
  105. p08: { lang: "Replays:", ru: "Реплеи:", cz: "Záznamy:", de: "Wiederholung", fr: "Replays:", pl: "Powtórki:" },
  106. p09: { lang: "Victories", ru: "Победы", cz: "Vítězství", de: "Siege", fr: "Victoires", pl: "Zwycięstw" },
  107. p10: { lang: "Battles Participated", ru: "Участий в битвах", cz: "Počet bitev", de: "Gefechte geführt", fr: "Batailles participées", pl: "Bitew" },
  108. p11: { lang: "Average Experience", ru: "Средний опыт", cz: "Průměrné zkušenosti", de: "Durchnittl. Erfahrung", fr: "Expérience moyenne", pl: "Średnie doświadczenie" },
  109. p12: { lang: "Average Tier", ru: "Средний уровень танка", cz: "Průměrný Tier", de: "Durchschnittl. Stufe", fr: "Tiers moyen", pl: "Średni poziom pojazdu" },
  110. p13: { lang: "Win/Loss Ratio", ru: "Отношение Победы/Поражения", cz: "Poměr vítězství/porážek", de: "Verhältnis Siege/ Niederlagen", fr: "Ratio Victoires/Défaites", pl: "Zwycięstwa/porażki" },
  111. p14: { lang: "Performance Ratings", ru: "Рейтинги производительности", cz: "Hodnocení bojového výkonu", de: "Leistungsverhältnis", fr: "Indices de performances", pl: "Statystyki wydajności" },
  112. p15: { lang: "WN8", ru: "WN8", cz: "WN8", de: "WN8", fr: "WN8", pl: "WN8" },
  113. p16: { lang: "Efficiency", ru: "Эффективность", cz: "Efficiency", de: "Effizienz", fr: "Efficacité", pl: "Efficiency" },
  114. p17: { lang: "NoobMeter", ru: "NoobMeter", cz: "NoobMeter", de: "NoobMeter", fr: "NoobMeter", pl: "NoobMeter" },
  115. p18: { lang: "Fetching...", ru: "Загрузка...", cz: "Načítám...", de: "abrufen...", fr: "Récupération...", pl: "Pobieranie..." },
  116. p19: { lang: "Performance Rating Calculations", ru: "Вычисления рейтинга производительности", cz: "Výpočet hodnocení bojového výkonu", de: "Leistungsberechnung", fr: "Calculs des indicateurs de performances", pl: "Obliczenia statystyk wydajności" },
  117. p20: { lang: "Formula Type", ru: "Тип формулы", cz: "Typ výpočtu", de: "Formel", fr: "Type de formule", pl: "Formuła" },
  118. p21: { lang: "Total", ru: "Всего", cz: "Celkem", de: "Gesamt", fr: "Total", pl: "Wynik" },
  119. p22: { lang: "Scaled", ru: "Шкала", cz: "Stupnice", de: "Skaliert", fr: "A l'échelle", pl: "Skalowanie" },
  120. p23: { lang: "Destroyed", ru: "Уничтожено", cz: "Zničeno", de: "Zerstört", fr: "Détruits", pl: "Fragi" },
  121. p24: { lang: "Damage", ru: "Урон", cz: "Poškození", de: "Schaden", fr: "Dommages", pl: "Obrażenia" },
  122. p25: { lang: "Detected", ru: "Обнаружено", cz: "Detekováno", de: "Aufgeklärt", fr: "Détectés", pl: "Wykrycia" },
  123. p26: { lang: "Capping", ru: "Захват", cz: "Obsazení", de: "Erobert", fr: "Capture", pl: "Zdobycie bazy" },
  124. p27: { lang: "Defense", ru: "Оборона", cz: "Obrana", de: "Verteidigt", fr: "Défense", pl: "Obrona bazy" },
  125. p28: { lang: "Victories", ru: "Победы", cz: "Vítězství", de: "Siege", fr: "Victoires", pl: "Zwycięstwa" },
  126. p29: { lang: "WN8", ru: "WN8", cz: "WN8", de: "WN8", fr: "WN8", pl: "WN8" },
  127. p30: { lang: "WN7", ru: "WN7", cz: "WN7", de: "WN7", fr: "WN7", pl: "WN7" },
  128. p31: { lang: "Efficiency", ru: "Эффективность", cz: "Efficiency", de: "Effizienz", fr: "Efficacité", pl: "Efficiency" },
  129. p32: { lang: "What is WN Efficiency?", ru: "Что такое WN эффективность?", cz: "Co je WN hodnocení?", de: "Was bedeutet WN Effizienz", fr: "Qu'est que l'efficacité WN ?", pl: "Czym jest statystyka wydajności WN?" },
  130. p33: { lang: "Ace Tanker", ru: "Мастер", cz: "Hrdina", de: "Panzer Ass", fr: "As du char", pl: "As Pancerny" },
  131. p34: { lang: "1st Class", ru: "1 степень", cz: "1. třídy", de: "1ter Klasse", fr: "Classe 1", pl: "Pierwsza Klasa" },
  132. p35: { lang: "2nd Class", ru: "2 степень", cz: "2. třídy", de: "2ter Klasse", fr: "Classe 2", pl: "Druga Klasa" },
  133. p36: { lang: "3rd Class", ru: "3 степень", cz: "3. třídy", de: "3ter Klasse", fr: "Classe 3", pl: "Trzecia Klasa" },
  134. p37: { lang: "No Badge", ru: "Нет значка", cz: "Nezískáno", de: "kein Orden", fr: "Aucun badge", pl: "Bez odznaki" },
  135. p38: { lang: "Total Vehicles", ru: "Общее количество техники", cz: "Celkem vozidel", de: "Alle Fahrzeuge", fr: "Nombre total de véhicules", pl: "Całkowita liczba pojazdów" },
  136. p39: { lang: "Battles Participated:", ru: "Участий в битвах:", cz: "Počet bitev:", de: "An Gefechten teilgenommen", fr: "Batailles participées:", pl: "Bitwy:" },
  137. p40: { lang: "Victories:", ru: "Победы:", cz: "Vítězství:", de: "Siege", fr: "Victoires:", pl: "Zwycięstwa:" },
  138. p41: { lang: "Defeats:", ru: "Поражения:", cz: "Porážek:", de: "Niederlagen", fr: "Défaites:", pl: "Porażki:" },
  139. p42: { lang: "Draws:", ru: "Ничья:", cz: "Remíza:", de: "Unentschieden", fr: "Egalités:", pl: "Remisy:" },
  140. p43: { lang: "Battles Survived:", ru: "Битв пережито:", cz: "Přežito bitev:", de: "Gefechte überlebt", fr: "Batailles survécues:", pl: "Przetrwane bitwy:" },
  141. p44: { lang: "Average Battles per Day:", ru: "Среднее число битв за день:", cz: "Průměrný počet bitev za den:", de: "Durschnittliche Gefechte pro Tag", fr: "Nombre moyen de batailles par jour:", pl: "Średnia bitew na dzień:" },
  142. p45: { lang: "Experience:", ru: "Опыт:", cz: "Zkušenosti:", de: "Erfahrung", fr: "Expérience:", pl: "Doświadczenie:" },
  143. p46: { lang: "Average Experience per Battle:", ru: "Средний опыт за битву:", cz: "Průměrné zkušenosti za bitvu:", de: "Durchschnittserfahrung", fr: "Expérience moyenne par bataille:", pl: "Średnie doświadczenie na bitwę:" },
  144. p47: { lang: "Maximum Experience per Battle:", ru: "Максимальный опыт за битву:", cz: "Maximální zkušenosti za bitvu:", de: "Höchste Gefechtserfahrung", fr: "Expérience maximum par bataille:", pl: "Maksymalne doświadczenie na bitwę:" },
  145. p48: { lang: "Destroyed:", ru: "Уничтожено:", cz: "Zničeno:", de: "Zerstört", fr: "Détruits", pl: "Zniszczeni przeciwnicy:" },
  146. p49: { lang: "Deaths:", ru: "Смертей:", cz: "Nepřežil:", de: "Tode", fr: "Morts", pl: "Zniszczony:" },
  147. p50: { lang: "Detected:", ru: "Обнаружено", cz: "Detekováno:", de: "Aufgeklärt", fr: "Détectés", pl: "Wykrytych:" },
  148. p51: { lang: "Hit Ratio:", ru: "Коэффициент попаданий:", cz: "Přesnost střelby:", de: "Trefferquote", fr: "Ratio de hit", pl: "Celność:" },
  149. p52: { lang: "Damage Caused:", ru: "Урона нанесено:", cz: "Udělené poškození:", de: "Schaden verursacht", fr: "Dommages causés:", pl: "Zadane obrażenia:" },
  150. p53: { lang: "Damage Received:", ru: "Урона получено:", cz: "Přijaté poškození:", de: "Schaden erhalten", fr: "Dommages reçus:", pl: "Otrzymane obrażenia:" },
  151. p54: { lang: "Base Capture Points:", ru: "Очки захвата:", cz: "Bodů obsazení základny:", de: "Eroberungspunkte", fr: "Points de capture de base:", pl: "Punkty przejęcia bazy:" },
  152. p55: { lang: "Base Defense Points:", ru: "Очки обороны:", cz: "Bodů obrany základny:", de: "Verteidigungspunkte", fr: "Points de défense de base:", pl: "Punkty obrony bazy:" },
  153. p56: { lang: "Average Tier:", ru: "Средний уровень:", cz: "Průměrný Tier:", de: "Durchschnittliche Stufe", fr: "Tiers moyen:", pl: "Średni poziom pojazdów:" },
  154. p57: { lang: "Vehicle Tiers", ru: "Уровни техники", cz: "Tiery vozidel", de: "Fahrzeuge Stufe", fr: "Tiers du véhicule", pl: "Poziomy czołgów" },
  155. p58: { lang: "Tier", ru: "Уровень", cz: "Tier", de: "Stufe", fr: "Tiers", pl: "Poziom" },
  156. p59: { lang: "Total Vehicles:", ru: "Количество техники:", cz: "Celkem vozidel:", de: "Gesamt Fahrzeuge", fr: "Nombre total de véhicules:", pl: "Całkowita liczba pojazdów:" },
  157. p60: { lang: "Tankopedia", ru: "Танковедение", cz: "Tankpédie", de: "Tankopedia", fr: "Tankopedia", pl: "Tankopedia" },
  158. p61: { lang: "Tank Statistics", ru: "Статистика танка", cz: "Statistiky vozidel", de: "Panzer Statistik", fr: "Statistiques des chars", pl: "Statystyki czołgu" },
  159. p62: { lang: "Premium Tanks", ru: "Премиум танки", cz: "Premium tanky", de: "Premium Panzer", fr: "Chars premiums", pl: "Czołgi premium" },
  160. p63: { lang: "Copy stats to Clipboard", ru: "Скопировать в буфер обмена", cz: "Kopírovat Stat. do schránky", de: "Statistiken in Zwischenablage kopieren", fr: "Copier les statistiques vers le presse-papiers", pl: "Kopiuj statystyki do schowka" },
  161. p64: {
  162. lang: "Press Ctrl+C, or Right-Click and Copy",
  163. ru: "Нажмите Ctrl+C или ПКМ и Скопировать",
  164. cz: "Stiskni Ctrl+C, nebo klikni pravým tl. myši a vyber Kopírovat",
  165. de: "STRG+C/ rechter Mausklick und Kopieren",
  166. fr: "Appuyez sur Ctrl+C, ou clic droit et Copier",
  167. pl: "Naciśnij Ctrl+C, lub prawy klawisz myszy i 'Kopiuj'"
  168. },
  169. p65: {
  170. lang: "WoTStatScript not active, because of player having 0 battles",
  171. ru: "Скрипт неактивен, т.к. у игрока 0 битв",
  172. cz: "WoTStatScript není aktivní, protože hráč má 0 bitev",
  173. de: "WoTStatScript inaktiv wegen fehlender Gefechte",
  174. fr: "WoTStatScript n'est pas actif, car le joueur a 0 batailles",
  175. pl: "WoTStatScript nieaktywny, ponieważ gracz rozegrał 0 bitew"
  176. },
  177. p66: { lang: "Clan Stats:", ru: "Статистика клана:", cz: "Stat. klanu:", de: "Clanstatistiken", fr: "Statistiques du clan:", pl: "Statystyki klanu:" },
  178. p67: { lang: "Replays:", ru: "Реплеи:", cz: "Záznamy:", de: "Wiederholungen", fr: "Replays:", pl: "Powtórki:" },
  179. p68: { lang: "Tier 10 Only", ru: "Уровень 10 Только", cz: "Pouze Tier 10", de: "nur Stufe 10", fr: "Seulement les tiers 10", pl: "Tylko 10 tier" },
  180. p69: {
  181. lang: "Battles missing from API, ratings may be inaccurate",
  182. ru: "Отсутствует Battles от API, рейтинги могут быть неточными",
  183. cz: "Některé bitvy se z API nenačetly, hodnocení může být nepřesné",
  184. de: "Fehlende API Gefechtsdaten, Bewertungen können ungenau sein",
  185. fr: "Des batailles manquent de l'API, les indices peuvent être faussés",
  186. pl: "Brakujące bitwy, obliczenia mogą być niedokładne"
  187. },
  188. p70: { lang: "Hit Ratio", ru: "Коэффициент попаданий", cz: "Přesnost střelby", de: "Trefferquote", fr: "Ratio de hit", pl: "Celność" },
  189. p71: { lang: "Average Damage", ru: "Средний Урона", cz: "Průměrné poškození", de: "Durchschnittlicher Schaden", fr: "Dommages moyens", pl: "Średnie obrażenia" },
  190. p72: { lang: "Stats for", ru: "Cтатистика для", cz: "Statistika hráče", de: "Statistik für", fr: "Statistiques pour ", pl: "Statystyki z" },
  191. p73: { lang: "Battles:", ru: "Битвы:", cz: "Bitev:", de: "Gefechte", fr: "Batailles:", pl: "Bitew:" },
  192. // clan page
  193. c01: { lang: "Clan Stats / Replays:", ru: "Статистика клана / Реплеи:", cz: "Statistiky klanu / Záznamy", de: "Clan Statistiken / Wiederholungen", fr: "Statistiques du clan / Replays:", pl: "Statystyki klanu / Powtórki:" },
  194. //p00: { lang: "p00_en", ru: "p00_ru", cz: "", de: "", fr: ":", pl: ""},
  195. end: {}
  196. };
  197.  
  198. // region settings and language detection
  199. // wotlabs, noobmeter, mywotstats, feldzug, wotcs, wotreplays and wot-news
  200. var lang_detect = document.getElementsByClassName('b-portalmenu_links_list_point')[4].firstElementChild.innerHTML.toLowerCase();
  201. wl_srv = nm_srv = mws_srv = fz_srv = wr_srv = wn_srv = null;
  202. switch(server) {
  203. case ("eu"):
  204. wl_srv = nm_srv = mws_srv = fz_srv = wr_srv = wn_srv = server;
  205. switch(lang_detect) {
  206. case ("support"): break; // english
  207. case ("podpora"): for (var x in locale) { locale[x].lang = locale[x].cz; } break; // czech
  208. case ("kundendienst"): for (var x in locale) { locale[x].lang = locale[x].de; } break; // german
  209. case ("soporte"): break; // spanish
  210. case ("aide"): for (var x in locale) { locale[x].lang = locale[x].fr; } break; // french
  211. case ("pomoc"): for (var x in locale) { locale[x].lang = locale[x].pl; } break; // polish
  212. case ("destek"): break; // turkish
  213. default: break;
  214. }
  215. break;
  216. case ("ru"): // russian
  217. nm_srv = fz_srv = wr_srv = wn_srv = server;
  218. for (var x in locale) {
  219. locale[x].lang = locale[x].ru;
  220. }
  221. break;
  222. case ("com"):
  223. wl_srv = nm_srv = mws_srv = fz_srv = "na"; wr_srv = server; wn_srv = "us";
  224. switch(lang_detect) {
  225. case ("support"): locale.p27.lang = "Defence"; locale.p55.lang = "Base Defence Points:"; break; // american - muh freedom
  226. case ("soporte"): break; // argentinian spanish
  227. case ("suporte"): break; // brazilian portuguese
  228. default: break;
  229. }
  230. break;
  231. case ("asia"):
  232. wl_srv = nm_srv = mws_srv = wn_srv = "sea"; fz_srv = server; wr_srv = "com";
  233. switch(lang_detect) {
  234. case ("support"): break; // english
  235. case ("支援"): break; // thai
  236. case ("サポート"): break; // japanese
  237. case ("สนับสนุน"): break; // taiwanese mandarin
  238. default: break;
  239. }
  240. break;
  241. case ("kr"): // korean
  242. nm_srv = fz_srv = server; wr_srv = "com";
  243. break;
  244. default: break;
  245. }
  246.  
  247. // variables for dropbox and data uri
  248. // dropbox url
  249. var dropbox = "https://dl.dropboxusercontent.com/u/12497046/wot/projects/statscript/img";
  250.  
  251. // data uri
  252. uri_context_menu = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPQAAAABCAIAAABmEhQDAAAAHklEQVQoU2MAAj4BAR5ePi6eUTSKhgni4eFjYGAAAN9YIhjam+zlAAAAAElFTkSuQmCC";
  253. uri_pr_hitrate = "data:image/png;base64,iVBORw0KGgoAAA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wHLNME3r6g6LjgYElAgAgiEWt2B5M+YUqLRcFCu1tAsaSIaxvhAD1yOneefkUrnMstrqe//5KVXfgxgjiluvd1aY2JMO2MpdjH31kJbNl+RAAzuXGEYIE4AXE7U6/V3NvV8EPGaywm6LnlKkQFAM811z+dUtYbBHxZEbLJBLq/N8Te5dn3BS3ZE675COpcvXvjZuenTAJYYB1tETB8zyOxkxlqv40yQMRnjPf4/a4a2vEe1juJd9vOZLLPcSuw8s8pkmBqjtiZYaLn3mSqzySSZttYGtMWARuvYgn6NaaMFMfoWGswK81bL5GrLcJ1R2CLZcq0Zr2Uw3Uow1DpPtxhtSt2mQcEYt1zDa5koMXkm3TJWvDW5rfolvxqAFmiL3qMAAAAASUVORK5CYII=";
  255. uri_nm_logo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABgUlEQVQ4y92SPWsUYRSFn/POzE4MgkhMKyKICAEjiUksgoWClY0WYifKDlj4VyxsDGvlgmhtLUiIkoSNiLEWCwN+dmvAnZl3jkV2lxArSz3d/eDe53Iu/NOabb8J6cHkfLGZbXUWq1E8c2c7kxpPhF8unfPu0bk4qqWqz+jggAtFL6uor9hhLqjZnkwHq7ip+/WRJlF50tYs0oLwF5vdPwhKKCHDguiEfpUBkKh6aMIT8MutzmJ3TDFGb/duA7L91HBTgAEYQlqHgeOH9PPt/oUCWCpezVTk7z1sFpwG7gMt4C64a7QCdGUTVF9LQ/l6feXiN80Xmw8aJ/cQxm6AIKkAXgAfgWnbZyVNgp8bjdAIqi8HW1MMeSUs2MG+ZfsTeMdwQrBs+AAgPAQ1gl0BnC82njVOboxPkGujVHhglMuORonYywfid8nXe52ltbGNC8X6JaNTQapjrGNjchH7VutYnvhHJJ3Cg8+mdXSCr4/XOlcH+7xf1d984Fx7I/D/6Dd9b6wCx93gcQAAAABJRU5ErkJggg==";
  256. uri_rating_meter = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA3kAAAASCAMAAADR9efjAAABRFBMVEUkFC8qHkAuWnEvSR0xGz81aIM2VCE3WR45KVY7dJE8XSQ9IVA/ZyNCLmNFiKtGcidHbitIM2xMNnFShi5UO35cAABdnr9fhURjRpRqAABqnEdyqsd0lV11AAB6Xql9qV+BBgCFcQCGKgCKAACLc7SUBgCZggCaMACfGxulBwCqkACrNQCsOTnCCADJqgDKPwDVIxvbQDnbvhvcVxvgxjnhbTkkFC8qHkAuWnEvSR0xGz81aIM2VCE3WR45KVY7dJE8XSQ9IVA/ZyNCLmNFiKtGcidHbitIM2xMNnFShi5UO35cAABdnr9fhURjRpRqAABqnEdyqsd0lV11AAB6Xql9qV+BBgCFcQCGKgCKAACLc7SUBgCZggCaMACfGxulBwCqkACrNQCsOTnCCADJqgDKPwDVIxvbQDnbvhvcVxvgxjnhbTlFm8EBAAAANnRSTlNubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm49/hDAAAABRklEQVR42u3aMW6DQBCF4We8JDYOOUTq3MH3r3OHyCmcwpFCMAsbzSHezo71il/TYRkQ+sSQ3pGRSB1RsCPVY0NHamezTpceC+r0Rzz23WYTveKOpwD9pC8kZE7Ua70+xn10s1mnghV7Up3NJprsvwZoSvaMGEiNyDiQGojHfrZZp739Vp0muyakZhyxNNEJOURzOkub0qa0KW1Km9KmtCltSpvSJk2bHzxt+taHUm7haPYT4TVbbLp2YGjzytKmfyeSckPdXzeE12xxF+zIOF8zS5v+DaGUWzia/UZ4zW7ugu0Y2szpLG0+sDbfpE1pU9qUNqVNaVPalDZ9tUl4txmv0WTm2mrTtav/hqvZLby0ycr/C4xk07WLTde2Zrfw0iZ14+/aYtO1FxOja7/NbuH1blPalDalTWlT2pQ2pU1pU9oMps1/l3rfXyRbwecAAAAASUVORK5CYII=";
  257. uri_rating_meter_marker = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAANCAQAAADLNWwDAAAAV0lEQVQI12NgEGQQ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Yuh70Dlw/Jjp8uBfvww5i532Qv9ixI85o+i73W1olAhajsZbE2LqERlfZ6ScJV69T/U5azwj7fX2C8NGrojfwvzsHxEZxYX7WvHU6frYoZH5R6xUX4CLIsRFWOgnVRiDAv2KqSZpRJY9Yt1YXnqwO2XHlkbs/3Jn/LmKsvwuIsNcc0bh9IhVFxujqUasODouTIdjRzTHz+JjtRWQi8xdbGc0o+FL6PtOQUiRgiJBS0G2/y9Ia5sijRChoNtOPxaE8I3s9Tp1JiIE0cGKEL6Z/7mG4034toaPENbTc0BkjIUQVqMFoHXbkmJP8hHCZETMiUR08BHCauSmkEvyxkIIq1EIIgPRwUcIi4koPk57FJEBr3x2sSKEv2VeSsiQ8hEyPcrqP71wGsC02QAcAAAAAElFTkSuQmCC";
  259. uri_badges_class_none = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAfCAYAAABtYXSPAAAFVklEQVR42q2Xf0idVRjHu/f95dxVBGvNJlM2lI2hbW5sqMo23SDa2JaOtWBDCuZG2QBawZis0WA4pgtMREUQFXWJiASIGgkgEBWRKSD9GYAVEDQE+qtOzweey7nck12vdODLc5/3fL/f87znx/ve94X/aDEbFc61TXSZtFk2X6PnmGUe2OVYeNZ/aw1BXAWxtN+a66A2p7nXrcYnT/vtZVEQIi3MigONtjAH2qd810N9MzcV2DsIFTmCHfbOMxVjeejQWy+dZS0y86xYUSR48fr169MHDhx4czvFoEOPD372JjefHTu1wM5GflFR0fujo6MmNzf3s97e3pJsioGPDj0++OFriwGW7yyRVp8rSOzZs+fVs2fPfj03N2ck/3xoaKgCYllZWRzs3r3bKy4u9goLCz0iebIPHnx06PHBD1/1j9KWyikkTBYjrbKlpeXvwcHBv2SaKeaLvr6+GsjHjh3zgCyBf/ToUW/fvn0ekTzZBw8+OvT44IdvSjFhWkHO7mcaXwqC4PbMzIwB7e3tJhaLfTkwMNCAoLa2NgCHDx8OGxoa/EOHDvlE8mQfPPjo0Ce98MWfcdzTaWfG152/My8vr6ygoG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OhUH1rPrD7o7LeNxkCPY5XeaavgPUUby0AkB/TDg49O9dYP/6yb+9GVELwiKNJYIigmJ5Kn9Secj8JtNfcLEgR26Yhbyl2fbTcr9pzjb3N7Et1j61mf/6k539FuEXGnL8si/gEY8SzOXUsBvQAAAABJRU5ErkJggg==";
  260. uri_badges_class_total = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAfCAQAAADHaLwEAAAErklEQVQYGQXAD4yWdR0A8M/39zzv8R4cB4fADmUorjRUmULKNDetVMtcTWdYbra0aJZrjmVZrY1yW26LcmuMZCZrJUbaLEfGRjUczjnHTUXaIADjPzAABLw74O55vg4ACIQQAiEAABAAAAAANSohBIAQAIoCKCAUgAKg0qq1QoVQBAgUFC231mpFqwgpAAqARqCgVdQCIVC0CBW3UVCrhAoFCEARWpWCIpyTAgFaVGgVtdBKKYwJoaUAWnQQ+h968VNfBgAApPa6iz//mn5FkToKgoIQKlCbMOvrd96775aVc7inHtr92+a55vlmRf4uNxy+oY+Vc07fuOhzd680RVFLrZDUSAW1Srlk7lUPzjAys7efPxy9ZeCP0rhhPZbM+MuRBTN6+5vLue32zfOOveeCGuOIgiJUMPHy29994MY19B6btePUwoFXdc1wjX4D1rqn++bho7P39f3H3CkPvj64WEcIIShCIoVJY7fdG9PLpaL3s6tvmHq/p/zckJPW+4Ufme/OvgWr9V3veHlEfZepoJKylopQK5OnVtdcMNWgLAe6w/6kccI9jjvrFdN0nPPuRD2TdHVcmD0w+9QZjUaIgkSr67uPLdllu2foG467DHlUOGXEB3q87IsuMTlMfMGQNzy6aOA3eoVQyQJCMe2ji1sLbfItej5w0gW11Dprkta4fpUPQ/chZ7SutH9Av0qtFQWEEPnOG252g9k4oeO0Lnaba4LWMWmm0VR6LPAVmzVb9SlaKYuQWq3TVwzuP7xZWkXbNe6499CrOKG1117TzQ2xzg7HbBydc9wZqQhRpFDQyS89PWuF5/SI6ixG3GyK804aMMsFl5niQirTrbfU97tXLBZohCxIjTRx58aXrDDdd6S+5oQXHbDEJHuEJ822xVsuauV95nrS8diwTZ8WjSxCgPPe/ueRjb5qF+XA818b2+igtThqj997xZD7muVb1f9zla5fj3nZKakIKiFVinPONWeGrt7et92RfX17tu5/ev4yZ1xmkU3escvjtu38wq5/j47O3+m1kcNrm/X2GTMmKRIpNY6W/df3PqH1yUvf2la2/PKlpec7xpzWY6Inxg7um/bmj/81eOWwb7uzro/Y7ZxGKNQgpcZou+sfhwb7H3Nw5vxn7/9VvDpt+IGHX7fQVo84dOTvK0fHf7rsE7P3KFaPj7ytQUoJUNDR41o/KKevznm5JJfnzPc93rPqm9nJZdlZa2nPxp/kUzkvP511Y5Wb9KoVRQGgqFUmu8my2Nb34YTsz0tzTS5+3/Jn01+v2/S3/ExOyQk5eaTssdLdpuvqCAQBQmgVHb2ucYVr7/jG3Gk71L6n62eHll48aI0tFhoe+/MLthmy3UljQoskAFBJtSkmWTD5mYvmzHLYQYvc6r826JrnmBOjJ39ovVNGjUutFJIAhBQqFBMMuqM8rFuEaERoa23ThmaddXb4SCuFRkgIANRaIVWmucRlpusgjOhRS+mE/9tr2HnjQiskEACAUGmFXv1S6Gg0KjQ6RjTOSq1UpAQIABAIiVoqWiEVoVU0WiGMCyQABACAkCqNokiNIgVSoBUILQBQAQAAAAgpERIhkQAAHwPlu9kMCvbXiAAAAABJRU5ErkJggg==";
  261.  
  262. // matches url with profile page and checks if profile has any battles as script is useless without
  263. if (wg_accounts !== null) {
  264. var speed_table_battles = filter(document.getElementsByClassName('t-personal-data_value')[2].innerHTML, 1);
  265. if (speed_table_battles > 0) {
  266. // style variables
  267. var box_background = "border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 0 38px 1px rgba(0, 0, 0, 0.3) inset, 0 0 23px 1px rgba(255, 255, 255, 0.02), 0 0 5px 1px rgba(0, 0, 0, 0.5) inset;";
  268. input_background = "background: rgba(0, 0, 0, 0.09); box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.15) inset, 0 0 38px 1px rgba(0, 0, 0, 0.3) inset, 0 0 23px 1px rgba(255, 255, 255, 0.02), 0 0 5px 1px rgba(0, 0, 0, 0.5) inset; color: #606061;";
  269. // style contents
  270. var style = document.createElement('style');
  271. style.className = "wotstatscript";
  272. style.type ="text/css";
  273. style.innerHTML
  274. // global rules
  275. = "h3, h4 {margin: 0 0 15px; text-align: center;}"
  276. + "h5 {margin: 5px 0 8px;}"
  277. + "p, .reg-KR p {margin: 0;}"
  278. + ".reg-KR p {line-height: 133%;}"
  279. + "table {width: 100%;}"
  280. // page fix page slowdown
  281. + ".l-page {background-position: center 0 !important;}"
  282. // container wrapper
  283. + ".l-container-wrapper {background: none;}"
  284. // content width
  285. + ".l-content {margin: 0 22px 25px; width: 955px}"
  286. // background rules
  287. + ".b-background {height: 315px; left: -22px; opacity: 0.5; position: absolute; top: -25px; width: 1000px; z-index: -1;}"
  288. + ".b-background img {width: 100%;}"
  289. // profile wrapper rules
  290. + ".b-profile-wrpr {margin: 15px 0 0; min-height: 156px;}"
  291. + ".reg-RUS .b-profile-wrpr {min-height: 135px;}"
  292. + ".b-profile-wrpr td {font-weight: bold; line-height: 133%;}"
  293. + ".b-profile-wrpr table a {background: url('/static/3.13.0.2.1/common/css/scss/context-menu/img/arrow.png') no-repeat 0 2px; color: #CACBCC; padding: 0 0 0 10px;}"
  294. + ".b-profile-wrpr table a:hover {background: url('/static/3.13.0.2.1/common/css/scss/context-menu/img/arrow.png') no-repeat -244px 2px; color: #FFFFFF;}"
  295. + ".b-profile-header {position: absolute; right: 0; top: 0;}"
  296. + ".b-scriptlink {"+input_background+" border-left: 1px solid #000000; border-right: 1px solid #000000; display: inline-table; text-align: center; padding: 7px 0 6px; width: 199px;}"
  297. + ".b-ratingsClip {display: inline-table;}"
  298. + ".b-ratingsButton {"+input_background+" border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; padding: 7px 7px 6px;}"
  299. + ".b-ratingsButton:hover {background-color: #282828; cursor: pointer;}"
  300. + ".b-profile-error {background: rgba(204,0,0,0.15); border: 1px solid #510000; box-shadow: 0 0 3px #733232; color: #CACBCC; display: none; margin: 0 3px -6px 0; overflow: hidden; padding: 3px; text-align: center; text-overflow: ellipsis; white-space: nowrap; width: 220px;}"
  301. + ".b-profile-error:hover {width: auto;}"
  302. // profile player rules
  303. + ".b-profile-name {float: none; margin: 0; max-width: 370px;}"
  304. + ".b-profile-name table {font-family: Arial;}"
  305. + ".b-profile-name td:first-child {white-space: nowrap;}"
  306. + ".reg-RUS .b-profile-name td:first-child {width: 120px;}"
  307. + ".reg-KR .b-profile-name td:first-child {width: 80px;}"
  308. + ".b-header-h1__profile {margin: 0; padding: 0 0 6px;}"
  309. + "body.reg-KR h1, body.reg-KR .b-header-h1 {line-height: 1;}"
  310. // profile clan rules
  311. + "#js-clan-block-container {left: 385px; position: absolute; top: 25px;}"
  312. + ".b-profile-clan {float: none; max-width: 360px; margin: 0;}"
  313. + ".b-profile-noclan {float: none; margin: 27px 0 0;}"
  314. + ".b-photo {min-height: 54px;}"
  315. + "a.b-link-clan, .b-link-clan a {display: inline;}"
  316. + ".b-statistic {margin: 0 0 3px;}"
  317. + ".b-victory-points {background: none; display: none; margin: 0; padding: 0;}"
  318. + ".b-victory-points_container {margin: 0; max-width: 335px;}"
  319. + ".b-victory-points_text {display: table-cell; font-size: 13px; margin: 0; padding: 6px 0 0;}"
  320. + ".b-victory-points_text br {display: none;}"
  321. + ".b-victory-points_text__indent-top {white-space: pre;}"
  322. + ".b-victory-points_count {background-position: right center; display: table-cell; font-size: 22px; margin: 0; padding: 0 40px 0 10px;}"
  323. + ".b-victory-points_ico { background-image: url('/static/3.13.0.2.1/common/css/scss/content/victory-points/img/victory-points-link.png'); background-position: center center; display: table-cell; float: right; height: 24px; margin: 0 0 0 5px; opacity: 1; width: 30px;}"
  324. + ".b-gray-link__arrow {font-size: 12px;}"
  325. + "#js-clan-block-container table {font-family: Arial; width: 360px;}"
  326. + "#js-clan-block-container td:first-child {white-space: nowrap;}"
  327. + ".reg-RUS #js-clan-block-container td:first-child {width: 115px;}"
  328. + ".reg-KR #js-clan-block-container td:first-child {width: 70px;}"
  329. // profile menu rules
  330. + ".b-profile-menu {position: absolute; right: 200px; top: 0;}"
  331. + ".b-profile-menu .b-context-menu {width: 149px;}"
  332. + ".b-profile-menu .b-context-menu-list__bottomindent {margin-bottom: 30px;}"
  333. // sidebar rules
  334. + ".l-sidebar {margin: 0; position: absolute; right: 0; top: 25px; width: auto;}"
  335. + ".b-context-menu {background: url("+uri_context_menu+") repeat-y; border-right: 1px solid black; float: left; margin: 0; width: 200px;}"
  336. + ".b-context-menu_wrapper {padding: 10px 0 5px;}"
  337. + ".b-context-menu-list {line-height: 16px;}"
  338. + ".b-sidebar-widget__comparison {background-color: #000000; border: 1px solid #000000; margin: 0; position: absolute; left: 224px; top: -26px; width: 203px;}"
  339. + ".b-sidebar-widget_inner__comparison {display: table; margin: 5px auto; padding: 0;}"
  340. + ".js-recruitsation-block {position: absolute; right: -228px; top: 0px; width: 205px;}"
  341. + ".b-sidebar-widget_title {margin: 0 0 10px;}"
  342. + ".b-sidebar-widget_text {margin: 0 0 5px;}"
  343. // userblock wrapper rules
  344. + ".b-userblock-wrpr {margin: 0 0 -2px;}"
  345. + ".b-user-block {"+box_background+" margin: 0; width: 750px;}"
  346. + ".b-head-block {background: url('/static/3.13.0.2.1/common/css/scss/tables/img/th-profile-bg.png') repeat-x; border: 1px solid #000000;}"
  347. + ".b-user-block_info {padding: 5px 25px;}"
  348. + ".b-personal-link {clear: left; margin: 53px 0 0;}"
  349. + ".b-user-block__sparks {background: url('"+dropbox+"/sparks.png') no-repeat 50% 0; width: 100%;}"
  350. + ".b-personal-data {min-height: 180px; padding: 0 20px 15px;}"
  351. + ".t-personal-data_ico {padding: 82px 5px 0;}"
  352. + ".t-personal-data_ico__hitrate {background: url("+uri_pr_hitrate+") no-repeat 50% 50px;}"
  353. + ".t-personal-data_ico__tier {background: url("+uri_pr_avgtier+") no-repeat 50% 50px;}"
  354. + ".t-personal-data_value {font-size: 28px; line-height: 100%;}"
  355. + ".t-personal-data_value.t-personal-data_value__pr {font-size: 36px;}"
  356. + ".b-speedometer-body {padding: 20px 50px;}"
  357. + ".b-speedometer {width: 33.3333%}"
  358. // ratings wrapper rules
  359. + ".b-ratings-wrpr {margin: 0 0 40px;}" // see multiple rules
  360. + ".b-ratings-info {text-align: center;}"
  361. + ".t-ratings-info {table-layout: fixed;}"
  362. + ".t-ratings-info th {font-size: 13px; font-weight: bold; line-height: 133%;}"
  363. + ".t-ratings-info td {font-family: 'WarHeliosCondCBold','Arial Narrow',arial,sans-serif; font-size: 36px; line-height: 133%}"
  364. + ".t-ratings-info .rating-url_nm {background-image: url("+uri_nm_logo+"); background-position: left center; background-repeat: no-repeat; padding: 0 0 0 20px;}"
  365. + ".b-ratings-info, .ratings-table {background: inherit; padding: 10px 25px;}"
  366. + ".t-table-ratings {width: 100%;}"
  367. + ".t-table-ratings td {line-height: 130%; padding: 9px 12px 2px 0; vertical-align: bottom;}"
  368. + ".t-table-ratings .td-value {padding-right: 0; text-align: right; white-space: nowrap;}"
  369. + ".t-table-ratings .td-number {color: #BABCBF; font-weight: bold; padding-right: 0; text-align: right; width: 70px;}"
  370. + ".t-table-ratings .td-center {line-height: 16px; padding: 9px 0 2px; text-align: center;}"
  371. + ".t-table-ratings .td-rating-meter {background: url('/static/3.17.0.1/common/css/scss/content/user/img/speedometr-separator.png') no-repeat 50% 100%; padding: 0;}"
  372. + ".t-table-ratings .rating-meter {background: url("+uri_rating_meter+") no-repeat; border: 1px solid #252527; border-radius: 3px; height: 3px; margin: 0 7px;}"
  373. + ".t-table-ratings .rating-meter-dail_line {background: url("+uri_rating_meter+") no-repeat; box-shadow: 0 0 10px 1px rgba(221, 84, 12, 0.15), 0 0 3px 1px rgba(133, 18, 11, 0.25); height: 3px;}"
  374. + ".t-table-ratings .rating-meter-marker {background: url("+uri_rating_meter_marker+") no-repeat; float: right; height: 13px; margin: -5px -2px 0 0; width: 5px;}"
  375. + ".t-table-ratings .rating-meter_wn8 {background-position: 0 0;}"
  376. + ".t-table-ratings .rating-meter_wn8 .rating-meter-dail_line {background-position: 0 -3px;}"
  377. + ".t-table-ratings .rating-meter_wn7 {background-position: 0 -6px;}"
  378. + ".t-table-ratings .rating-meter_wn7 .rating-meter-dail_line {background-position: 0 -9px;}"
  379. + ".t-table-ratings .rating-meter_eff {background-position: 0 -12px;}"
  380. + ".t-table-ratings .rating-meter_eff .rating-meter-dail_line {background-position: 0 -15px;}"
  381. + ".wnelink {background: inherit; padding: 5px 25px 5px 0; text-align: right;}"
  382. + ".wnelink_info {background-image: url('/static/3.17.0.1/common/css/scss/content/links/img/ico-info.png'), url('/static/3.13.0.2.1/common/css/block/b-link/img/orange_arrow.png'); background-position: 4px 0px, right 0; padding: 0 9px 0 20px;}"
  383. + ".wnelink_info:hover {background-position: 4px -17px, right -22px;}"
  384. // statistics wrapper rules
  385. + ".b-statistics-wrpr {margin: 0 0 30px; overflow: auto;}"
  386. + ".b-statistics-wrpr .t-dotted td {line-height: 23px; padding: 0;}"
  387. + ".b-statistics-wrpr .t-dotted td.t-dotted_class-ico {line-height: 13px;}"
  388. + ".b-statistics-wrpr .t-dotted td.t-dotted_class-ico img {margin: 2px 0 -1px;}"
  389. + ".b-result {margin: 0 10px; width: 315px;}"
  390. + ".b-result-classes {margin: 0 10px; width: 265px;}"
  391. + ".b-result-classes span {color: #606061; display: inline-block; width: 48px;}"
  392. + ".t-dotted td {background: url('/static/3.17.0.1/common/css/scss/content/user/img/speedometr-separator.png') no-repeat 50% 100%;}"
  393. // cake diagram rules
  394. + ".b-diagrams-sector {margin: 0 0 25px;}"
  395. + ".b-diagrams-sector h3 {text-align: center;}"
  396. + ".b-diagram-block {float: left; margin: 0 9px; width: 300px;}"
  397. + ".b-diagram-wrpr {float: none; margin: 0 auto;}"
  398. + ".t-dotted.t-dotted__diagram {margin-top: 0px; width: 100%;}"
  399. + ".t-dotted_diagram-percent {display: inline-block; width: 40px;}"
  400. + ".b-diagram-total {margin: 25px 0 0;}"
  401. + ".b-diagram-tiers .js-results {display: inline-block; margin: 0 0 0 30px; text-align: right; width: 14px;}"
  402. + ".reg-RUS .b-diagram-tiers .js-results {margin: 0 0 0 15px;}"
  403. + ".b-diagram-tiers .t-dotted_diagram-percent {margin: 0 0 0 3px; width: 52px;}"
  404. + ".b-diagram-ico_tier {background: url("+uri_tiers+") no-repeat; padding-left: 30px;}"
  405. + ".b-diagram-ico_tier-1 {background-position: 4px 1px;}"
  406. + ".b-diagram-ico_tier-2 {background-position: 4px -14px;}"
  407. + ".b-diagram-ico_tier-3 {background-position: 4px -29px;}"
  408. + ".b-diagram-ico_tier-4 {background-position: 4px -45px;}"
  409. + ".b-diagram-ico_tier-5 {background-position: 4px -59px;}"
  410. + ".b-diagram-ico_tier-6 {background-position: 4px -74px;}"
  411. + ".b-diagram-ico_tier-7 {background-position: 4px -89px;}"
  412. + ".b-diagram-ico_tier-8 {background-position: 4px -104px;}"
  413. + ".b-diagram-ico_tier-9 {background-position: 4px -120px;}"
  414. + ".b-diagram-ico_tier-10 {background-position: 4px -134px;}"
  415. + ".t-dotted__diagram tr td.t-dotted_diagram-last {width: 0;}"
  416. // achievement wrapper rules
  417. + ".b-achievements-wrpr {}" // see multiple rules
  418. + ".js-short-achievements {margin: 15px 0 30px;}"
  419. + ".js-full-achievements {margin: 0 37px 30px;}"
  420. + ".reg-KR .js-full-achievements {margin: 0 34px 30px;}"
  421. + ".b-achivements {display: table; margin: 0 auto; padding: 0 0 20px;}"
  422. + ".b-achivements-head {margin-top: 15px;}"
  423. + ".b-achivements_item {display: inline-table; float: inherit; margin: 5px 5px 0;}"
  424. + "#js-achivement-raider {margin-left: 40px;}"
  425. + "#js-achivement-mechanicEngineer {margin-left: 80px;}"
  426. + "#js-achivement-tankExpert0 {margin-left: 160px;}"
  427. // global rating rules
  428. + ".b-composite-heading {margin: 20px 0 15px 400px; width: 553px;}"
  429. + ".b-profile-ratings-date {margin-top: 1px}"
  430. + ".b-profile-item__empty {display: table; margin: 0 auto; text-align: center;}"
  431. + ".b-rating-dial__user {margin: 10px 21px 22px;}"
  432. + ".b-leadership-info {display: table; margin: 0 auto;}"
  433. + ".l-leadership-info-alignment {display: table; margin: 0 auto; text-align: center;}"
  434. + ".b-unordered-lists_item {display: table; margin: 4px auto 5px;}"
  435. + ".b-profile-link {display: table; margin: 8px auto}"
  436. // vehicle table rules
  437. + ".b-vehicles-wrpr {margin: 20px 0;}"
  438. + ".b-vehicles-header {display: table; margin: 0 auto 15px}"
  439. + ".b-profile-vehicles-tankstat {margin: 0; position: absolute; right: 15px;}"
  440. + ".b-profile-vehicles-tankstat_link {background-image: url("+uri_nm_logo+"), url('/static/3.13.0.2.1/common/css/block/b-link/img/orange_arrow.png'); background-position: left center, right 0px; padding: 0 9px 0 20px;}"
  441. + ".b-profile-vehicles-tankstat_link:hover {background-position: left center, right -22px;}"
  442. + ".t-profile__vehicle .t-profile_right {text-align: center;}"
  443. + ".t-profile_dropdown-ico .tablesorter-header-inner {display: inherit;}"
  444. + ".t-profile_tankstype-prem .b-tankstype-text {color: #FFC363;}"
  445. + ".t-profile_tankstype-prem.t-profile_tankstype__empty .b-tankstype-text {color: rgba(255, 195, 99, 0.3);}"
  446. + ".t-profile .t-profile_tankstype td {height: 50px; padding: 0; vertical-align: middle;}"
  447. + ".b-tankstype-ico {display: table-cell;}"
  448. + ".b-tankstype-ico__lighttank {background-position: 0 -114px;}"
  449. + ".b-tankstype-ico__mediumtank {background-position: 0 -173px;}"
  450. + ".b-tankstype-ico__heavytank {background-position: 0 5px;}"
  451. + ".b-tankstype-ico__at-spg {background-position: 0 -232px;}"
  452. + ".b-tankstype-ico__spg {background-position: 0 -54px;}"
  453. + ".b-tankstype-ico__prem {background-position: 0 -291px;}"
  454. + ".b-tankstype-ico__ten {background: none; color: #BBB7AC; font-size: 17px; font-weight: 100; padding: 0 0 3px; text-align: center;}"
  455. + ".b-tankstype-text {display: table-cell; height: inherit; vertical-align: middle;}"
  456. + ".t-profile .t-profile_tankstype__item td {height: 40px; padding: 0; vertical-align: middle;}"
  457. + ".t-profile .t-profile_tankstype__item:hover td {background: rgba(0, 0, 0, 0.04); border-bottom: 1px solid rgba(255, 255, 255, 0); color: #BABCBF;}"
  458. + ".b-armory-wrapper {height: inherit; margin: 0; padding: 0; width: 160px;}"
  459. + ".b-armory-wrapper .b-armory-level {display: table-cell; font-size: inherit; height: inherit; position: inherit; vertical-align: middle; left: 0; top: 0;}"
  460. + ".b-armory-wrapper img.png {height: 64px; margin: -50px 0 0 24px;}"
  461. + ".b-name-vehicle {color: #BBB7AC; display: table-cell; height: inherit; vertical-align: middle;}"
  462. + ".b-name-vehicle.b-gold-name {color: #FFC363;}"
  463. + ".t-profile_dropdown-link {display: inherit;}"
  464. + ".js-error-data {text-align: center;}"
  465. + ".b-msg-error {display: table; margin: 0 auto;}"
  466. + ".b-vehicle-detail_txt {margin: 0 auto 4px; text-align: center; width: 768px;}"
  467. + ".b-vehicle-detail_link {display: table; margin: 0 auto;}"
  468. + ".b-vehicle-slider {margin: 23px 64px 17px}"
  469. + ".b-vehicle-minitable {margin: 0 43px; width: 350px;}"
  470. + ".b-vehicle-minitable__right {float: left;}"
  471. // profile navigator
  472. + ".b-profile-nav {text-align: center;}"
  473. + ".wrapper-dropdown .b-profile-nav {padding: 7px 0 0; position: absolute; right: 50%;}"
  474. + ".b-profile-nav a {background: url('/static/3.17.0.1/common/css/scss/content/links/img/vertical-arrow.png') no-repeat; padding: 2px 10px 0;}"
  475. + ".b-profile-nav a#top {background-position: 100% 0px;}"
  476. + ".b-profile-nav a#top:hover {background-position: 100% -36px;}"
  477. + ".b-profile-nav a#bottom {background-position: 100% -18px;}"
  478. + ".b-profile-nav a#bottom:hover {background-position: 100% -54px;}"
  479. + ".b-profile-nav span {border-bottom: 1px dashed;}"
  480. // multiple usage rules
  481. + ".b-ratings-wrpr, .b-achievements-wrpr {background: rgba(0, 0, 0, 0.09); "+box_background+" clear: both; width: 100%;}"
  482. + ".b-orange-arrow__heading, .b-profile-ratings_link {margin: 4px 0 0;}"
  483. + ".b-vertical-arrow {display: table; margin: 2px auto 0; padding: 2px 10px 0;}"
  484. + "";
  485. document.head.appendChild(style);
  486. // end style
  487.  
  488. // removing elements
  489. var layoutfix_class = document.getElementsByClassName('b-hr-layoutfix');
  490. layoutfix_class[0].parentNode.removeChild(layoutfix_class[0]);
  491. layoutfix_class[0].parentNode.removeChild(layoutfix_class[0]);
  492.  
  493. // profile wrapper
  494. var profile_div = document.createElement('div');
  495. profile_div.className = "b-profile-wrpr";
  496. profileHead_div = document.createElement('div');
  497. profileHead_div.className = "b-profile-header";
  498. profile_div.appendChild(profileHead_div);
  499. profileName_class = document.getElementsByClassName('b-profile-name')[0];
  500. profileName_class.parentNode.insertBefore(profile_div, profileName_class.nextSibling);
  501. profile_div.appendChild(profileName_class);
  502.  
  503. // profile header
  504. var profileError_div = document.createElement('div');
  505. profileError_div.className = "b-profile-error";
  506. profileHead_div.innerHTML += scriptlink;
  507. profileHead_div.insertBefore(profileError_div, profileHead_div.firstElementChild);
  508.  
  509. // background behind profile wrapper
  510. var background_div = document.createElement('div');
  511. background_div.className = "b-background";
  512. background_div.innerHTML = "<img src='/static/3.16.0.2/common/img/common/cont-img-mask.png'>";
  513. profile_div.parentNode.insertBefore(background_div, profile_div);
  514.  
  515. // page navigation
  516. var lcontent_class = document.getElementsByClassName('l-content')[0];
  517. dropdown_class = document.getElementsByClassName('wrapper-dropdown')[0];
  518. topNav_div = document.createElement('div');
  519. topNav_div.className = "b-profile-nav";
  520. topNav_div.innerHTML += "<a id='top' href='#bottom'><span>"+locale.p01.lang+"</span></a>";
  521. dropdown_class.appendChild(topNav_div);
  522. bottomNav_div = document.createElement('div');
  523. bottomNav_div.className = "b-profile-nav";
  524. bottomNav_div.innerHTML += "<a id='bottom' href='#top'><span>"+locale.p02.lang+"</span></a>";
  525. lcontent_class.appendChild(bottomNav_div);
  526.  
  527. // getting registration date
  528. var dateStamp = document.getElementsByClassName('js-date-format')[0].getAttribute('data-timestamp'),
  529. daysPassed = (new Date() - new Date(dateStamp * 1000)) / 1000/60/60/24;
  530. profileName_class.lastElementChild.innerHTML += " - "+daysPassed.toFixed(0)+" "+locale.p03.lang+".";
  531.  
  532. // getting userinfo
  533. var nick = document.getElementsByTagName('h1')[0].innerHTML,
  534. userid = document.location.href.match(/\/(\d+)/)[1];
  535.  
  536. // player statistic links
  537. var nm_url = nm_host+"/player/"+nm_srv+"/"+nick+"/"+userid;
  538. wl_player = nm_player = wn_player = mws_player = fz_player = signature = replays = "";
  539. if (wl_srv !== null) {
  540. wl_player = "<td><a target='_blank' href='http://wotlabs.net/"+wl_srv+"/player/"+nick+"'>WoTLabs</a></td>",
  541. signature = "<tr><td class='statname'>"+locale.p05.lang+"</td><td><a target='_blank' href='http://wotlabs.net/sig/"+wl_srv+"/"+nick+"/signature.png'>"+locale.p06.lang+"</a></td>"
  542. + "<td><a target='_blank' href='http://wotlabs.net/sig_dark/"+wl_srv+"/"+nick+"/signature.png'>"+locale.p07.lang+"</a></td></tr>";
  543. }
  544. if (nm_srv !== null) {
  545. nm_player = "<td><a target='_blank' href='"+nm_url+"'>Noobmeter</a></td>";
  546. }
  547. if (wn_srv !== null) {
  548. wn_player = "<td><a target='_blank' href='http://wot-news.com/index.php/stat/pstat/"+wn_srv+"/"+nick+"/'>Wot-news</a></td>";
  549. }
  550. if (mws_srv !== null) {
  551. mws_player = "<td><a target='_blank' href='http://mywotstats.com/player/view/"+userid+"/"+mws_srv+"'>MyWOTStats</a></td>";
  552. }
  553. if (fz_srv !== null) {
  554. fz_player = "<td><a target='_blank' href='http://feldzug.net/"+fz_srv+"/"+nick+"'>Feldzug</a></td>";
  555. }
  556. if (wr_srv !== null) {
  557. replays = "<tr><td class='statname'>"+locale.p08.lang+"</td><td><a target='_blank' href='http://wotreplays."+wr_srv+"/player/"+nick+"'>WoTReplays</a></td></tr>";
  558. }
  559. playerstat = "<tr><td class='statname'>"+locale.p04.lang+"</td>"+wl_player+nm_player+wn_player+"</tr><tr><td></td>"+mws_player+fz_player+"</tr>";
  560. if (playerstat.length > 66) {
  561. profileName_class.innerHTML += "<table>"+playerstat+signature+replays+"</table>";
  562. }
  563.  
  564. // clan handler caller - clan container is delayed by Wargaming
  565. clanHnd();
  566.  
  567. // move sidebar
  568. var sidebar_class = document.getElementsByClassName('l-sidebar')[0];
  569. profile_div.appendChild(sidebar_class);
  570.  
  571. // end profile wrapper
  572.  
  573. // formula calculations and variables
  574. // expected tank values v14 with premium tanks up to 0.8.11
  575. var statArr = {
  576. // soviet
  577. // light tanks
  578. "ms-1": { frag: 2.10, dmg: 270, spot: 1.55, def: 1.81, win: 60.46, tier: 1, nation: "RU", type: "LT" },
  579. "bt-2": { frag: 1.89, dmg: 306, spot: 2.20, def: 1.58, win: 57.80, tier: 2, nation: "RU", type: "LT" },
  580. "t-26": { frag: 1.87, dmg: 302, spot: 1.26, def: 2.33, win: 54.63, tier: 2, nation: "RU", type: "LT" },
  581. "t-60": { frag: 1.80, dmg: 299, spot: 1.71, def: 2.37, win: 57.55, tier: 2, nation: "RU", type: "LT" },
  582. "tetrarch_ll": { frag: 1.96, dmg: 323, spot: 1.63, def: 1.87, win: 59.43, tier: 2, nation: "RU", type: "LT", prem: 1 },
  583. "bt-7": { frag: 0.94, dmg: 229, spot: 2.19, def: 1.38, win: 51.27, tier: 3, nation: "RU", type: "LT" },
  584. "t-46": { frag: 1.17, dmg: 284, spot: 1.57, def: 1.27, win: 53.17, tier: 3, nation: "RU", type: "LT" },
  585. "t-70": { frag: 1.47, dmg: 361, spot: 1.72, def: 1.37, win: 62.46, tier: 3, nation: "RU", type: "LT" },
  586. "bt-sv": { frag: 1.52, dmg: 346, spot: 1.54, def: 1.94, win: 61.00, tier: 3, nation: "RU", type: "LT", prem: 1 },
  587. "m3_stuart_ll": { frag: 1.02, dmg: 232, spot: 1.78, def: 1.18, win: 50.83, tier: 3, nation: "RU", type: "LT", prem: 1 },
  588. "t-127": { frag: 1.89, dmg: 393, spot: 1.83, def: 1.88, win: 59.79, tier: 3, nation: "RU", type: "LT", prem: 1 },
  589. "ltp": { frag: 1.68, dmg: 343, spot: 1.22, def: 2.46, win: 58.40, tier: 3, nation: "RU", type: "LT", prem: 1 },
  590. "a-20": { frag: 0.90, dmg: 270, spot: 3.34, def: 0.62, win: 48.95, tier: 4, nation: "RU", type: "LT" },
  591. "t-50": { frag: 0.97, dmg: 339, spot: 4.02, def: 1.07, win: 59.40, tier: 4, nation: "RU", type: "LT" },
  592. "t80": { frag: 1.17, dmg: 404, spot: 1.87, def: 2.06, win: 58.07, tier: 4, nation: "RU", type: "LT" },
  593. "valentine_ll": { frag: 0.96, dmg: 370, spot: 0.88, def: 1.28, win: 53.78, tier: 4, nation: "RU", type: "LT", prem: 1 },
  594. "t_50_2": { frag: 0.61, dmg: 380, spot: 4.79, def: 0.80, win: 54.50, tier: 5, nation: "RU", type: "LT" },
  595. "mt25": { frag: 0.63, dmg: 415, spot: 3.60, def: 0.86, win: 53.51, tier: 6, nation: "RU", type: "LT" },
  596. // medium tanks
  597. "t-28": { frag: 1.19, dmg: 421, spot: 1.24, def: 0.97, win: 51.85, tier: 4, nation: "RU", type: "MT" },
  598. "a-32": { frag: 0.87, dmg: 273, spot: 2.86, def: 0.56, win: 53.98, tier: 4, nation: "RU", type: "MT", prem: 1 },
  599. "t-34": { frag: 1.15, dmg: 528, spot: 1.44, def: 1.24, win: 54.75, tier: 5, nation: "RU", type: "MT" },
  600. "matilda_ii_ll": { frag: 1.40, dmg: 587, spot: 1.16, def: 1.61, win: 55.82, tier: 5, nation: "RU", type: "MT", prem: 1 },
  601. "t-34-85": { frag: 1.03, dmg: 740, spot: 1.37, def: 1.02, win: 53.78, tier: 6, nation: "RU", type: "MT" },
  602. "a43": { frag: 1.08, dmg: 755, spot: 1.44, def: 1.21, win: 53.18, tier: 6, nation: "RU", type: "MT" },
  603. "t-43": { frag: 0.97, dmg: 891, spot: 1.54, def: 1.00, win: 53.64, tier: 7, nation: "RU", type: "MT" },
  604. "kv-13": { frag: 0.85, dmg: 750, spot: 1.59, def: 1.05, win: 52.94, tier: 7, nation: "RU", type: "MT" },
  605. "a44": { frag: 1.00, dmg: 943, spot: 1.59, def: 1.18, win: 55.71, tier: 7, nation: "RU", type: "MT" },
  606. "t-44-85": { frag: 0.95, dmg: 898, spot: 1.52, def: 1.12, win: 53.05, tier: 7, nation: "RU", type: "MT", prem: 1 },
  607. "t-44-122": { frag: 0.95, dmg: 898, spot: 1.52, def: 1.12, win: 53.05, tier: 7, nation: "RU", type: "MT", prem: 1 },
  608. "t-44": { frag: 0.97, dmg: 1114, spot: 1.74, def: 1.05, win: 54.68, tier: 8, nation: "RU", type: "MT" },
  609. "object416": { frag: 0.95, dmg: 1186, spot: 1.91, def: 1.09, win: 53.04, tier: 8, nation: "RU", type: "MT" },
  610. "t-54": { frag: 1.11, dmg: 1568, spot: 1.90, def: 0.95, win: 55.23, tier: 9, nation: "RU", type: "MT" },
  611. "r104_object_430_ii": { frag: 0.99, dmg: 1524, spot: 1.64, def: 0.77, win: 53.20, tier: 9, nation: "RU", type: "MT" },
  612. "t62a": { frag: 0.98, dmg: 1682, spot: 1.61, def: 0.74, win: 50.40, tier: 10, nation: "RU", type: "MT" },
  613. "object_140": { frag: 0.98, dmg: 1682, spot: 1.61, def: 0.74, win: 50.40, tier: 10, nation: "RU", type: "MT" },
  614. "object_430": { frag: 0.98, dmg: 1682, spot: 1.61, def: 0.74, win: 50.40, tier: 10, nation: "RU", type: "MT" },
  615. "object_907": { frag: 0.98, dmg: 1682, spot: 1.61, def: 0.74, win: 50.40, tier: 10, nation: "RU", type: "MT", prem: 1 },
  616. // heavy tanks
  617. "kv": { frag: 1.01, dmg: 590, spot: 0.72, def: 0.52, win: 51.16, tier: 5, nation: "RU", type: "HT" },
  618. "kv1": { frag: 1.22, dmg: 653, spot: 0.80, def: 1.00, win: 53.41, tier: 5, nation: "RU", type: "HT" },
  619. "churchill_ll": { frag: 1.30, dmg: 614, spot: 1.17, def: 1.51, win: 52.73, tier: 5, nation: "RU", type: "HT", prem: 1 },
  620. "kv-220": { frag: 1.39, dmg: 593, spot: 1.46, def: 0.62, win: 54.00, tier: 5, nation: "RU", type: "HT", prem: 1 },
  621. "kv-220_action": { frag: 1.39, dmg: 593, spot: 1.46, def: 0.62, win: 54.00, tier: 5, nation: "RU", type: "HT", prem: 1 },
  622. "kv-1s": { frag: 1.33, dmg: 1003, spot: 1.16, def: 0.94, win: 56.56, tier: 6, nation: "RU", type: "HT" },
  623. "kv2": { frag: 1.15, dmg: 900, spot: 0.74, def: 0.84, win: 53.31, tier: 6, nation: "RU", type: "HT" },
  624. "t150": { frag: 1.02, dmg: 804, spot: 0.80, def: 0.79, win: 52.65, tier: 6, nation: "RU", type: "HT" },
  625. "is": { frag: 1.06, dmg: 1068, spot: 1.05, def: 0.79, win: 52.53, tier: 7, nation: "RU", type: "HT" },
  626. "kv-3": { frag: 1.09, dmg: 1128, spot: 0.87, def: 0.77, win: 53.45, tier: 7, nation: "RU", type: "HT" },
  627. "is-3": { frag: 0.97, dmg: 1346, spot: 1.03, def: 0.77, win: 52.09, tier: 8, nation: "RU", type: "HT" },
  628. "kv4": { frag: 0.85, dmg: 1223, spot: 0.79, def: 0.71, win: 51.70, tier: 8, nation: "RU", type: "HT" },
  629. "object252": { frag: 1.11, dmg: 1415, spot: 1.11, def: 0.91, win: 53.28, tier: 8, nation: "RU", type: "HT", prem: 1 },
  630. "kv-5": { frag: 1.00, dmg: 1248, spot: 1.11, def: 0.91, win: 50.31, tier: 8, nation: "RU", type: "HT", prem: 1 },
  631. "st_i": { frag: 0.96, dmg: 1608, spot: 0.92, def: 0.70, win: 52.55, tier: 9, nation: "RU", type: "HT" },
  632. "is8": { frag: 0.96, dmg: 1571, spot: 1.12, def: 0.67, win: 50.35, tier: 9, nation: "RU", type: "HT" },
  633. "is-4": { frag: 0.91, dmg: 1791, spot: 1.08, def: 0.78, win: 49.75, tier: 10, nation: "RU", type: "HT" },
  634. "is-7": { frag: 0.86, dmg: 1700, spot: 1.13, def: 0.56, win: 50.07, tier: 10, nation: "RU", type: "HT" },
  635. // tank destroyers
  636. "at-1": { frag: 1.74, dmg: 307, spot: 0.46, def: 1.66, win: 56.42, tier: 2, nation: "RU", type: "TD" },
  637. "su-76": { frag: 1.49, dmg: 396, spot: 0.87, def: 1.70, win: 54.36, tier: 3, nation: "RU", type: "TD" },
  638. "su-76i": { frag: 1.49, dmg: 396, spot: 0.87, def: 1.70, win: 54.36, tier: 3, nation: "RU", type: "TD", prem: 1 },
  639. "gaz-74b": { frag: 1.44, dmg: 519, spot: 1.00, def: 1.45, win: 55.48, tier: 4, nation: "RU", type: "TD" },
  640. "su-85": { frag: 1.21, dmg: 608, spot: 0.54, def: 1.22, win: 52.36, tier: 5, nation: "RU", type: "TD" },
  641. "su-85i": { frag: 1.21, dmg: 608, spot: 0.54, def: 1.22, win: 52.36, tier: 5, nation: "RU", type: "TD", prem: 1 },
  642. "su-100": { frag: 1.24, dmg: 887, spot: 0.81, def: 1.19, win: 54.05, tier: 6, nation: "RU", type: "TD" },
  643. "su100y": { frag: 1.28, dmg: 985, spot: 0.70, def: 0.86, win: 54.72, tier: 6, nation: "RU", type: "TD", prem: 1 },
  644. "su-152": { frag: 1.12, dmg: 1096, spot: 0.57, def: 0.94, win: 52.53, tier: 7, nation: "RU", type: "TD" },
  645. "su100m1": { frag: 1.02, dmg: 1034, spot: 0.91, def: 1.14, win: 52.43, tier: 7, nation: "RU", type: "TD" },
  646. "su122_44": { frag: 1.34, dmg: 1251, spot: 0.82, def: 1.14, win: 54.32, tier: 7, nation: "RU", type: "TD", prem: 1 },
  647. "isu-152": { frag: 1.18, dmg: 1561, spot: 0.59, def: 0.81, win: 51.04, tier: 8, nation: "RU", type: "TD" },
  648. "su-101": { frag: 1.02, dmg: 1278, spot: 0.93, def: 1.11, win: 50.39, tier: 8, nation: "RU", type: "TD" },
  649. "object_704": { frag: 1.16, dmg: 1842, spot: 0.69, def: 0.70, win: 52.00, tier: 9, nation: "RU", type: "TD" },
  650. "su122_54": { frag: 1.06, dmg: 1575, spot: 0.96, def: 0.94, win: 50.27, tier: 9, nation: "RU", type: "TD" },
  651. "object268": { frag: 1.21, dmg: 2219, spot: 0.85, def: 0.71, win: 51.17, tier: 10, nation: "RU", type: "TD" },
  652. "object263": { frag: 1.13, dmg: 2027, spot: 0.94, def: 1.07, win: 50.67, tier: 10, nation: "RU", type: "TD" },
  653. // artillery
  654. "su-18": { frag: 1.42, dmg: 267, spot: 0.17, def: 2.51, win: 49.78, tier: 2, nation: "RU", type: "SPG" },
  655. "su-26": { frag: 1.60, dmg: 586, spot: 0.16, def: 2.17, win: 57.28, tier: 3, nation: "RU", type: "SPG" },
  656. "su-5": { frag: 1.02, dmg: 582, spot: 0.16, def: 1.73, win: 49.33, tier: 4, nation: "RU", type: "SPG" },
  657. "su122a": { frag: 1.16, dmg: 705, spot: 0.12, def: 1.79, win: 52.19, tier: 5, nation: "RU", type: "SPG" },
  658. "su-8": { frag: 0.92, dmg: 1101, spot: 0.11, def: 1.26, win: 49.77, tier: 6, nation: "RU", type: "SPG" },
  659. "su14_1": { frag: 0.81, dmg: 1226, spot: 0.10, def: 0.86, win: 48.50, tier: 7, nation: "RU", type: "SPG" },
  660. "s-51": { frag: 0.82, dmg: 1180, spot: 0.10, def: 0.62, win: 48.50, tier: 7, nation: "RU", type: "SPG" },
  661. "su-14": { frag: 0.92, dmg: 1319, spot: 0.09, def: 0.66, win: 48.58, tier: 8, nation: "RU", type: "SPG" },
  662. "object_212": { frag: 0.85, dmg: 1556, spot: 0.09, def: 0.57, win: 49.17, tier: 9, nation: "RU", type: "SPG" },
  663. "object_261": { frag: 0.91, dmg: 1682, spot: 0.08, def: 0.65, win: 48.94, tier: 10, nation: "RU", type: "SPG" },
  664.  
  665. // germany
  666. // light tanks
  667. "ltraktor": { frag: 2.11, dmg: 278, spot: 2.35, def: 1.84, win: 59.54, tier: 1, nation: "DE", type: "LT" },
  668. "pz35t": { frag: 1.95, dmg: 311, spot: 2.01, def: 2.19, win: 57.60, tier: 2, nation: "DE", type: "LT" },
  669. "pzi": { frag: 1.72, dmg: 266, spot: 3.18, def: 2.66, win: 59.06, tier: 2, nation: "DE", type: "LT" },
  670. "pzii": { frag: 1.69, dmg: 272, spot: 2.05, def: 1.78, win: 56.14, tier: 2, nation: "DE", type: "LT" },
  671. "h39_captured": { frag: 2.20, dmg: 352, spot: 1.88, def: 2.72, win: 54.01, tier: 2, nation: "DE", type: "LT", prem: 1 },
  672. "pz38t": { frag: 1.68, dmg: 384, spot: 1.58, def: 1.77, win: 56.45, tier: 3, nation: "DE", type: "LT" },
  673. "pziii_a": { frag: 1.20, dmg: 268, spot: 1.84, def: 1.53, win: 53.33, tier: 3, nation: "DE", type: "LT" },
  674. "pzi_ausf_c": { frag: 1.31, dmg: 277, spot: 3.01, def: 1.41, win: 57.25, tier: 3, nation: "DE", type: "LT" },
  675. "pz_ii_ausfg": { frag: 1.15, dmg: 288, spot: 1.99, def: 1.63, win: 59.52, tier: 3, nation: "DE", type: "LT" },
  676. "pzii_j": { frag: 2.14, dmg: 405, spot: 2.08, def: 3.01, win: 63.00, tier: 3, nation: "DE", type: "LT", prem: 1 },
  677. "t-15": { frag: 1.29, dmg: 295, spot: 3.61, def: 1.66, win: 59.71, tier: 3, nation: "DE", type: "LT", prem: 1 },
  678. "pzii_luchs": { frag: 1.34, dmg: 339, spot: 2.75, def: 1.32, win: 56.52, tier: 4, nation: "DE", type: "LT" },
  679. "pz38_na": { frag: 0.92, dmg: 290, spot: 2.71, def: 1.11, win: 54.03, tier: 4, nation: "DE", type: "LT" },
  680. "vk1602": { frag: 0.73, dmg: 357, spot: 3.20, def: 0.80, win: 53.30, tier: 5, nation: "DE", type: "LT" },
  681. "vk2801": { frag: 0.77, dmg: 596, spot: 2.97, def: 0.62, win: 53.08, tier: 6, nation: "DE", type: "LT" },
  682. "auf_panther": { frag: 0.69, dmg: 738, spot: 2.36, def: 0.71, win: 50.37, tier: 7, nation: "DE", type: "LT" },
  683. // medium tanks
  684. "pz_iv_ausfa": { frag: 0, dmg: 0, spot: 0, def: 0, win: 0, tier: 3, nation: "DE", type: "MT" }, // no values
  685. "s35_captured": { frag: 1.90, dmg: 425, spot: 1.58, def: 1.94, win: 62.00, tier: 3, nation: "DE", type: "MT", prem: 1 },
  686. "g100_gtraktor_krupp": { frag: 0, dmg: 0, spot: 0, def: 0, win: 0, tier: 3, nation: "DE", type: "MT", prem: 1 }, // no values
  687. "pziii_ausfj": { frag: 1.19, dmg: 360, spot: 2.15, def: 1.16, win: 55.49, tier: 4, nation: "DE", type: "MT" },
  688. "vk2001db": { frag: 1.30, dmg: 424, spot: 1.71, def: 1.36, win: 57.92, tier: 4, nation: "DE", type: "MT" },
  689. "pz_iv_ausfd": { frag: 0, dmg: 0, spot: 0, def: 0, win: 0, tier: 4, nation: "DE", type: "MT" }, // no values
  690. "pziii_iv": { frag: 0.98, dmg: 455, spot: 1.65, def: 1.00, win: 53.07, tier: 5, nation: "DE", type: "MT" },
  691. "pziv": { frag: 1.23, dmg: 607, spot: 1.26, def: 1.07, win: 54.88, tier: 5, nation: "DE", type: "MT" }, // for backup
  692. "pz_iv_ausfh": { frag: 1.23, dmg: 607, spot: 1.26, def: 1.07, win: 54.88, tier: 5, nation: "DE", type: "MT" },
  693. "pziv_hydro": { frag: 1.23, dmg: 607, spot: 1.26, def: 1.07, win: 54.88, tier: 5, nation: "DE", type: "MT", prem: 1 },
  694. "t-25": { frag: 1.22, dmg: 596, spot: 1.55, def: 1.29, win: 55.52, tier: 5, nation: "DE", type: "MT", prem: 1 },
  695. "vk3002db_v1": { frag: 1.13, dmg: 788, spot: 1.49, def: 1.33, win: 53.74, tier: 6, nation: "DE", type: "MT" },
  696. "vk3001p": { frag: 0.93, dmg: 666, spot: 1.28, def: 0.89, win: 52.07, tier: 6, nation: "DE", type: "MT" },
  697. "vk3002m": { frag: 1.08, dmg: 755, spot: 1.44, def: 1.21, win: 53.18, tier: 6, nation: "DE", type: "MT" },
  698. "pzv_pziv": { frag: 1.04, dmg: 643, spot: 2.01, def: 1.30, win: 50.70, tier: 6, nation: "DE", type: "MT", prem: 1 },
  699. "pzv_pziv_ausf_alfa": { frag: 1.04, dmg: 643, spot: 2.01, def: 1.30, win: 51.35, tier: 6, nation: "DE", type: "MT", prem: 1 },
  700. "pziv_schmalturm": { frag: 1.07, dmg: 808, spot: 1.10, def: 1.62, win: 50.54, tier: 6, nation: "DE", type: "MT", prem: 1 },
  701. "pzv": { frag: 0.84, dmg: 850, spot: 1.11, def: 1.27, win: 51.64, tier: 7, nation: "DE", type: "MT" },
  702. "vk3002db": { frag: 0.92, dmg: 848, spot: 1.54, def: 1.02, win: 52.63, tier: 7, nation: "DE", type: "MT" },
  703. "panther_m10": { frag: 0.99, dmg: 942, spot: 1.27, def: 1.49, win: 52.41, tier: 7, nation: "DE", type: "MT", prem: 1 },
  704. "panther_ii": { frag: 0.90, dmg: 1110, spot: 1.43, def: 1.04, win: 53.04, tier: 8, nation: "DE", type: "MT" },
  705. "indien_panzer": { frag: 0.90, dmg: 1213, spot: 1.13, def: 1.16, win: 50.29, tier: 8, nation: "DE", type: "MT" },
  706. "e-50": { frag: 1.01, dmg: 1518, spot: 1.47, def: 0.82, win: 52.24, tier: 9, nation: "DE", type: "MT" },
  707. "pro_ag_a": { frag: 0.96, dmg: 1485, spot: 1.27, def: 1.09, win: 49.51, tier: 9, nation: "DE", type: "MT" },
  708. "e50_ausf_m": { frag: 0.94, dmg: 1701, spot: 1.42, def: 0.66, win: 49.77, tier: 10, nation: "DE", type: "MT" },
  709. "leopard1": { frag: 0.93, dmg: 1736, spot: 1.46, def: 0.82, win: 47.28, tier: 10, nation: "DE", type: "MT" },
  710. // heavy tanks
  711. "dw_ii": { frag: 1.16, dmg: 348, spot: 1.20, def: 1.49, win: 51.63, tier: 4, nation: "DE", type: "HT" },
  712. "b-1bis_captured": { frag: 1.96, dmg: 527, spot: 1.79, def: 2.22, win: 60.16, tier: 4, nation: "DE", type: "HT", prem: 1 },
  713. "vk3001h": { frag: 1.17, dmg: 677, spot: 1.45, def: 0.90, win: 51.80, tier: 5, nation: "DE", type: "HT" },
  714. "vk3601h": { frag: 1.34, dmg: 947, spot: 1.40, def: 1.40, win: 57.39, tier: 6, nation: "DE", type: "HT" },
  715. "pzvi": { frag: 0.93, dmg: 1031, spot: 0.94, def: 0.98, win: 51.68, tier: 7, nation: "DE", type: "HT" },
  716. "pzvi_tiger_p": { frag: 0.97, dmg: 1095, spot: 0.93, def: 1.08, win: 53.17, tier: 7, nation: "DE", type: "HT" },
  717. "pzvib_tiger_ii": { frag: 0.89, dmg: 1261, spot: 0.99, def: 0.83, win: 50.25, tier: 8, nation: "DE", type: "HT" },
  718. "vk4502a": { frag: 0.92, dmg: 1258, spot: 1.25, def: 0.89, win: 51.16, tier: 8, nation: "DE", type: "HT" },
  719. "lowe": { frag: 0.83, dmg: 1221, spot: 0.84, def: 0.79, win: 49.04, tier: 8, nation: "DE", type: "HT", prem: 1 },
  720. "e-75": { frag: 0.96, dmg: 1595, spot: 1.00, def: 0.69, win: 51.37, tier: 9, nation: "DE", type: "HT" },
  721. "vk4502p": { frag: 0.90, dmg: 1488, spot: 0.93, def: 0.60, win: 49.63, tier: 9, nation: "DE", type: "HT" },
  722. "e-100": { frag: 0.94, dmg: 1836, spot: 0.98, def: 0.52, win: 50.59, tier: 10, nation: "DE", type: "HT" },
  723. "maus": { frag: 0.82, dmg: 1631, spot: 0.89, def: 0.68, win: 49.77, tier: 10, nation: "DE", type: "HT" },
  724. "vk7201": { frag: 0.86, dmg: 1700, spot: 1.13, def: 0.56, win: 50.07, tier: 10, nation: "DE", type: "HT", prem: 1 },
  725. // tank destroyers
  726. "panzerjager_i": { frag: 1.95, dmg: 330, spot: 0.94, def: 1.78, win: 59.68, tier: 2, nation: "DE", type: "TD" },
  727. "g20_marder_ii": { frag: 1.51, dmg: 428, spot: 1.08, def: 1.51, win: 58.41, tier: 3, nation: "DE", type: "TD" },
  728. "hetzer": { frag: 1.63, dmg: 533, spot: 0.64, def: 1.37, win: 57.58, tier: 4, nation: "DE", type: "TD" },
  729. "marder_iii": { frag: 1.42, dmg: 533, spot: 0.64, def: 1.37, win: 57.58, tier: 4, nation: "DE", type: "TD" },
  730. "g101_stug_iii": { frag: 0, dmg: 0, spot: 0, def: 0, win: 0, tier: 5, nation: "DE", type: "TD" }, // no values
  731. "stug_40_ausfg": { frag: 1.21, dmg: 616, spot: 0.73, def: 1.40, win: 53.19, tier: 5, nation: "DE", type: "TD" },
  732. "pz_sfl_ivc": { frag: 1.32, dmg: 681, spot: 0.86, def: 1.32, win: 54.17, tier: 5, nation: "DE", type: "TD" },
  733. "jagdpziv": { frag: 1.08, dmg: 748, spot: 0.72, def: 1.26, win: 52.37, tier: 6, nation: "DE", type: "TD" },
  734. "nashorn": { frag: 1.26, dmg: 937, spot: 0.80, def: 1.14, win: 53.97, tier: 6, nation: "DE", type: "TD" },
  735. "dickermax": { frag: 1.20, dmg: 892, spot: 0.76, def: 1.09, win: 51.40, tier: 6, nation: "DE", type: "TD", prem: 1 },
  736. "jagdpanther": { frag: 1.10, dmg: 1123, spot: 0.68, def: 1.10, win: 51.94, tier: 7, nation: "DE", type: "TD" },
  737. "sturer_emil": { frag: 1.10, dmg: 1123, spot: 0.68, def: 1.10, win: 52.69, tier: 7, nation: "DE", type: "TD" },
  738. "e-25": { frag: 1.34, dmg: 1127, spot: 1.40, def: 2.25, win: 50.54, tier: 7, nation: "DE", type: "TD", prem: 1 },
  739. "jagdpantherii": { frag: 1.14, dmg: 1544, spot: 0.76, def: 0.98, win: 50.97, tier: 8, nation: "DE", type: "TD" },
  740. "ferdinand": { frag: 1.07, dmg: 1455, spot: 0.62, def: 0.90, win: 50.53, tier: 8, nation: "DE", type: "TD" },
  741. "rhb_waffentrager": { frag: 1.22, dmg: 1652, spot: 0.81, def: 1.05, win: 54.54, tier: 8, nation: "DE", type: "TD" },
  742. "jagdtiger_sdkfz_185": { frag: 1.00, dmg: 1378, spot: 0.72, def: 1.14, win: 50.48, tier: 8, nation: "DE", type: "TD", prem: 1 },
  743. "jagdtiger": { frag: 1.09, dmg: 1777, spot: 0.66, def: 0.77, win: 49.84, tier: 9, nation: "DE", type: "TD" },
  744. "waffentrager_iv": { frag: 1.16, dmg: 1842, spot: 0.69, def: 0.70, win: 52.00, tier: 9, nation: "DE", type: "TD" },
  745. "jagdpz_e100": { frag: 1.02, dmg: 1943, spot: 0.66, def: 0.49, win: 48.61, tier: 10, nation: "DE", type: "TD" },
  746. "waffentrager_e100": { frag: 1.40, dmg: 2388, spot: 0.95, def: 0.68, win: 53.83, tier: 10, nation: "DE", type: "TD" },
  747. // artillery
  748. "gw_mk_vie": { frag: 1.47, dmg: 280, spot: 0.17, def: 2.23, win: 51.21, tier: 2, nation: "DE", type: "SPG" },
  749. "bison_i": { frag: 1.31, dmg: 383, spot: 0.21, def: 1.57, win: 57.02, tier: 3, nation: "DE", type: "SPG" },
  750. "wespe": { frag: 1.15, dmg: 415, spot: 0.16, def: 1.81, win: 54.00, tier: 3, nation: "DE", type: "SPG" },
  751. "sturmpanzer_ii": { frag: 1.16, dmg: 436, spot: 0.18, def: 1.68, win: 50.46, tier: 4, nation: "DE", type: "SPG" },
  752. "pz_sfl_ivb": { frag: 1.10, dmg: 471, spot: 0.16, def: 2.44, win: 55.16, tier: 4, nation: "DE", type: "SPG" },
  753. "grille": { frag: 1.08, dmg: 648, spot: 0.11, def: 1.58, win: 51.03, tier: 5, nation: "DE", type: "SPG" },
  754. "hummel": { frag: 0.84, dmg: 982, spot: 0.11, def: 1.28, win: 48.42, tier: 6, nation: "DE", type: "SPG" },
  755. "g_panther": { frag: 0.81, dmg: 1248, spot: 0.10, def: 0.91, win: 48.17, tier: 7, nation: "DE", type: "SPG" },
  756. "gw_tiger_p": { frag: 0.88, dmg: 1335, spot: 0.09, def: 0.61, win: 47.62, tier: 8, nation: "DE", type: "SPG" },
  757. "g_tiger": { frag: 0.86, dmg: 1552, spot: 0.09, def: 0.61, win: 49.30, tier: 9, nation: "DE", type: "SPG" },
  758. "g_e": { frag: 0.86, dmg: 1651, spot: 0.08, def: 0.56, win: 49.55, tier: 10, nation: "DE", type: "SPG" },
  759.  
  760. // usa
  761. // light tanks
  762. "t1_cunningham": { frag: 2.14, dmg: 265, spot: 2.67, def: 1.78, win: 61.40, tier: 1, nation: "US", type: "LT" },
  763. "m2_lt": { frag: 1.75, dmg: 281, spot: 2.73, def: 1.76, win: 60.49, tier: 2, nation: "US", type: "LT" },
  764. "t2_lt": { frag: 1.70, dmg: 275, spot: 3.12, def: 1.64, win: 58.98, tier: 2, nation: "US", type: "LT", prem: 1 },
  765. "t1_e6": { frag: 1.62, dmg: 269, spot: 2.05, def: 1.43, win: 57.06, tier: 2, nation: "US", type: "LT", prem: 1 },
  766. "t7_combat_car": { frag: 1.80, dmg: 295, spot: 2.02, def: 2.02, win: 58.04, tier: 2, nation: "US", type: "LT", prem: 1 },
  767. "m3_stuart": { frag: 1.09, dmg: 252, spot: 2.66, def: 1.57, win: 53.72, tier: 3, nation: "US", type: "LT" },
  768. "m22_locust": { frag: 1.22, dmg: 287, spot: 2.94, def: 1.27, win: 58.31, tier: 3, nation: "US", type: "LT", prem: 1 },
  769. "mtls1g14": { frag: 1.39, dmg: 314, spot: 1.95, def: 1.64, win: 57.44, tier: 3, nation: "US", type: "LT", prem: 1 },
  770. "m5_stuart": { frag: 1.03, dmg: 334, spot: 3.12, def: 1.28, win: 57.84, tier: 4, nation: "US", type: "LT" },
  771. "m24_chaffee": { frag: 0.69, dmg: 538, spot: 2.67, def: 0.81, win: 53.27, tier: 5, nation: "US", type: "LT" },
  772. "t21": { frag: 0.65, dmg: 517, spot: 2.44, def: 0.76, win: 52.09, tier: 6, nation: "US", type: "LT" },
  773. "t71": { frag: 0.81, dmg: 824, spot: 2.66, def: 0.85, win: 53.03, tier: 7, nation: "US", type: "LT" },
  774. // medium tanks
  775. "t2_med": { frag: 1.92, dmg: 310, spot: 2.01, def: 1.92, win: 57.24, tier: 2, nation: "US", type: "MT" },
  776. "m2_med": { frag: 1.38, dmg: 301, spot: 1.45, def: 1.15, win: 53.29, tier: 3, nation: "US", type: "MT" },
  777. "m3_grant": { frag: 1.14, dmg: 377, spot: 0.87, def: 0.97, win: 51.78, tier: 4, nation: "US", type: "MT" },
  778. "m4_sherman": { frag: 1.73, dmg: 801, spot: 1.57, def: 1.31, win: 60.24, tier: 5, nation: "US", type: "MT" },
  779. "m7_med": { frag: 0.98, dmg: 441, spot: 2.15, def: 1.12, win: 53.32, tier: 5, nation: "US", type: "MT" },
  780. "ram-ii": { frag: 1.19, dmg: 538, spot: 1.37, def: 1.31, win: 55.69, tier: 5, nation: "US", type: "MT", prem: 1 },
  781. "m4a2e4": { frag: 0.94, dmg: 401, spot: 1.45, def: 0.94, win: 51.74, tier: 5, nation: "US", type: "MT", prem: 1 },
  782. "sherman_jumbo": { frag: 1.21, dmg: 840, spot: 1.19, def: 1.38, win: 54.75, tier: 6, nation: "US", type: "MT" },
  783. "m4a3e8_sherman": { frag: 1.03, dmg: 700, spot: 1.50, def: 1.11, win: 53.63, tier: 6, nation: "US", type: "MT" },
  784. "t20": { frag: 0.97, dmg: 932, spot: 1.69, def: 0.98, win: 53.52, tier: 7, nation: "US", type: "MT" },
  785. "t23e3": { frag: 0, dmg: 0, spot: 0, def: 0, win: 0, tier: 7, nation: "US", type: "MT", prem: 1 }, // no values
  786. "pershing": { frag: 0.95, dmg: 1159, spot: 1.53, def: 1.11, win: 52.76, tier: 8, nation: "US", type: "MT" },
  787. "t69": { frag: 1.21, dmg: 1490, spot: 1.33, def: 1.48, win: 55.52, tier: 8, nation: "US", type: "MT" },
  788. "t26_e4_superpershing": { frag: 0.89, dmg: 1151, spot: 0.90, def: 1.10, win: 52.30, tier: 8, nation: "US", type: "MT", prem: 1 },
  789. "t23": { frag: 0.95, dmg: 1159, spot: 1.53, def: 1.11, win: 52.76, tier: 8, nation: "US", type: "MT", prem: 1 },
  790. "m46_patton": { frag: 1.02, dmg: 1503, spot: 1.64, def: 0.81, win: 52.47, tier: 9, nation: "US", type: "MT" },
  791. "t54e1": { frag: 1.14, dmg: 1670, spot: 1.05, def: 0.81, win: 51.79, tier: 9, nation: "US", type: "MT" },
  792. "m48a1": { frag: 0.97, dmg: 1716, spot: 1.58, def: 0.63, win: 50.52, tier: 10, nation: "US", type: "MT" },
  793. "m60": { frag: 0.91, dmg: 1735, spot: 1.31, def: 0.60, win: 48.50, tier: 10, nation: "US", type: "MT", prem: 1 },
  794. "t95_e6": { frag: 0, dmg: 0, spot: 0, def: 0, win: 0, tier: 10, nation: "US", type: "MT", prem: 1 }, // no values
  795. // heavy tanks
  796. "t1_hvy": { frag: 1.24, dmg: 636, spot: 1.14, def: 1.15, win: 53.98, tier: 5, nation: "US", type: "HT" },
  797. "t14": { frag: 1.35, dmg: 593, spot: 1.53, def: 1.31, win: 54.02, tier: 5, nation: "US", type: "HT", prem: 1 },
  798. "m6": { frag: 1.07, dmg: 845, spot: 1.03, def: 0.92, win: 52.17, tier: 6, nation: "US", type: "HT" },
  799. "t29": { frag: 1.13, dmg: 1239, spot: 1.07, def: 1.04, win: 54.14, tier: 7, nation: "US", type: "HT" },
  800. "t32": { frag: 0.97, dmg: 1336, spot: 1.21, def: 0.92, win: 52.77, tier: 8, nation: "US", type: "HT" },
  801. "t34_hvy": { frag: 0.87, dmg: 1313, spot: 0.81, def: 0.68, win: 50.57, tier: 8, nation: "US", type: "HT", prem: 1 },
  802. "m6a2e1": { frag: 0.87, dmg: 1113, spot: 1.22, def: 0.80, win: 47.06, tier: 8, nation: "US", type: "HT", prem: 1 },
  803. "m103": { frag: 0.92, dmg: 1578, spot: 1.09, def: 0.67, win: 50.82, tier: 9, nation: "US", type: "HT" },
  804. "t110": { frag: 0.90, dmg: 1802, spot: 1.19, def: 0.74, win: 50.23, tier: 10, nation: "US", type: "HT" },
  805. "t57_58": { frag: 1.16, dmg: 2159, spot: 0.85, def: 0.78, win: 51.43, tier: 10, nation: "US", type: "HT" },
  806. // tank destroyers
  807. "t18": { frag: 2.48, dmg: 360, spot: 1.21, def: 1.79, win: 60.50, tier: 2, nation: "US", type: "TD" },
  808. "t82": { frag: 1.57, dmg: 389, spot: 1.31, def: 1.11, win: 58.10, tier: 3, nation: "US", type: "TD" },
  809. "t40": { frag: 1.45, dmg: 533, spot: 1.15, def: 1.46, win: 56.56, tier: 4, nation: "US", type: "TD" },
  810. "m8a1": { frag: 1.42, dmg: 516, spot: 1.54, def: 1.77, win: 57.49, tier: 4, nation: "US", type: "TD" },
  811. "m10_wolverine": { frag: 1.26, dmg: 627, spot: 0.95, def: 1.42, win: 54.24, tier: 5, nation: "US", type: "TD" },
  812. "t49": { frag: 1.46, dmg: 700, spot: 1.71, def: 1.67, win: 56.89, tier: 5, nation: "US", type: "TD" },
  813. "m36_slagger": { frag: 1.09, dmg: 824, spot: 0.89, def: 1.23, win: 53.57, tier: 6, nation: "US", type: "TD" },
  814. "m18_hellcat": { frag: 1.37, dmg: 1002, spot: 1.47, def: 1.60, win: 56.24, tier: 6, nation: "US", type: "TD" },
  815. "t25_at": { frag: 1.06, dmg: 1057, spot: 0.81, def: 1.12, win: 53.20, tier: 7, nation: "US", type: "TD" },
  816. "t25_2": { frag: 1.01, dmg: 1041, spot: 0.98, def: 1.26, win: 52.52, tier: 7, nation: "US", type: "TD" },
  817. "t28_prototype": { frag: 1.07, dmg: 1467, spot: 0.51, def: 1.06, win: 50.58, tier: 8, nation: "US", type: "TD" },
  818. "t28": { frag: 1.01, dmg: 1353, spot: 0.51, def: 0.95, win: 49.66, tier: 8, nation: "US", type: "TD" },
  819. "t95": { frag: 1.06, dmg: 1646, spot: 0.46, def: 0.76, win: 49.81, tier: 9, nation: "US", type: "TD" },
  820. "t30": { frag: 1.02, dmg: 1733, spot: 0.72, def: 0.64, win: 50.69, tier: 9, nation: "US", type: "TD" },
  821. "t110e3": { frag: 1.10, dmg: 2072, spot: 0.73, def: 0.50, win: 51.04, tier: 10, nation: "US", type: "TD" },
  822. "t110e4": { frag: 1.03, dmg: 2053, spot: 0.81, def: 0.56, win: 48.93, tier: 10, nation: "US", type: "TD" },
  823. // artillery
  824. "t57": { frag: 1.56, dmg: 296, spot: 0.30, def: 2.33, win: 51.15, tier: 2, nation: "US", type: "SPG" },
  825. "m7_priest": { frag: 1.04, dmg: 567, spot: 0.16, def: 1.89, win: 53.00, tier: 3, nation: "US", type: "SPG" },
  826. "sexton_i": { frag: 1.30, dmg: 490, spot: 0.16, def: 1.93, win: 55.11, tier: 3, nation: "US", type: "SPG" },
  827. "m37": { frag: 1.15, dmg: 419, spot: 0.17, def: 1.90, win: 49.49, tier: 4, nation: "US", type: "SPG" },
  828. "m41": { frag: 0.99, dmg: 874, spot: 0.12, def: 1.33, win: 50.44, tier: 5, nation: "US", type: "SPG" },
  829. "m44": { frag: 0.90, dmg: 974, spot: 0.11, def: 1.52, win: 47.95, tier: 6, nation: "US", type: "SPG" },
  830. "m12": { frag: 0.81, dmg: 1240, spot: 0.10, def: 0.89, win: 48.45, tier: 7, nation: "US", type: "SPG" },
  831. "m40m43": { frag: 0.86, dmg: 1378, spot: 0.09, def: 0.46, win: 47.61, tier: 8, nation: "US", type: "SPG" },
  832. "m53_55": { frag: 0.86, dmg: 1619, spot: 0.09, def: 0.58, win: 48.32, tier: 9, nation: "US", type: "SPG" },
  833. "t92": { frag: 0.86, dmg: 1693, spot: 0.08, def: 0.58, win: 48.24, tier: 10, nation: "US", type: "SPG" },
  834.  
  835. // uk
  836. // light tanks
  837. "gb01_medium_mark_i": { frag: 2.05, dmg: 260, spot: 1.38, def: 1.76, win: 57.88, tier: 1, nation: "", type: "LT" },
  838. "gb03_cruiser_mk_i": { frag: 1.73, dmg: 301, spot: 1.97, def: 1.40, win: 58.67, tier: 2, nation: "", type: "LT" },
  839. "gb58_cruiser_mk_iii": { frag: 2.09, dmg: 349, spot: 2.24, def: 1.42, win: 64.03, tier: 2, nation: "", type: "LT" },
  840. "gb76_mk_vic": { frag: 1.80, dmg: 295, spot: 2.02, def: 2.02, win: 58.04, tier: 2, nation: "", type: "LT", prem: 1 },
  841. "gb69_cruiser_mk_ii": { frag: 1.51, dmg: 330, spot: 1.02, def: 1.20, win: 57.99, tier: 3, nation: "", type: "LT" },
  842. "gb59_cruiser_mk_iv": { frag: 1.65, dmg: 381, spot: 1.92, def: 1.31, win: 60.33, tier: 3, nation: "", type: "LT" },
  843. "gb60_covenanter": { frag: 1.11, dmg: 378, spot: 1.81, def: 1.15, win: 55.60, tier: 4, nation: "", type: "LT" },
  844. "gb04_valentine": { frag: 1.45, dmg: 396, spot: 1.75, def: 1.78, win: 55.72, tier: 4, nation: "", type: "LT" },
  845. "gb20_crusader": { frag: 1.06, dmg: 489, spot: 1.71, def: 1.25, win: 54.16, tier: 5, nation: "", type: "LT" },
  846. // medium tanks
  847. "gb05_vickers_medium_mk_ii": { frag: 1.80, dmg: 297, spot: 1.23, def: 1.67, win: 57.37, tier: 2, nation: "", type: "MT" },
  848. "gb06_vickers_medium_mk_iii": { frag: 1.15, dmg: 290, spot: 1.04, def: 0.47, win: 51.20, tier: 3, nation: "", type: "MT" },
  849. "gb07_matilda": { frag: 1.55, dmg: 562, spot: 0.91, def: 2.08, win: 59.66, tier: 4, nation: "", type: "MT" },
  850. "gb68_matilda_black_prince": { frag: 1.22, dmg: 536, spot: 0.78, def: 1.28, win: 52.98, tier: 5, nation: "", type: "MT", prem: 1 },
  851. "gb21_cromwell": { frag: 1.11, dmg: 744, spot: 2.05, def: 1.09, win: 54.02, tier: 6, nation: "", type: "MT" },
  852. "gb22_comet": { frag: 1.04, dmg: 958, spot: 1.82, def: 1.14, win: 54.07, tier: 7, nation: "", type: "MT" },
  853. "gb23_centurion": { frag: 0.87, dmg: 1193, spot: 1.26, def: 1.07, win: 53.58, tier: 8, nation: "", type: "MT" },
  854. "gb24_centurion_mk3": { frag: 0.90, dmg: 1503, spot: 1.22, def: 0.79, win: 50.50, tier: 9, nation: "", type: "MT" },
  855. "gb70_fv4202_105": { frag: 0.93, dmg: 1726, spot: 1.34, def: 0.60, win: 48.85, tier: 10, nation: "", type: "MT" },
  856. // heavy tanks
  857. "gb08_churchill_i": { frag: 1.24, dmg: 671, spot: 0.90, def: 1.43, win: 53.96, tier: 5, nation: "", type: "HT" },
  858. "gb51_excelsior": { frag: 1.32, dmg: 582, spot: 1.32, def: 1.89, win: 53.90, tier: 5, nation: "", type: "HT", prem: 1 },
  859. "gb09_churchill_vii": { frag: 1.06, dmg: 802, spot: 0.76, def: 1.18, win: 52.39, tier: 6, nation: "", type: "HT" },
  860. "gb63_tog_ii": { frag: 1.29, dmg: 922, spot: 0.60, def: 1.41, win: 55.31, tier: 6, nation: "", type: "HT", prem: 1 },
  861. "gb10_black_prince": { frag: 0.96, dmg: 1043, spot: 0.89, def: 1.10, win: 53.54, tier: 7, nation: "", type: "HT" },
  862. "gb11_caernarvon": { frag: 0.84, dmg: 1257, spot: 1.06, def: 0.87, win: 52.11, tier: 8, nation: "", type: "HT" },
  863. "gb12_conqueror": { frag: 0.90, dmg: 1604, spot: 1.04, def: 0.68, win: 49.96, tier: 9, nation: "", type: "HT" },
  864. "gb13_fv215b": { frag: 0.92, dmg: 1859, spot: 1.06, def: 0.76, win: 47.41, tier: 10, nation: "", type: "HT" },
  865. // tank destroyers
  866. "gb39_universal_carrierqf2": { frag: 1.95, dmg: 321, spot: 1.48, def: 1.77, win: 60.98, tier: 2, nation: "", type: "TD" },
  867. "gb42_valentine_at": { frag: 1.76, dmg: 401, spot: 0.94, def: 1.64, win: 59.00, tier: 3, nation: "", type: "TD" },
  868. "gb57_alecto": { frag: 1.49, dmg: 504, spot: 1.48, def: 1.66, win: 55.33, tier: 4, nation: "", type: "TD" },
  869. "gb73_at2": { frag: 1.29, dmg: 617, spot: 0.79, def: 1.97, win: 55.00, tier: 5, nation: "", type: "TD" },
  870. "gb74_at8": { frag: 1.24, dmg: 916, spot: 0.73, def: 1.69, win: 54.00, tier: 6, nation: "", type: "TD" },
  871. "gb40_gun_carrier_churchill": { frag: 0.92, dmg: 704, spot: 0.46, def: 1.10, win: 50.85, tier: 6, nation: "", type: "TD" },
  872. "gb75_at7": { frag: 1.19, dmg: 1249, spot: 0.69, def: 1.10, win: 54.00, tier: 7, nation: "", type: "TD" },
  873. "gb71_at_15a": { frag: 0.92, dmg: 1008, spot: 0.82, def: 1.21, win: 51.56, tier: 7, nation: "", type: "TD", prem: 1 },
  874. "gb72_at15": { frag: 1.15, dmg: 1533, spot: 0.63, def: 1.31, win: 53.26, tier: 8, nation: "", type: "TD" },
  875. "gb32_tortoise": { frag: 1.11, dmg: 1772, spot: 0.57, def: 1.07, win: 51.99, tier: 9, nation: "", type: "TD" },
  876. "gb48_fv215b_183": { frag: 1.15, dmg: 2179, spot: 0.60, def: 0.58, win: 49.03, tier: 10, nation: "", type: "TD" },
  877. // artillery
  878. "gb25_loyd_carrier": { frag: 1.47, dmg: 280, spot: 0.17, def: 2.23, win: 51.21, tier: 2, nation: "", type: "SPG" },
  879. "gb27_sexton": { frag: 1.30, dmg: 490, spot: 0.16, def: 1.93, win: 55.11, tier: 3, nation: "", type: "SPG" },
  880. "gb78_sexton_i": { frag: 1.30, dmg: 490, spot: 0.16, def: 1.93, win: 55.11, tier: 3, nation: "", type: "SPG", prem: 1 },
  881. "gb26_birch_gun": { frag: 1.11, dmg: 477, spot: 0.16, def: 1.94, win: 51.11, tier: 4, nation: "", type: "SPG" },
  882. "gb28_bishop": { frag: 1.11, dmg: 620, spot: 0.12, def: 1.76, win: 55.29, tier: 5, nation: "", type: "SPG" },
  883. "gb77_fv304": { frag: 0.95, dmg: 889, spot: 0.13, def: 1.72, win: 49.00, tier: 6, nation: "", type: "SPG" },
  884. "gb29_crusader_5inch": { frag: 0.81, dmg: 1226, spot: 0.10, def: 0.86, win: 48.50, tier: 7, nation: "", type: "SPG" },
  885. "gb79_fv206": { frag: 0.88, dmg: 1335, spot: 0.09, def: 0.61, win: 46.68, tier: 8, nation: "", type: "SPG" },
  886. "gb30_fv3805": { frag: 0.86, dmg: 1619, spot: 0.09, def: 0.58, win: 48.32, tier: 9, nation: "", type: "SPG" },
  887. "gb31_conqueror_gun": { frag: 0.87, dmg: 1778, spot: 0.08, def: 0.58, win: 49.00, tier: 10, nation: "", type: "SPG" },
  888.  
  889. // france
  890. // light tanks
  891. "renaultft": { frag: 2.01, dmg: 268, spot: 2.12, def: 2.17, win: 60.24, tier: 1, nation: "FR", type: "LT" },
  892. "hotchkiss_h35": { frag: 1.52, dmg: 249, spot: 1.32, def: 2.43, win: 58.69, tier: 2, nation: "FR", type: "LT" },
  893. "d1": { frag: 1.46, dmg: 250, spot: 1.24, def: 2.90, win: 53.96, tier: 2, nation: "FR", type: "LT" },
  894. "amx38": { frag: 0.95, dmg: 222, spot: 1.05, def: 1.64, win: 55.07, tier: 3, nation: "FR", type: "LT" },
  895. "amx40": { frag: 0.93, dmg: 297, spot: 0.92, def: 1.39, win: 53.09, tier: 4, nation: "FR", type: "LT" },
  896. "elc_amx": { frag: 0.73, dmg: 464, spot: 2.88, def: 0.77, win: 53.91, tier: 5, nation: "FR", type: "LT" },
  897. "amx_12t": { frag: 0.63, dmg: 471, spot: 1.93, def: 0.69, win: 51.44, tier: 6, nation: "FR", type: "LT" },
  898. "amx_13_75": { frag: 0.75, dmg: 623, spot: 1.99, def: 0.77, win: 53.10, tier: 7, nation: "FR", type: "LT" },
  899. "amx_13_90": { frag: 0.81, dmg: 846, spot: 2.37, def: 0.66, win: 53.77, tier: 8, nation: "FR", type: "LT" },
  900. // medium tanks
  901. "d2": { frag: 1.38, dmg: 320, spot: 0.97, def: 2.07, win: 59.59, tier: 3, nation: "FR", type: "MT" },
  902. "lorraine40t": { frag: 1.09, dmg: 1380, spot: 1.47, def: 0.95, win: 53.24, tier: 9, nation: "FR", type: "MT" },
  903. "bat_chatillon25t": { frag: 1.19, dmg: 1761, spot: 2.12, def: 0.84, win: 52.51, tier: 10, nation: "FR", type: "MT" },
  904. // heavy tanks
  905. "b1": { frag: 1.16, dmg: 348, spot: 1.20, def: 1.49, win: 51.63, tier: 4, nation: "FR", type: "HT" },
  906. "bdr_g1b": { frag: 1.22, dmg: 654, spot: 0.83, def: 1.11, win: 52.93, tier: 5, nation: "FR", type: "HT" },
  907. "arl_44": { frag: 0.96, dmg: 813, spot: 0.84, def: 0.85, win: 51.08, tier: 6, nation: "FR", type: "HT" },
  908. "amx_m4_1945": { frag: 0.89, dmg: 1021, spot: 0.93, def: 0.94, win: 50.70, tier: 7, nation: "FR", type: "HT" },
  909. "amx_50_100": { frag: 1.12, dmg: 1417, spot: 0.97, def: 1.07, win: 51.65, tier: 8, nation: "FR", type: "HT" },
  910. "fcm_50t": { frag: 1.00, dmg: 1312, spot: 1.37, def: 1.11, win: 50.71, tier: 8, nation: "FR", type: "HT", prem: 1 },
  911. "amx_50_120": { frag: 1.12, dmg: 1692, spot: 0.90, def: 0.87, win: 50.81, tier: 9, nation: "FR", type: "HT" },
  912. "f10_amx_50b": { frag: 1.07, dmg: 1915, spot: 1.03, def: 0.87, win: 50.15, tier: 10, nation: "FR", type: "HT" },
  913. // tank destroyer
  914. "renaultft_ac": { frag: 2.02, dmg: 334, spot: 0.86, def: 1.65, win: 54.47, tier: 2, nation: "FR", type: "TD" },
  915. "fcm_36pak40": { frag: 1.58, dmg: 389, spot: 1.02, def: 2.09, win: 57.84, tier: 3, nation: "FR", type: "TD", prem: 1 },
  916. "renaultue57": { frag: 1.96, dmg: 472, spot: 1.03, def: 2.15, win: 59.00, tier: 3, nation: "FR", type: "TD" },
  917. "somua_sau_40": { frag: 1.19, dmg: 409, spot: 0.59, def: 1.14, win: 53.90, tier: 4, nation: "FR", type: "TD" },
  918. "s_35ca": { frag: 1.26, dmg: 649, spot: 0.82, def: 1.26, win: 51.59, tier: 5, nation: "FR", type: "TD" },
  919. "arl_v39": { frag: 0.99, dmg: 765, spot: 0.68, def: 1.13, win: 48.76, tier: 6, nation: "FR", type: "TD" },
  920. "amx_ac_mle1946": { frag: 0.95, dmg: 1043, spot: 0.72, def: 0.97, win: 51.34, tier: 7, nation: "FR", type: "TD" },
  921. "amx_ac_mle1948": { frag: 1.00, dmg: 1359, spot: 0.80, def: 0.95, win: 50.97, tier: 8, nation: "FR", type: "TD" },
  922. "amx50_foch": { frag: 1.03, dmg: 1674, spot: 0.97, def: 0.90, win: 51.90, tier: 9, nation: "FR", type: "TD" },
  923. "amx_50fosh_155": { frag: 1.33, dmg: 2296, spot: 0.95, def: 0.68, win: 52.77, tier: 10, nation: "FR", type: "TD" },
  924. // artillery
  925. "renaultbs": { frag: 1.44, dmg: 278, spot: 0.18, def: 1.85, win: 52.70, tier: 2, nation: "FR", type: "SPG" },
  926. "lorraine39_l_am": { frag: 1.39, dmg: 500, spot: 0.15, def: 2.20, win: 54.24, tier: 3, nation: "FR", type: "SPG" },
  927. "amx_ob_am105": { frag: 1.11, dmg: 477, spot: 0.16, def: 1.94, win: 51.11, tier: 4, nation: "FR", type: "SPG" },
  928. "_105_lefh18b2": { frag: 1.22, dmg: 675, spot: 0.12, def: 2.26, win: 51.40, tier: 5, nation: "FR", type: "SPG", prem: 1 },
  929. "amx_105am": { frag: 1.39, dmg: 710, spot: 0.12, def: 2.01, win: 52.80, tier: 5, nation: "FR", type: "SPG" },
  930. "amx_13f3am": { frag: 0.90, dmg: 1052, spot: 0.11, def: 1.56, win: 49.39, tier: 6, nation: "FR", type: "SPG" },
  931. "lorraine155_50": { frag: 0.79, dmg: 1235, spot: 0.10, def: 1.02, win: 48.87, tier: 7, nation: "FR", type: "SPG" },
  932. "lorraine155_51": { frag: 0.85, dmg: 1309, spot: 0.09, def: 0.72, win: 46.67, tier: 8, nation: "FR", type: "SPG" },
  933. "bat_chatillon155_55": { frag: 1.02, dmg: 1576, spot: 0.09, def: 0.59, win: 48.93, tier: 9, nation: "FR", type: "SPG" },
  934. "bat_chatillon155_58": { frag: 1.02, dmg: 1682, spot: 0.08, def: 0.94, win: 50.11, tier: 10, nation: "FR", type: "SPG" },
  935.  
  936. // china
  937. // light tanks
  938. "ch06_renault_nc31": { frag: 2.05, dmg: 274, spot: 1.51, def: 2.10, win: 60.00, tier: 1, nation: "CH", type: "LT" },
  939. "ch07_vickers_mke_type_bt26": { frag: 1.85, dmg: 308, spot: 1.72, def: 1.83, win: 60.49, tier: 2, nation: "CH", type: "LT" },
  940. "ch08_type97_chi_ha": { frag: 1.57, dmg: 384, spot: 1.47, def: 1.71, win: 59.80, tier: 3, nation: "CH", type: "LT" },
  941. "ch09_m5": { frag: 1.08, dmg: 377, spot: 2.62, def: 1.15, win: 55.52, tier: 4, nation: "CH", type: "LT" },
  942. "ch15_59_16": { frag: 0.63, dmg: 415, spot: 2.83, def: 0.81, win: 51.52, tier: 6, nation: "CH", type: "LT" },
  943. "ch24_type64": { frag: 0.66, dmg: 483, spot: 2.75, def: 0.75, win: 52.33, tier: 6, nation: "CH", type: "LT", prem: 1 },
  944. "ch16_wz_131": { frag: 0.73, dmg: 752, spot: 2.59, def: 0.81, win: 52.48, tier: 7, nation: "CH", type: "LT" },
  945. "ch02_type62": { frag: 0.70, dmg: 685, spot: 2.43, def: 0.85, win: 52.18, tier: 7, nation: "CH", type: "LT", prem: 1 },
  946. "ch17_wz131_1_wz132": { frag: 0.68, dmg: 804, spot: 2.87, def: 0.69, win: 52.11, tier: 8, nation: "CH", type: "LT" },
  947. // medium tanks
  948. "ch21_t34": { frag: 1.18, dmg: 538, spot: 1.45, def: 1.25, win: 53.54, tier: 5, nation: "CH", type: "MT" },
  949. "ch20_type58": { frag: 1.10, dmg: 751, spot: 1.56, def: 1.22, win: 52.87, tier: 6, nation: "CH", type: "MT" },
  950. "ch04_t34_1": { frag: 1.03, dmg: 1015, spot: 1.58, def: 1.04, win: 53.58, tier: 7, nation: "CH", type: "MT" },
  951. "ch05_t34_2": { frag: 0.91, dmg: 1115, spot: 1.66, def: 0.79, win: 52.30, tier: 8, nation: "CH", type: "MT" },
  952. "ch14_t34_3": { frag: 0.91, dmg: 1115, spot: 1.66, def: 0.79, win: 52.30, tier: 8, nation: "CH", type: "MT", prem: 1 },
  953. "ch01_type59": { frag: 0.99, dmg: 1132, spot: 1.70, def: 1.02, win: 52.88, tier: 8, nation: "CH", type: "MT", prem: 1 },
  954. "ch01_type59_g": { frag: 0.99, dmg: 1132, spot: 1.70, def: 1.02, win: 52.88, tier: 8, nation: "CH", type: "MT", prem: 1 },
  955. "ch18_wz-120": { frag: 0.99, dmg: 1524, spot: 1.64, def: 0.77, win: 53.20, tier: 9, nation: "CH", type: "MT" },
  956. "ch19_121": { frag: 0.95, dmg: 1704, spot: 1.39, def: 0.69, win: 51.04, tier: 10, nation: "CH", type: "MT" },
  957. // heavy tanks
  958. "ch10_is2": { frag: 1.07, dmg: 1153, spot: 1.11, def: 0.86, win: 53.10, tier: 7, nation: "CH", type: "HT" },
  959. "ch11_110": { frag: 0.94, dmg: 1347, spot: 1.17, def: 0.87, win: 53.26, tier: 8, nation: "CH", type: "HT" },
  960. "ch03_111": { frag: 1.11, dmg: 1415, spot: 1.11, def: 0.91, win: 53.28, tier: 8, nation: "CH", type: "HT", prem: 1 },
  961. "ch23_112": { frag: 1.11, dmg: 1415, spot: 1.11, def: 0.91, win: 53.28, tier: 8, nation: "CH", type: "HT", prem: 1 },
  962. "ch12_111_1_2_3": { frag: 0.91, dmg: 1586, spot: 1.34, def: 0.54, win: 52.66, tier: 9, nation: "CH", type: "HT" },
  963. "ch22_113": { frag: 0.88, dmg: 1748, spot: 1.23, def: 0.66, win: 49.50, tier: 10, nation: "CH", type: "HT" },
  964.  
  965. // japan
  966. // light tanks
  967. "nc27": { frag: 2.05, dmg: 260, spot: 1.38, def: 1.76, win: 57.88, tier: 1, nation: "JP", type: "LT" },
  968. "ha_go": { frag: 1.80, dmg: 295, spot: 2.02, def: 2.02, win: 58.04, tier: 2, nation: "JP", type: "LT" },
  969. "ke_ni": { frag: 1.39, dmg: 314, spot: 1.95, def: 1.64, win: 57.44, tier: 3, nation: "JP", type: "LT" },
  970. "ke_ni_b": { frag: 1.39, dmg: 314, spot: 1.95, def: 1.64, win: 57.44, tier: 3, nation: "JP", type: "LT", prem: 1 },
  971. "ke_ho": { frag: 1.11, dmg: 359, spot: 2.39, def: 1.36, win: 56.28, tier: 4, nation: "JP", type: "LT" },
  972. // medium tanks
  973. "chi_ni": { frag: 1.80, dmg: 297, spot: 1.23, def: 1.67, win: 57.37, tier: 2, nation: "JP", type: "MT" },
  974. "chi_ha": { frag: 1.45, dmg: 334, spot: 1.26, def: 1.41, win: 56.52, tier: 3, nation: "JP", type: "MT" },
  975. "chi_he": { frag: 1.27, dmg: 429, spot: 1.38, def: 1.31, win: 55.34, tier: 4, nation: "JP", type: "MT" },
  976. "chi_nu": { frag: 1.15, dmg: 530, spot: 1.41, def: 1.19, win: 54.27, tier: 5, nation: "JP", type: "MT" },
  977. "chi_nu_kai": { frag: 1.15, dmg: 530, spot: 1.41, def: 1.19, win: 54.27, tier: 5, nation: "JP", type: "MT", prem: 1 },
  978. "chi_to": { frag: 1.08, dmg: 755, spot: 1.44, def: 1.21, win: 53.18, tier: 6, nation: "JP", type: "MT" },
  979. "chi_ri": { frag: 0.95, dmg: 898, spot: 1.52, def: 1.12, win: 53.05, tier: 7, nation: "JP", type: "MT" },
  980. "sta_1": { frag: 0.95, dmg: 1186, spot: 1.41, def: 1.09, win: 53.04, tier: 8, nation: "JP", type: "MT" },
  981. "type_61": { frag: 0.99, dmg: 1524, spot: 1.64, def: 0.77, win: 53.20, tier: 9, nation: "JP", type: "MT" },
  982. "st_b1": { frag: 0.93, dmg: 1736, spot: 1.46, def: 0.82, win: 47.28, tier: 10, nation: "JP", type: "MT" },
  983.  
  984. "tankname": { frag: 0, dmg: 0, spot: 0, def: 0, win: 0, tier: 0, nation: "XX", type: "XX" }
  985. };
  986. vehAmount = vehTierTotal = vehBattlesTotal = 0,
  987. premBattlesTotal = premWinsTotal = premBadgesTotal = 0,
  988. tenBattlesTotal = tenWinsTotal = tenBadgesTotal = 0,
  989. vehExpFrag = vehExpDmg = vehExpSpot = vehExpDef = vehExpWin = 0;
  990. vehTiersObj = {1:{b:0,c:0},2:{b:0,c:0},3:{b:0,c:0},4:{b:0,c:0},5:{b:0,c:0},6:{b:0,c:0},7:{b:0,c:0},8:{b:0,c:0},9:{b:0,c:0},10:{b:0,c:0}};
  991. vehBadgesObj = {0:{c:0,p:0},1:{c:0,p:0},2:{c:0,p:0},3:{c:0,p:0},4:{c:0,p:0},5:{c:0,p:0}};
  992. premArr = []; tenArr = [];
  993. vehListObj = {};
  994.  
  995. // total mastery badge and colouring tank table category rows
  996. var typeRow_class = document.getElementsByClassName('t-profile_tankstype js-table-dropdown-link');
  997. for (var i=0; i<typeRow_class.length; i++) {
  998. vehAmount += filter(typeRow_class[i].cells[0].getElementsByTagName('span')[1].innerHTML,1);
  999. vehBadgesObj[5].c = vehAmount;
  1000. vehBadgesObj[5].p = (vehAmount/vehAmount*100).toFixed(0);
  1001. typeBattles = filter(typeRow_class[i].cells[1].innerHTML,1);
  1002. typeWinrate = filter(typeRow_class[i].cells[2].innerHTML,1);
  1003. typeWins = typeBattles*(typeWinrate/100);
  1004. // modify table
  1005. typeRow_class[i].cells[2].innerHTML = filter(typeWins.toFixed(0),3)+" - "+colStat(typeWinrate, "winrate", 0, "pct");
  1006. }
  1007.  
  1008. // average tier, colouring premium tanks and winrates in vehicle tables
  1009. var vehRow_class = document.getElementsByClassName('t-profile_tankstype t-profile_tankstype__item');
  1010. vehRowStats_class = document.getElementsByClassName('t-profile_slidedown tablesorter-childRow');
  1011. for (var i=0; i<vehRow_class.length; i++) {
  1012. // fetch info from table
  1013. vehImgName = vehRow_class[i].cells[0].getElementsByTagName('img')[0].src.match(/\w+-([\w-]+).png/);
  1014. vehBattles = filter(vehRow_class[i].cells[1].innerHTML,1);
  1015. vehWinrate = filter(vehRow_class[i].cells[2].innerHTML,1);
  1016. typeWins = vehBattles*(vehWinrate/100);
  1017. if (vehRow_class[i].cells[3].getElementsByTagName('img')[0]) { vehBadge = vehRow_class[i].cells[3].getElementsByTagName('img')[0].getAttribute('data-badge_code'); }
  1018. else { vehBadge = 0; }
  1019. // modify table
  1020. vehRow_class[i].cells[0].getElementsByTagName('img')[0].src = "http://"+wg_host+"/static/3.13.0.2.1/encyclopedia/tankopedia/vehicle/"+vehImgName[0];
  1021. vehRow_class[i].cells[2].innerHTML = filter(typeWins.toFixed(0),3)+" - "+colStat(vehWinrate, "winrate", 0, "pct");
  1022.  
  1023. // process information and push into arrays
  1024. vehTier = statArr[vehImgName[1]].tier;
  1025. vehTiersObj[vehTier].b += vehBattles
  1026. vehTiersObj[vehTier].c += 1;
  1027. vehTierTotal += vehTier*vehBattles;
  1028. vehBattlesTotal += vehBattles;
  1029. vehBadgesObj[vehBadge].c += 1;
  1030. vehBadgesObj[vehBadge].p = (vehBadgesObj[vehBadge].c/vehBadgesObj[5].c*100).toFixed(0);
  1031.  
  1032. // summarize expected stat from every tank for WN8
  1033. vehExpFrag += statArr[vehImgName[1]].frag*vehBattles,
  1034. vehExpDmg += statArr[vehImgName[1]].dmg *vehBattles,
  1035. vehExpSpot += statArr[vehImgName[1]].spot*vehBattles,
  1036. vehExpDef += statArr[vehImgName[1]].def *vehBattles,
  1037. vehExpWin += statArr[vehImgName[1]].win *vehBattles;
  1038.  
  1039. // get info for premium table
  1040. if (statArr[vehImgName[1]].prem !== undefined) {
  1041. premBattlesTotal += filter(vehRow_class[i].cells[1].innerHTML,1);
  1042. premWinsTotal += filter(vehRow_class[i].cells[2].innerHTML.match(/[\d.,\s]+\s-/)[0],1);
  1043. vehRow_class[i].cells[0].getElementsByTagName('span')[1].className += " b-gold-name";
  1044. premArr.push([vehRow_class[i].cloneNode(true), vehRowStats_class[i].cloneNode(true)]);
  1045. if (vehRow_class[i].cells[3].innerHTML.length > 2) { premBadgesTotal += 1; }
  1046. }
  1047.  
  1048. // get info for tier 10 table
  1049. if (vehTier == 10) {
  1050. tenBattlesTotal += filter(vehRow_class[i].cells[1].innerHTML,1);
  1051. tenWinsTotal += filter(vehRow_class[i].cells[2].innerHTML.match(/[\d.,\s]+\s-/)[0],1);
  1052. tenArr.push([vehRow_class[i].cloneNode(true), vehRowStats_class[i].cloneNode(true)]);
  1053. if (vehRow_class[i].cells[3].innerHTML.length > 2) { tenBadgesTotal += 1; }
  1054. }
  1055.  
  1056. // summarize player vehicles into dedicated array for console
  1057. vehListObj[vehImgName[1]] = {
  1058. "infoTier": statArr[vehImgName[1]].tier,
  1059. "infoNation": statArr[vehImgName[1]].nation,
  1060. "infoType": statArr[vehImgName[1]].type,
  1061. "infoBattles": vehBattles,
  1062. "infoVictories": parseFloat(typeWins.toFixed(0)),
  1063. "infoBadge": vehBadge,
  1064. "statExpected": {frag: statArr[vehImgName[1]].frag, dmg: statArr[vehImgName[1]].dmg, spot: statArr[vehImgName[1]].spot, def: statArr[vehImgName[1]].def, win: statArr[vehImgName[1]].win}
  1065. }
  1066. }
  1067.  
  1068. // finding statistic tables
  1069. var mb_table = document.getElementsByClassName('b-result-classes')[0].getElementsByClassName('t-dotted')[0];
  1070. or_table = document.getElementsByClassName('b-result')[0].getElementsByClassName('t-dotted')[0];
  1071. bp_table = document.getElementsByClassName('b-result')[1].getElementsByClassName('t-dotted')[0];
  1072. sm_ratio = document.getElementsByClassName('b-speedometer-ratio');
  1073.  
  1074. // fetching info and calculate draws
  1075. var battles = filter(or_table.rows[0].cells[1].innerHTML,1),
  1076. wins = filter(or_table.rows[1].cells[1].innerHTML.match(/([\d.,\s|&nbsp;]+\d+)\s/)[1],1),
  1077. losses = filter(or_table.rows[2].cells[1].innerHTML.match(/([\d.,\s|&nbsp;]+\d+)\s/)[1],1),
  1078. survive = filter(or_table.rows[3].cells[1].innerHTML.match(/([\d.,\s|&nbsp;]+\d+)\s/)[1],1),
  1079. exp = filter(or_table.rows[4].cells[1].innerHTML,1),
  1080. avgExp = filter(or_table.rows[5].cells[1].innerHTML,1),
  1081. maxExp = filter(or_table.rows[6].cells[1].innerHTML,1),
  1082. frags = filter(bp_table.rows[0].cells[1].innerHTML,1),
  1083. spotted = filter(bp_table.rows[1].cells[1].innerHTML,1),
  1084. hitRate = filter(bp_table.rows[2].cells[1].innerHTML,1),
  1085. dmgDlt = filter(bp_table.rows[3].cells[1].innerHTML,1),
  1086. caps = filter(bp_table.rows[5].cells[1].innerHTML,1),
  1087. defs = filter(bp_table.rows[6].cells[1].innerHTML,1),
  1088. deaths = filter(sm_ratio[0].innerHTML.match(/\/(.+)$/)[1],1),
  1089. dmgRec = filter(sm_ratio[1].innerHTML.match(/\/(.+)$/)[1],1),
  1090. draws = battles-(wins+losses);
  1091.  
  1092. // calculate averages and rates
  1093. var avgBat = battles/daysPassed,
  1094. avgWin = wins/battles,
  1095. avgWinPct = avgWin*100,
  1096. avgLoss = losses/battles,
  1097. avgLossPct = avgLoss*100,
  1098. avgDraws = draws/battles,
  1099. avgDrawsPct = avgDraws*100,
  1100. avgSurv = survive/battles,
  1101. avgSurvPct = avgSurv*100,
  1102. avgFrags = frags/battles,
  1103. avgDeaths = deaths/battles,
  1104. avgSpots = spotted/battles,
  1105. avgDmg = dmgDlt/battles,
  1106. avgDmgRec = dmgRec/battles,
  1107. avgCap = caps/battles,
  1108. avgDef = defs/battles,
  1109. avgTier = vehTierTotal/vehBattlesTotal;
  1110. winlossRate = wins/losses;
  1111.  
  1112. // colourize stats
  1113. var avgWinrate = colStat(avgWinPct, "winrate", 2, "pct", "" ),
  1114. avgLossrate = colStat(avgLossPct, "winrate", 2, "pct", avgDraws ),
  1115. avgSurvrate = colStat(avgSurvPct, "survrate", 2, "pct", "" ),
  1116. avgHitrate = colStat(hitRate, "hitrate", 0, "pct", "" ),
  1117. colBattles = colStat(battles, "battles", 0, "", "" ),
  1118. avgDrawrate = colStat(avgDrawsPct, "", 2, "pct", "" );
  1119.  
  1120. // Finalize WN8 - e = expected, w = weighted, n = normalized
  1121. // all steps are stored in variables for console insertion
  1122. var eFrag = vehExpFrag/vehBattlesTotal,
  1123. eDmg = vehExpDmg /vehBattlesTotal,
  1124. eSpot = vehExpSpot/vehBattlesTotal,
  1125. eDef = vehExpDef /vehBattlesTotal,
  1126. eWin = vehExpWin /vehBattlesTotal,
  1127. wFrag = avgFrags/eFrag,
  1128. wDmg = avgDmg/eDmg,
  1129. wSpot = avgSpots/eSpot,
  1130. wDef = avgDef/eDef,
  1131. wWin = avgWinPct/eWin,
  1132. nWin = Math.max( (wWin - 0.71) / (1 - 0.71) ,0),
  1133. nDmg = Math.max( (wDmg - 0.22) / (1 - 0.22) ,0),
  1134. nFrag = Math.max(Math.min(nDmg+0.2,(wFrag - 0.12) / (1 - 0.12)),0),
  1135. nSpot = Math.max(Math.min(nDmg+0.1,(wSpot - 0.38) / (1 - 0.38)),0),
  1136. nDef = Math.max(Math.min(nDmg+0.1,(wDef - 0.10) / (1 - 0.10)),0);
  1137.  
  1138. // calculate ratings
  1139. // WN8
  1140. var wn8 = (function() {
  1141. var frag = 210*nDmg*nFrag,
  1142. dmg = 980*nDmg,
  1143. spot = 155*nFrag*nSpot,
  1144. def = 75*nDef*nFrag,
  1145. win = 145*Math.min(1.8,nWin),
  1146. rating = frag+dmg+spot+def+win;
  1147. if (rating>=2900) {
  1148. pct = scale = 100;
  1149. }
  1150. else {
  1151. pct = (rating/2900)*100;
  1152. scale = Math.max(Math.min(rating*(rating*(rating*(rating*(rating*(0.00000000000000000007119*rating+0.0000000000000002334)-0.000000000006963)+0.00000002845)-0.00004558)+0.06565)-0.18,100),0);
  1153. }
  1154. return { frag: frag, dmg: dmg, spot: spot, def: def, win: win, rating: rating, pct: pct, scale: scale, ratingCol: colStat(rating,"wn8",2), scaleCol: colStat(scale,"scale_wn8",2) };
  1155. })();
  1156. // WN7 - Legacy Support
  1157. var wn7 = (function() {
  1158. var frag = avgFrags*(1240-1040/(Math.pow(Math.min(avgTier,6),0.164))),
  1159. dmg = avgDmg*530/(184*Math.exp(0.24*avgTier)+130),
  1160. spot = avgSpots*125*Math.min(avgTier,3)/3,
  1161. def = Math.min(2.2,avgDef)*100,
  1162. win = (((185/(0.17+Math.exp((avgWinPct-35)*-0.134)))-500)*0.45),
  1163. norm = -Math.abs((((5-Math.min(avgTier,5))*125)/(1+Math.exp(avgTier-Math.pow(battles/220,3/avgTier))*1.5))),
  1164. rating = frag+dmg+spot+def+win+norm;
  1165. if (rating>=2050) {
  1166. pct = scale = 100;
  1167. }
  1168. else {
  1169. pct = (rating/2050)*100;
  1170. scale = Math.max(Math.min(rating*(rating*(rating*(-0.0000000000083*rating+0.0000000287)-0.000024)+0.049)-2.7,100),0);
  1171. }
  1172. return { frag: frag, dmg: dmg, spot: spot, def: def, win: win, norm: norm, rating: rating, pct: pct, scale: scale, ratingCol: colStat(rating,"wn7",2), scaleCol: colStat(scale,"scale_wn7",2) };
  1173. })();
  1174. // efficiency - improved
  1175. var eff = (function() {
  1176. var frag = avgFrags*250,
  1177. dmg = avgDmg*(10/(avgTier+2))*(0.23+2*avgTier/100),
  1178. spot = avgSpots*150,
  1179. cap = (Math.log(avgCap+1)/Math.log(1.732))*150,
  1180. def = avgDef*150,
  1181. rating = frag+dmg+spot+cap+def;
  1182. if (rating>=2050) {
  1183. pct = scale = 100;
  1184. }
  1185. else {
  1186. pct = (rating/2050)*100;
  1187. scale = Math.max(Math.min(rating*(rating*(rating*(rating*(rating*(0.000000000000000045254*rating-0.00000000000033131)+0.00000000094164)-0.0000013227)+0.00095664)-0.2598)+13.23,100),0);;
  1188. }
  1189. return { frag: frag, dmg: dmg, spot: spot, cap: cap, def: def, rating: rating, pct: pct, scale: scale, ratingCol: colStat(rating,"eff",2), scaleCol: colStat(scale,"scale_eff",2) };
  1190. })();
  1191. // end formula calculations and variables
  1192.  
  1193. // check for missing battles and notify
  1194. colVehBattlesTotal = " ";
  1195. if (vehBattlesTotal != battles) {
  1196. profileError_div.innerHTML = locale.p69.lang;
  1197. profileError_div.style.display="inline-block";
  1198. colVehBattlesTotal = "<span class='t-dotted_minor'>API:</span> <font color='940000'>"+filter(vehBattlesTotal,2)+"</font>";
  1199. }
  1200.  
  1201. // personal data - modify data
  1202. var pTable_class = document.getElementsByClassName('t-personal-data')[0];
  1203. pTable_class.rows[0].cells[0].innerHTML = locale.p09.lang;
  1204. pTable_class.rows[1].cells[0].innerHTML = avgWinrate;
  1205. pTable_class.rows[0].cells[1].innerHTML = locale.p10.lang;
  1206. pTable_class.rows[1].cells[1].innerHTML = colBattles;
  1207. pT_avgxp_name = document.createElement('th');
  1208. pT_avgxp_name.className = "t-personal-data_ico t-personal-data_ico__exp";
  1209. pT_avgxp_name.innerHTML = locale.p11.lang;
  1210. pTable_class.rows[0].cells[1].parentNode.insertBefore(pT_avgxp_name, pTable_class.rows[0].cells[1].nextSibling);
  1211. pT_avgxp_value = document.createElement('td');
  1212. pT_avgxp_value.className = "t-personal-data_value";
  1213. pT_avgxp_value.innerHTML = filter(avgExp,2);
  1214. pTable_class.rows[1].cells[1].parentNode.insertBefore(pT_avgxp_value, pTable_class.rows[1].cells[1].nextSibling);
  1215. pTable_class.rows[0].cells[4].innerHTML = locale.p70.lang;
  1216. pTable_class.rows[0].cells[4].className = "t-personal-data_ico t-personal-data_ico__hitrate";
  1217. pTable_class.rows[1].cells[3].innerHTML = avgHitrate;
  1218. pTable_class.rows[0].cells[5].innerHTML = locale.p71.lang;
  1219. pT_avgtier_name = document.createElement('th');
  1220. pT_avgtier_name.className = "t-personal-data_ico t-personal-data_ico__tier";
  1221. pT_avgtier_name.innerHTML = locale.p12.lang;
  1222. pTable_class.rows[0].appendChild(pT_avgtier_name);
  1223. pT_avgtier_value = document.createElement('td');
  1224. pT_avgtier_value.className = "t-personal-data_value";
  1225. pT_avgtier_value.innerHTML = avgTier.toFixed(2);
  1226. pTable_class.rows[1].appendChild(pT_avgtier_value);
  1227.  
  1228. // speedometer - win/loss ratio
  1229. var sm_body_class = document.getElementsByClassName('b-speedometer-body')[0];
  1230. sm_winrate_div = document.createElement('div');
  1231. sm_winrate_div.className = "b-speedometer";
  1232. sm_winrate_arrow = Math.min(30*(winlossRate-1),31).toFixed(4);
  1233. sm_winrate_div.innerHTML = "<div class='b-speedometer-arrow' data-deg='"+sm_winrate_arrow+"' style='transform: rotate("+sm_winrate_arrow+"deg); -webkit-transform: rotate("+sm_winrate_arrow+"deg); -ms-transform: rotate("+sm_winrate_arrow+"deg);'></div><div class='b-speedometer-round'></div><p class='b-speedometer-title'>"+locale.p13.lang+"</p><p class='b-speedometer-weight'>"+winlossRate.toFixed(2)+"</p><p class='b-speedometer-ratio'>"+filter(wins,3)+" / "+filter(losses,3)+"</p>";
  1234. sm_body_class.appendChild(sm_winrate_div);
  1235.  
  1236. // performance ratings wrapper
  1237. var ratings_div = document.createElement('div');
  1238. ratings_div.className = "b-ratings-wrpr",
  1239. ub_class = document.getElementsByClassName('b-userblock-wrpr')[0];
  1240. ub_class.parentNode.insertBefore(ratings_div, ub_class.nextSibling);
  1241. ratingsHeader_div = document.createElement('div');
  1242. ratingsHeader_div.className = "b-head-block",
  1243. ratingsHeader_div.innerHTML += "<h3>"+locale.p14.lang+"</h3>";
  1244. ratings_div.appendChild(ratingsHeader_div);
  1245. ratingsInfo_div = document.createElement('div');
  1246. ratingsInfo_div.className = "b-ratings-info",
  1247. ratings_div.appendChild(ratingsInfo_div);
  1248. ratingsInfo_table = document.createElement('table');
  1249. ratingsInfo_table.className = "t-ratings-info",
  1250. ratingsInfo_div.appendChild(ratingsInfo_table);
  1251. // inserting performance ratings
  1252. ratingsInfo_table.innerHTML = "<thead><tr><th><a href='http://wiki.wnefficiency.net/pages/WN8' target='_blank'>"+locale.p15.lang+"</a></th><th>"+locale.p30.lang+"</th><th>"+locale.p16.lang+"</th><th><a class='rating-url_nm' target='_blank' href="+nm_url+">"+locale.p17.lang+"</a></th></tr></thead><tbody><tr><td class='js-wnscript'>"+wn8.ratingCol+"</td><td>"+wn7.ratingCol+"</td><td>"+eff.ratingCol+"</td><td class='js-noobmeter'>"+locale.p18.lang+"</td></tr></tbody>";
  1253.  
  1254. // create and populate performance ratings calcs table
  1255. var rTable_div = document.createElement('div');
  1256. rTable_div.className = "ratings-table";
  1257. ratings_div.appendChild(rTable_div);
  1258. rTable_div.innerHTML = "<h3>"+locale.p19.lang+"</h3>";
  1259. rTable = document.createElement('table');
  1260. rTable.className = "t-table-ratings";
  1261. rTable_div.appendChild(rTable);
  1262. rTHead = document.createElement('thead');
  1263. rTHead.innerHTML = "<tr><th>"+locale.p20.lang+"</th><th>"+locale.p21.lang+"</th><th>"+locale.p22.lang+"</th><th>"+locale.p23.lang+"</th><th>"+locale.p24.lang+"</th><th>"+locale.p25.lang+"</th><th>"+locale.p26.lang+"</th><th>"+locale.p27.lang+"</th><th>"+locale.p28.lang+"</th></tr>";
  1264. rTable.appendChild(rTHead);
  1265. rTBody = document.createElement('tbody');
  1266. rTable.appendChild(rTBody);
  1267. ratingsArr = [
  1268. // Formula RatingPct Localized Total ScaleColored Frag Dmg Spot Cap Def Win
  1269. ["wn8", wn8.pct, locale.p29.lang, wn8.ratingCol, wn8.scaleCol, wn8.frag.toFixed(2), wn8.dmg.toFixed(2), wn8.spot.toFixed(2), "–", wn8.def.toFixed(2), wn8.win.toFixed(2) ],
  1270. ["wn7", wn7.pct, locale.p30.lang, wn7.ratingCol, wn7.scaleCol, wn7.frag.toFixed(2), wn7.dmg.toFixed(2), wn7.spot.toFixed(2), "–", wn7.def.toFixed(2), wn7.win.toFixed(2) ],
  1271. ["eff", eff.pct, locale.p31.lang, eff.ratingCol, eff.scaleCol, eff.frag.toFixed(2), eff.dmg.toFixed(2), eff.spot.toFixed(2), eff.cap.toFixed(2), eff.def.toFixed(2), "–" ]
  1272. ];
  1273. for (i=0; i<ratingsArr.length; ++i) {
  1274. rRow = document.createElement('tr');
  1275. rTBody.appendChild(rRow);
  1276. for (j=2; j<ratingsArr[i].length; ++j) {
  1277. rCell = document.createElement('td');
  1278. rCell.className = "td-center";
  1279. rCell.innerHTML = ratingsArr[i][j];
  1280. rRow.appendChild(rCell);
  1281. }
  1282. rmRow = document.createElement('tr');
  1283. rmRow.innerHTML = "<td class='td-rating-meter' colspan='9'><div class='rating-meter rating-meter_"+ratingsArr[i][0]+"'><div class='rating-meter-dail_line' style='width:"+ratingsArr[i][1]+"%;'><div class='rating-meter-marker'></div></div></div></td>";
  1284. rTBody.appendChild(rmRow);
  1285. }
  1286.  
  1287. // link to WN thread
  1288. ratings_div.innerHTML += "<div class='wnelink'><a class ='b-orange-arrow wnelink_info' target='_blank' href='http://wiki.wnefficiency.net/pages/WN_Efficiency_Wiki'>"+locale.p32.lang+"</a></div>";
  1289.  
  1290. // end performance ratings wrapper
  1291.  
  1292. // statistics wrapper
  1293. var statistics_div = document.getElementsByClassName('b-result-classes')[0].parentNode;
  1294. statistics_div.className = "b-statistics-wrpr";
  1295. ratings_div.parentNode.insertBefore(statistics_div, ratings_div.nextSibling);
  1296.  
  1297. // remove the old tables ( overall results and battle performance )
  1298. mb_table.innerHTML = "<tbody></tbody>";
  1299. or_table.innerHTML = "<tbody></tbody>";
  1300. bp_table.innerHTML = "<tbody></tbody>";
  1301.  
  1302. // populating the tables
  1303. var mb_table_cn = mb_table.firstElementChild,
  1304. or_table_cn = or_table.firstElementChild,
  1305. bp_table_cn = bp_table.firstElementChild;
  1306. insertNewTr(mb_table_cn, "<img src='/static/3.17.1.2/common/img/classes/class-ace.png'>", locale.p33.lang, vehBadgesObj[4].c+"<span>("+vehBadgesObj[4].p+"%)</span>"),
  1307. insertNewTr(mb_table_cn, "<img src='/static/3.17.1.2/common/img/classes/class-1.png'>", locale.p34.lang, vehBadgesObj[3].c+"<span>("+vehBadgesObj[3].p+"%)</span>"),
  1308. insertNewTr(mb_table_cn, "<img src='/static/3.17.1.2/common/img/classes/class-2.png'>", locale.p35.lang, vehBadgesObj[2].c+"<span>("+vehBadgesObj[2].p+"%)</span>"),
  1309. insertNewTr(mb_table_cn, "<img src='/static/3.17.1.2/common/img/classes/class-3.png'>", locale.p36.lang, vehBadgesObj[1].c+"<span>("+vehBadgesObj[1].p+"%)</span>"),
  1310. insertNewTr(mb_table_cn, "<img src='"+uri_badges_class_none+"'>", locale.p37.lang, vehBadgesObj[0].c+"<span>("+vehBadgesObj[0].p+"%)</span>"),
  1311. insertNewTr(mb_table_cn, "<img src='"+uri_badges_class_total+"'>", locale.p38.lang, vehBadgesObj[5].c+"<span>("+vehBadgesObj[5].p+"%)</span>"),
  1312. insertNewTr(or_table_cn, locale.p39.lang, filter(battles,2), colVehBattlesTotal ),
  1313. insertNewTr(or_table_cn, locale.p40.lang, filter(wins,2), "("+avgWinrate+")" ),
  1314. insertNewTr(or_table_cn, locale.p41.lang, filter(losses,2), "("+avgLossrate+")" ),
  1315. insertNewTr(or_table_cn, locale.p42.lang, filter(draws,2), "("+avgDrawrate+")" ),
  1316. insertNewTr(or_table_cn, locale.p43.lang, filter(survive,2), "("+avgSurvrate+")" ),
  1317. insertNewTr(or_table_cn, locale.p44.lang, "", avgBat.toFixed(2) ),
  1318. insertNewTr(or_table_cn, locale.p45.lang, "", filter(exp,2) ),
  1319. insertNewTr(or_table_cn, locale.p46.lang, "", filter(avgExp,2) ),
  1320. insertNewTr(or_table_cn, locale.p47.lang, "", filter(maxExp,2) ),
  1321. insertNewTr(bp_table_cn, locale.p48.lang, filter(frags,2), avgFrags.toFixed(2) ),
  1322. insertNewTr(bp_table_cn, locale.p49.lang, filter(deaths,2), avgDeaths.toFixed(2)),
  1323. insertNewTr(bp_table_cn, locale.p50.lang, filter(spotted,2), avgSpots.toFixed(2) ),
  1324. insertNewTr(bp_table_cn, locale.p51.lang, "", avgHitrate ),
  1325. insertNewTr(bp_table_cn, locale.p52.lang, filter(dmgDlt,2), avgDmg.toFixed(2) ),
  1326. insertNewTr(bp_table_cn, locale.p53.lang, filter(dmgRec,2), avgDmgRec.toFixed(2)),
  1327. insertNewTr(bp_table_cn, locale.p54.lang, filter(caps,2), avgCap.toFixed(2) ),
  1328. insertNewTr(bp_table_cn, locale.p55.lang, filter(defs,2), avgDef.toFixed(2) ),
  1329. insertNewTr(bp_table_cn, locale.p56.lang, "", avgTier.toFixed(2) );
  1330.  
  1331. // cake diagrams - adding tier diagram
  1332. var diagramsSector_class = document.getElementsByClassName('b-diagrams-sector')[0];
  1333. diagramsTier_div = document.createElement('div'),
  1334. diagramsTier_div.className = "b-diagram-block b-diagram-tiers js-diagram-block";
  1335. diagramsTier_div.innerHTML = "<h3>"+locale.p57.lang+"</h3><div class='b-diagram-wrpr'><div class='b-diagram' id='holder-mechanism-tier'></div><div class='b-diagram-round js-diagram-round'><span class='b-diagram-round_title'></span><span class='b-diagram-round_value js-result'>"+vehAmount+"</span></div></div>";
  1336. diagramsSector_class.firstElementChild.parentNode.insertBefore(diagramsTier_div, diagramsSector_class.firstElementChild.nextSibling);
  1337. diagramsTier_table = document.createElement('table'),
  1338. diagramsTier_table.className = "t-dotted t-dotted__diagram js-diagram-mechanism-legend";
  1339. diagramsTier_table.innerHTML = "<tbody></tbody>";
  1340. diagramsTier_div.appendChild(diagramsTier_table);
  1341. diagramsTier_td = 0;
  1342. diagramsTierColorArr = ["496877","2b591f","831818","303766","814f07","1A775F","B0D23A","763D46","936C19","471952"];
  1343. for (var i in vehTiersObj) {
  1344. diagramsTierColor = diagramsTierColorArr[diagramsTier_td];
  1345. diagramsTier_td += 1;
  1346. if (vehTiersObj[i].c !== 0) {
  1347. battleRate = (vehTiersObj[i].b/battles*100).toFixed(2);
  1348. tierRate = (vehTiersObj[i].c/vehAmount*100).toFixed(2);
  1349. diagramsTier_table.firstElementChild.innerHTML += "<tr><td class='t-dotted_diagram-first'><span class='t-dotted_diagram-bg'></span></td><td><span class='t-dotted_diagram-bg'><span class='t-dotted_diagram-info'><span class='t-diagram_battle'>"+filter(vehTiersObj[i].b,3)+"</span><span class='t-dotted_diagram-percent'>(<span class=''>"+battleRate+"%</span>)</span><span class='t-diagram_tiers js-results'>"+vehTiersObj[i].c+"</span><span class='t-dotted_diagram-percent'>(<span class='js-value'>"+tierRate+"%</span>)</span></span><span class='b-diagram-ico b-diagram-ico_tier b-diagram-ico_tier-"+diagramsTier_td+"'>"+locale.p58.lang+" "+diagramsTier_td+"</span></span></td><td class='t-dotted_diagram-last'><span class='t-dotted_diagram-bg'><span class='js-colors'>#"+diagramsTierColor+"</span></span></td></tr>";
  1350. }
  1351. }
  1352. diagramsSector_class.firstElementChild.innerHTML += "<div class='b-diagram-total'><h3>"+locale.p59.lang+" "+vehAmount+"</h3></div>";
  1353. // fix for cake diagram in chrome
  1354. if (chrome) {
  1355. $('.js-diagram-block').each(function() { var items = [], values = [], labels = [], colors = [], results = [], legend, result, holder; holder = $('.b-diagram', this).attr('id'); $('.js-diagram-mechanism-legend tr', this).each(function () { items.push($(this)); values.push(parseInt($('.js-value', this).text(), 10)); labels.push($('.js-label', this).text()); colors.push($('.js-colors', this).text()); results.push($('.js-results', this).text()); legend = $('.js-diagram-mechanism-legend'); result = $('#' + holder).next().find('.js-result'); }); Raphael(holder, 630, 630).pieChart(65, 65.5, 53.5, items, values, colors, results, legend, result); });
  1356. }
  1357.  
  1358. // achievements wrapper
  1359. var medalHeader_class = document.getElementsByClassName('js-achievements-header')[0];
  1360. medalEmpty_class = document.getElementsByClassName('b-profile-item-empty')[0];
  1361. medalToggle_class = document.getElementsByClassName('js-achivements-showhide')[0];
  1362. medalShort_class = document.getElementsByClassName('js-short-achievements')[0];
  1363. medalFull_class = document.getElementsByClassName('js-full-achievements')[0];
  1364. medal_div = document.createElement('div');
  1365. medal_div.className = "b-achievements-wrpr";
  1366. medalHeader_div = document.createElement('div');
  1367. medalHeader_div.className = "b-head-block";
  1368. medalHeader_div.appendChild(medalHeader_class);
  1369. medal_div.appendChild(medalHeader_div);
  1370. if (medalEmpty_class !== undefined) { medal_div.appendChild(medalEmpty_class); }
  1371. medal_div.appendChild(medalToggle_class);
  1372. medal_div.appendChild(medalShort_class);
  1373. medal_div.appendChild(medalFull_class);
  1374. diagramsSector_class.parentNode.insertBefore(medal_div, diagramsSector_class.nextSibling);
  1375.  
  1376. // vehicles wrapper
  1377. var vehTable_class = document.getElementsByClassName('t-profile t-profile__vehicle')[0];
  1378. vehicles_div = document.createElement('div');
  1379. vehicles_div.className = "b-vehicles-wrpr";
  1380. vehicles_h3_class = vehTable_class.previousElementSibling;
  1381. vehicles_h3_class.className = "b-profile-ratings_title";
  1382. vehiclesHeader_div = document.createElement('div');
  1383. vehiclesHeader_div.className = "b-vehicles-header";
  1384. vehiclesHeader_div.appendChild(vehicles_h3_class);
  1385. vehiclesHeader_div.innerHTML += "<a class='b-orange-arrow b-profile-ratings_link' target='_blank' href='/encyclopedia/vehicles/'>"+locale.p60.lang+"</a><span class='b-profile-vehicles-tankstat'><a class='b-orange-arrow b-profile-ratings_link b-profile-vehicles-tankstat_link' target='_blank' href='http://www.noobmeter.com/tankStats/"+nm_srv+"'>"+locale.p61.lang+"</a></span>";
  1386. vehicles_div.appendChild(vehiclesHeader_div);
  1387. vehTable_class.parentNode.insertBefore(vehicles_div, vehTable_class);
  1388. vehicles_div.appendChild(vehTable_class);
  1389. // add a premium tanks table to the vehicle table
  1390. if (premArr.length === 0) {
  1391. premHBody = document.createElement('tbody');
  1392. premHBody.innerHTML = "<tr class='t-profile_tankstype t-profile_tankstype-prem t-profile_tankstype__empty'><td width='388' class='t-profile_head'><span class='b-tankstype-ico b-tankstype-ico__prem'></span><span class='b-tankstype-text'>"+locale.p62.lang+" </span></td><td class='t-profile_right'>&ndash;</td><td class='t-profile_center'>&ndash;</td><td class='t-profile_center'>&ndash;</td><td class='t-profile_dropdown-ico'><!-- empty --></td></tr>";
  1393. vehTable_class.appendChild(premHBody);
  1394. }
  1395. else {
  1396. premHBody = document.createElement('tbody');
  1397. premHBody.className = "tablesorter-no-sort";
  1398. premHBody.innerHTML = "<tr class='t-profile_tankstype t-profile_tankstype-prem js-table-dropdown-link'><td width='388' class='t-profile_head'><span class='b-tankstype-ico b-tankstype-ico__prem'></span><span class='b-tankstype-text'>"+locale.p62.lang+" <span class='b-armory-col'>"+premArr.length+"</span></span></td><td class='t-profile_right'>"+filter(premBattlesTotal,3)+"</td><td class='t-profile_center'>"+filter(premWinsTotal,3)+" - "+colStat((premWinsTotal/premBattlesTotal)*100, "winrate", 0, "pct")+"</td><td class='t-profile_center'>"+premBadgesTotal+"</td><td class='t-profile_dropdown-ico'><a title='Show/hide vehicles' class='t-profile_dropdown-link' href=''></a></td></tr>";
  1399. vehTable_class.appendChild(premHBody);
  1400. premTBody = document.createElement('tbody');
  1401. premTBody.className = "sortable";
  1402. premTBody.style.display="none";
  1403. vehTable_class.appendChild(premTBody);
  1404. for (i=0; i<premArr.length; ++i) {
  1405. premTBody.appendChild(premArr[i][0]);
  1406. premTBody.appendChild(premArr[i][1]);
  1407. }
  1408. }
  1409. // add a tier 10 table to the vehicle table
  1410. if (tenArr.length === 0) {
  1411. tenHBody = document.createElement('tbody');
  1412. tenHBody.innerHTML = "<tr class='t-profile_tankstype t-profile_tankstype__empty'><td width='388' class='t-profile_head'><span class='b-tankstype-ico b-tankstype-ico__ten'>✖</span><span class='b-tankstype-text'>"+locale.p68.lang+" </span></td><td class='t-profile_right'>&ndash;</td><td class='t-profile_center'>&ndash;</td><td class='t-profile_center'>&ndash;</td><td class='t-profile_dropdown-ico'><!-- empty --></td></tr>";
  1413. vehTable_class.appendChild(tenHBody);
  1414. }
  1415. else {
  1416. tenHBody = document.createElement('tbody');
  1417. tenHBody.className = "tablesorter-no-sort";
  1418. tenHBody.innerHTML = "<tr class='t-profile_tankstype js-table-dropdown-link'><td width='388' class='t-profile_head'><span class='b-tankstype-ico b-tankstype-ico__ten'>✖</span><span class='b-tankstype-text'>"+locale.p68.lang+" <span class='b-armory-col'>"+tenArr.length+"</span></span></td><td class='t-profile_right'>"+filter(tenBattlesTotal,3)+"</td><td class='t-profile_center'>"+filter(tenWinsTotal,3)+" - "+colStat((tenWinsTotal/tenBattlesTotal)*100, "winrate", 0, "pct")+"</td><td class='t-profile_center'>"+tenBadgesTotal+"</td><td class='t-profile_dropdown-ico'><a title='Show/hide vehicles' class='t-profile_dropdown-link' href=''></a></td></tr>";
  1419. vehTable_class.appendChild(tenHBody);
  1420. tenTBody = document.createElement('tbody');
  1421. tenTBody.className = "sortable";
  1422. tenTBody.style.display="none";
  1423. vehTable_class.appendChild(tenTBody);
  1424. for (i=0; i<tenArr.length; ++i) {
  1425. tenTBody.appendChild(tenArr[i][0]);
  1426. tenTBody.appendChild(tenArr[i][1]);
  1427. }
  1428. }
  1429. // end vehicles wrapper
  1430.  
  1431. // debugging to browser console
  1432. console.info("Browser Info: ", navigator.appCodeName+" - "+navigator.appName+" - "+navigator.userAgent);
  1433. console.info("WN8 Calculation:");
  1434. console.info("Expected:\n", "eFrag: ", eFrag, "- eDmg: ", eDmg, "- eSpot: ", eSpot, "- eDef: ", eDef, "- eWin: ", eWin );
  1435. console.info("Actual:\n", "aFrag: ", avgFrags, "- aDmg: ", avgDmg, "- aSpot: ", avgSpots, "- aDef: ", avgDef, "- aWin: ", avgWinPct );
  1436. console.info("Weighted:\n", "wFrag: ", wFrag, "- wDmg: ", wDmg, "- wSpot: ", wSpot, "- wDef: ", wDef, "- wWin: ", wWin );
  1437. console.info("Normalized:\n", "nFrag: ", nFrag, "- nDmg: ", nDmg, "- nSpot: ", nSpot, "- nDef: ", nDef, "- nWin: ", nWin );
  1438. console.info("Vehicle Info:\n", vehListObj);
  1439. console.info("Tier Info:\n", vehTiersObj);
  1440.  
  1441. // button for saving stats to clipboard
  1442. var ratingsClipboard = locale.p72.lang+" "+nick+": \n"+locale.p73.lang+" "+battles+" \nWR: "+avgWinPct.toFixed(2)+" \nWN8: "+wn8.rating.toFixed(2)+" \nWN7: "+wn7.rating.toFixed(2)+" \nEff: "+eff.rating.toFixed(2);
  1443. console.info(ratingsClipboard);
  1444. ratingsClipboard_div = document.createElement('div');
  1445. ratingsClipboard_div.className = "b-ratingsClip";
  1446. profileHead_div.insertBefore(ratingsClipboard_div, profileHead_div.firstElementChild.nextSibling);
  1447. ratingsClipboard_div.innerHTML += "<div class='ratingsClip-holder js-noobmeter' style='display:none;'>"+ratingsClipboard+"</div><div class='ratingsClip-holder' style='display:none;'>"+locale.p64.lang+"</div><div class='b-ratingsButton' onclick='copyClipboard()'>"+locale.p63.lang+"</div>";
  1448.  
  1449. // noobmeter retrieval
  1450. if (nm_srv !== null) {
  1451. // retrieve and process info
  1452. var nmapi_url = nm_host+"/simpleplayerprapi/"+nm_srv+"/"+nick+"/"+userid+"/"+sid;
  1453. gRecProps = [
  1454. { url: nmapi_url, handler: nmHnd, onerror: nmHnd_error, nav: true }
  1455. ];
  1456.  
  1457. // delayed insertion
  1458. for (i=0; i<gRecProps.length; ++i) {
  1459. var doc = gRecProps[i];
  1460. if (doc.nav) gRec(doc);
  1461. }
  1462. }
  1463. }
  1464. else {
  1465. profileName_class = document.getElementsByClassName('b-profile-name')[0];
  1466. profileName_class.innerHTML += "<div style='width: 950px; top: -15px; text-align: center; position: absolute;'>"+locale.p65.lang+"</div>";
  1467. }
  1468. // end speed_table_battles
  1469. }
  1470. // end wg_accounts
  1471.  
  1472. // matches url with clan page
  1473. else if (wg_clans !== null) {
  1474. // style variables
  1475. var box_background = "background: url('/static/3.13.0.2.1/common/css/scss/layout/img/ui-bg-top.jpg'); border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 0 38px 1px rgba(0, 0, 0, 0.3) inset, 0 0 23px 1px rgba(255, 255, 255, 0.02), 0 0 5px 1px rgba(0, 0, 0, 0.5) inset;";
  1476. input_background = "background: rgba(0, 0, 0, 0.09); border: 1px solid #000000; box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.15) inset, 0 0 38px 1px rgba(0, 0, 0, 0.3) inset, 0 0 23px 1px rgba(255, 255, 255, 0.02), 0 0 5px 1px rgba(0, 0, 0, 0.5) inset; color: #606061;";
  1477. // style contents
  1478. var style = document.createElement('style');
  1479. style.className = "wotstatscript";
  1480. style.type ="text/css";
  1481. style.innerHTML
  1482. // global rules
  1483. = "p {margin: 0;}"
  1484. // l-page fix page slowdown
  1485. + ".l-page {background-position: center 0 !important;}"
  1486. // l-content width
  1487. + ".l-content-indent, .reg-RUS .l-content-indent, .reg-KR .l-content-indent {padding: 0;}"
  1488. + ".l-content {margin: 0 22px 25px; width: 955px;}"
  1489. // b-clan-wrapper
  1490. + ".b-clan-wrapper {overflow: auto;}"
  1491. // b-clan-header rules
  1492. + ".b-background-clan-profile {left: -22px; top: 0;}"
  1493. + ".b-background-clan-profile, .b-background-clan-profile img {height: auto; margin-bottom: -2px; width: 1000px;}"
  1494. + ".b-clan-header {overflow: auto; width: 745px;}"
  1495. + ".b-scriptlink {"+input_background+" position: absolute; right: 0px; text-align: center; top: -1px; padding: 7px 0 6px; width: 199px;}"
  1496. + ".reg-KR .b-scriptlink {line-height: 133%;}"
  1497. + ".b-clan-profile {padding: 15px 0 0;}"
  1498. + ".b-clan-profile .b-wrap {padding: 0;}"
  1499. + ".b-clan-victory-points {margin: 5px 20px 0 0;}"
  1500. + ".b-text-info_motto {font-size: 16px; margin: 0;}"
  1501. // b-clan-desc rules
  1502. + ".b-clan-desc {float: left; margin: 15px 0 0; min-height: 370px; width: 745px;}"
  1503. // b-clan-stat rules
  1504. + ".b-clan-stat {border-top: 1px solid #010101; box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.05) inset; padding: 5px 0 5px;}"
  1505. + ".b-clan-stat li {padding: 1px 3px 1px 19px;}"
  1506. + ".b-clan-stat li.b-clan-stat-header {background: url('/static/3.13.0.2.1/common/css/scss/context-menu/img/active-point.png') repeat-y; font-weight: bold; margin: 5px 2px 0; padding: 2px 3px 2px 19px;}"
  1507. // b-clan-buttons rules
  1508. + ".l-content > form {height: 100%; position: fixed; top: 0;}"
  1509. + ".b-clan-buttons {bottom: 0; padding: 10px 0; position: absolute; text-align: center; width: 953px;}"
  1510. + ".b-clan-buttons {"+box_background+"}"
  1511. + ".b-clan-buttons .b-button {margin-bottom: 0;}"
  1512. // sidebar rules
  1513. + ".l-sidebar {margin: 0; position: absolute; right: 0; top: 25px; width: auto;}"
  1514. + ".b-context-menu {background: url("+uri_context_menu+") repeat-y; border-right: 1px solid black; margin: 0; width: 200px;}"
  1515. + ".b-context-menu_wrapper {padding: 10px 0 0;}"
  1516. + ".b-context-menu_btn {margin: 10px 0 0;}"
  1517. + ".b-sidebar-widget {margin: 0; position: absolute; right: -228px; top: -26px; width: 203px;}"
  1518. + ".b-sidebar-widget h2 { color: #FFFFFF; font: 18px/22px 'WarHeliosCondCBold','Arial Narrow',arial,sans-serif; margin: 0 0 11px; text-transform: uppercase;}"
  1519. // footer rules
  1520. + ".b-footer, .reg-RUS .b-footer {height: 285px; margin: 0 auto; position: static;}"
  1521. + ".reg-KR .b-footer {background-size: 100% 100%; height: 360px; margin-top: -2px;}"
  1522. + "";
  1523. document.head.appendChild(style);
  1524. // end style
  1525.  
  1526. // clan wrapper
  1527. var clanWrpr_div = document.createElement('div');
  1528. clanWrpr_div.className = "b-clan-wrapper",
  1529. background_class = document.getElementsByClassName('b-background-clan-profile')[0];
  1530. background_class.parentNode.insertBefore(clanWrpr_div, background_class.nextSibling);
  1531. clanHead_div = document.createElement('div');
  1532. clanHead_div.className = "b-clan-header",
  1533. clanHead_div.innerHTML += scriptlink;
  1534. infoWrapper_class = document.getElementsByClassName('b-wrap')[0];
  1535. clanHead_div.appendChild(infoWrapper_class);
  1536. clanWrpr_div.appendChild(clanHead_div);
  1537.  
  1538. // clan description
  1539. clanDesc_div = document.getElementsByClassName('b-clan-profile')[0].children[2];
  1540. clanDesc_div.className = "b-clan-desc";
  1541. clanWrpr_div.appendChild(clanDesc_div);
  1542.  
  1543. // move sidebar
  1544. var sidebar_class = document.getElementsByClassName('l-sidebar')[0];
  1545. clanWrpr_div.appendChild(sidebar_class);
  1546.  
  1547. // clan statistic links
  1548. var clan_id = document.location.href.match(/\/(\d+)/)[1];
  1549. clan_name = document.location.href.match(/\-([\w.+\-]+)/)[1];
  1550. sidebar_class = document.getElementsByClassName('b-context-menu_wrapper')[0];
  1551. clanStat_div = document.createElement('ul');
  1552. clanStat_div.className = "b-context-menu-list b-clan-stat",
  1553. wl_clan = nm_clan = mws_clan = wotcs_clan = replays = "";
  1554. if (wl_srv !== null) {
  1555. wl_clan = "<li><a target='_blank' href='http://wotlabs.net/"+wl_srv+"/clan/"+clan_name+"'>WoTLabs</a></li>";
  1556. }
  1557. if (nm_srv !== null) {
  1558. nm_clan = "<li><a target='_blank' href='"+nm_host+"/clan/"+nm_srv+"/"+clan_name+"/"+clan_id+"'>Noobmeter</a></li>";
  1559. wotcs_clan = "<li><a target='_blank' href='http://wotcs.com/clan.php?wid="+clan_id+"'>WoT-CS</a></li>";
  1560. }
  1561. if (mws_srv !== null) {
  1562. mws_clan = "<li><a target='_blank' href='http://mywotstats.com/clan/view/"+clan_id+"/"+mws_srv+"'>MyWOTStats</a></li>";
  1563. }
  1564. if (wr_srv !== null) {
  1565. replays = "<li><a target='_blank' href='http://wotreplays."+wr_srv+"/clan/"+clan_name+"'>WoTReplays</a></li>";
  1566. }
  1567. clanStat = wl_clan+nm_clan+mws_clan+wotcs_clan+replays;
  1568. clanStat_div.innerHTML = "<li class='b-clan-stat-header'>"+locale.c01.lang+"</li>"+clanStat;
  1569. sidebar_class.appendChild(clanStat_div);
  1570. }
  1571. // end wg_clans
  1572.  
  1573. // helper functions
  1574. // filter
  1575. function filter(input, type) {
  1576. var a = input.toString();
  1577. switch(type) {
  1578. case (1):
  1579. a = parseFloat(a.replace(/[^\d]/g,""));
  1580. if (isNaN(a)) {return 0;} else {return a;} // string into integer
  1581. case (2):
  1582. return (a.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1 ")); // output with spaces
  1583. case (3):
  1584. return (a.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,")); // output with commas
  1585. case (4):
  1586. return (a.replace(/[^\w]/g,"")); // remove all symbols
  1587. default:
  1588. console.log("error filtering: ", input);
  1589. return input;
  1590. }
  1591. }
  1592.  
  1593. // colouring
  1594. function colStat(input, type, dec, pct, alt) {
  1595. color = "";
  1596. output = input.toFixed(dec);
  1597. if (type == "battles") {
  1598. output = filter(input,2);
  1599. }
  1600. if (pct == "pct") {
  1601. output += "%";
  1602. }
  1603. if (alt || alt == "0") {
  1604. input = 100-(input+(alt*100));
  1605. }
  1606. if (type !== "") {
  1607. for (var i=0; i<colStatArr.length; ++i) {
  1608. if (input >= colStatArr[i][type]) {
  1609. var color = colStatArr[i].color;
  1610. break;
  1611. }
  1612. }
  1613. }
  1614. if (type == "wn8") {
  1615. background_div.style.background = "#"+color;
  1616. }
  1617. return "<font color='"+color+"'>"+output+"</font>";
  1618. }
  1619.  
  1620. // quick insertion of row into tables
  1621. function insertNewTr(table_parent, text_td, val_td, val2_td) {
  1622. var trNew = document.createElement('tr');
  1623.  
  1624. var tdNew_text = document.createElement('td');
  1625. tdNew_text.innerHTML = text_td;
  1626. tdNew_text.className = "t-dotted_minor";
  1627.  
  1628. var tdNew_value = document.createElement('td');
  1629. tdNew_value.innerHTML = val_td;
  1630. tdNew_value.className = "t-dotted_value";
  1631.  
  1632. table_parent.appendChild(trNew);
  1633. trNew.appendChild(tdNew_text);
  1634. trNew.appendChild(tdNew_value);
  1635.  
  1636. if (table_parent == mb_table_cn) {
  1637. tdNew_text.className = "t-dotted_class-ico t-dotted_minor__middle";
  1638. tdNew_value.className = "t-dotted_minor t-dotted_minor__middle";
  1639. }
  1640.  
  1641. if (val2_td !== "") {
  1642. var tdNew_value2 = document.createElement('td');
  1643. tdNew_value2.innerHTML = val2_td;
  1644. tdNew_value2.className = "t-dotted_value";
  1645. if (table_parent == mb_table_cn) {
  1646. tdNew_value2.className = "t-dotted_value t-dotted_minor__middle";
  1647. }
  1648. trNew.appendChild(tdNew_value2);
  1649. }
  1650.  
  1651. return trNew;
  1652. }
  1653. // end helper functions
  1654.  
  1655. // clan handler
  1656. function clanHnd() {
  1657. var cc_class = document.getElementById('js-clan-block-container');
  1658. cc_classCheckSeq = 0;
  1659. cc_classChecker = setInterval(function() {
  1660. cc_classCheckSeq += 1;
  1661. ci_class = document.getElementById('js-profile-clan');
  1662. ct_class = document.getElementById('js-profile-clan-table');
  1663. vp_class = document.getElementsByClassName('b-victory-points')[0];
  1664. pn_class = document.getElementsByClassName('js-profile-name')[0];
  1665. if (ci_class !== null && ct_class == null) {
  1666. // clan info
  1667. cl_class = ci_class.getElementsByTagName('a')[1];
  1668. clan_id = cl_class.getAttribute('href').match(/\/(\d+)/)[1];
  1669. clan_name = cl_class.getElementsByTagName('span')[0].innerHTML.match(/[\w.+\-]+/)[0];
  1670.  
  1671. // move victory points
  1672. if (vp_class) {
  1673. pn_class.appendChild(vp_class);
  1674. vp_class.style.display="inline-block";
  1675. }
  1676.  
  1677. // clan statistic links
  1678. wl_clan = nm_clan = wn_clan = mws_clan = wotcs_clan = replays = "";
  1679. if (wl_srv !== null) {
  1680. wl_clan = "<td><a target='_blank' href='http://wotlabs.net/"+wl_srv+"/clan/"+clan_name+"'>WoTLabs</a></td>";
  1681. }
  1682. if (nm_srv !== null) {
  1683. nm_clan = "<td><a target='_blank' href='"+nm_host+"/clan/"+nm_srv+"/"+clan_name+"/"+clan_id+"'>Noobmeter</a></td>";
  1684. wotcs_clan = "<td><a target='_blank' href='http://wotcs.com/clan.php?wid="+clan_id+"'>WoT-CS</a></td>";
  1685. }
  1686. if (wn_srv !== null) {
  1687. wn_clan = "<td><a target='_blank' href='http://wot-news.com/index.php/stat/clanstat/"+wn_srv+"/"+clan_id+"/'>Wot-news</a></td>";
  1688. }
  1689. if (mws_srv !== null) {
  1690. mws_clan = "<td><a target='_blank' href='http://mywotstats.com/clan/view/"+clan_id+"/"+mws_srv+"'>MyWOTStats</a></td>";
  1691. }
  1692. if (wr_srv !== null) {
  1693. replays = "<td class='statname'>"+locale.p67.lang+"</td><td><a target='_blank' href='http://wotreplays."+wr_srv+"/clan/"+clan_name+"'>WoTReplays</a></td>";
  1694. }
  1695. clanstat = "<tr><td class='statname'>"+locale.p66.lang+"</td>"+wl_clan+nm_clan+wn_clan+"</tr><tr><td></td>"+mws_clan+wotcs_clan+"</tr><tr>"+replays+"</tr>";
  1696. cc_class.innerHTML += "<table id='js-profile-clan-table'>"+clanstat+"</table>";
  1697. profileName_class.parentNode.insertBefore(cc_class, profileName_class.nextSibling);
  1698. clearInterval(cc_classChecker);
  1699. }
  1700. else if (cc_classCheckSeq == 5 || ct_class !== null) {
  1701. clearInterval(cc_classChecker);
  1702. }
  1703. }, 2500);
  1704. }
  1705.  
  1706. // noobmeter handler
  1707. function nmHnd(response) {
  1708. if (response.statusText == "OK") {
  1709. var nmpr = parseFloat(response.responseText);
  1710. if (isNaN(nmpr)) {
  1711. var nm_fmt = "No Rating";
  1712. }
  1713. else {
  1714. var nm_fmt = colStat(nmpr,"nm",2);
  1715. }
  1716. nmHnd_insert(nm_fmt, nmpr);
  1717. }
  1718. else {
  1719. nmHnd_error();
  1720. }
  1721. }
  1722. function nmHnd_error() {
  1723. nmHnd_insert("No Rating");
  1724. console.log("error retrieving NoobMeter data");
  1725. return null;
  1726. }
  1727. function nmHnd_insert(nm_fmt, nmpr) {
  1728. ratingsInfo_div = document.getElementsByClassName('js-noobmeter')[1];
  1729. ratingsClip_div = document.getElementsByClassName('js-noobmeter')[0];
  1730. ratingsInfo_div.innerHTML = nm_fmt;
  1731. ratingsClip_div.innerHTML += " NM: "+nmpr.toFixed(2);
  1732. }
  1733. // end noobmeter handler
  1734.  
  1735. // retrieval function
  1736. function gRec(doc) {
  1737. var resp;
  1738. GM_xmlhttpRequest({
  1739. method: "GET",
  1740. url: doc.url,
  1741. headers: {
  1742. "Accept": "text/xml"
  1743. },
  1744. onload: function(resp) {
  1745. if (resp.readyState == 4) {
  1746. if (resp.status == 200) {
  1747. doc.handler(resp);
  1748. }
  1749. }
  1750. },
  1751. onerror: function() {
  1752. doc.onerror();
  1753. }
  1754. });
  1755. }
  1756.  
  1757. // global functions inserted into head
  1758. // clipboard helper
  1759. function copyClipboard() {
  1760. text = document.getElementsByClassName('ratingsClip-holder')[0].innerHTML;
  1761. locale = document.getElementsByClassName('ratingsClip-holder')[1].innerHTML;
  1762. window.prompt(locale, text);
  1763. }
  1764. // end global functions
  1765. // end script