OverBuff_zhTW

中文化OverBuff

  1. // ==UserScript==
  2. // @name OverBuff_zhTW
  3. // @namespace OverBuffCht
  4. // @description 中文化OverBuff
  5. // @version 2.5
  6. // @include http*://www.overbuff.com/*
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. function ChgValue(chgObj, keyValue, replaceValue, Type){
  11. switch(Type){
  12. case 1:
  13. if (chgObj.html() == keyValue) chgObj.html(replaceValue);
  14. break;
  15. case 2:
  16. if (chgObj.html().indexOf(keyValue) >= 0) chgObj.html(chgObj.html().replace(keyValue, replaceValue));
  17. break;
  18. case 3: //中二兄弟共用技能描述
  19. if (chgObj.html() == keyValue) {
  20. chgObj.html(chgObj.parents().eq(3).attr('class').indexOf('genji') > 0 ? "龍一文字平均擊殺" : "龍魂擊平均擊殺");
  21. }
  22. break;
  23. }
  24. };
  25. $('div.label').each(function () {
  26. ChgValue($(this), "Eliminations", "平均擊殺", 1);
  27. ChgValue($(this), 'Obj Kills', '平均攻防擊殺', 1);
  28. ChgValue($(this), 'Obj Time', '平均攻防時間', 1);
  29. ChgValue($(this), 'Weapon Acc', '平均命中率', 1);
  30. ChgValue($(this), 'Damage', '平均傷害', 1);
  31. ChgValue($(this), 'Healing', '平均治療', 1);
  32. ChgValue($(this), 'Critical Hits', '平均爆頭', 1);
  33. ChgValue($(this), 'Env Kills', '平均環境擊殺', 1);
  34. ChgValue($(this), 'Deaths', '平均死亡', 1);
  35. ChgValue($(this), 'Off Assists', '平均助攻', 1);
  36. ChgValue($(this), 'Def Assists', '平均協防', 1);
  37. ChgValue($(this), 'E:D Ratio', '死亡擊殺比', 1);
  38. ChgValue($(this), 'Voting Cards', '平均得票', 1);
  39. ChgValue($(this), 'Medals', '平均得牌', 1);
  40. ChgValue($(this), 'Gold Medals', '平均金牌', 1);
  41. ChgValue($(this), 'Silver Medals', '平均銀牌', 1);
  42. ChgValue($(this), 'Bronze Medals', '平均銅牌', 1);
  43. ChgValue($(this), 'On Fire', '手感發熱', 1);
  44. ChgValue($(this), 'Time Played', '英雄遊戲時間', 1);
  45. ChgValue($(this), 'Record', '勝負場次', 1);
  46. ChgValue($(this), 'Hero Rank', '競技對戰排名', 1);
  47. ChgValue($(this), 'Quick Rank', '快速對戰排名', 1);
  48. ChgValue($(this), 'Wins', '勝場', 1);
  49. ChgValue($(this), 'Win Rate', '勝率', 1);
  50. ChgValue($(this), 'Skill Rating', '競技天梯分數', 1);
  51. ChgValue($(this), 'Hero Score', '競技對戰分數', 2);
  52. ChgValue($(this), 'Quick Score', '快速對戰分數', 2);
  53. ChgValue($(this), 'Dmg Amped', '傷害強化', 1);
  54.  
  55. //肉盾共用
  56. ChgValue($(this), 'Dmg Blocked', '平均傷害吸收', 1);
  57.  
  58. //兄弟G8共用技能描述
  59. ChgValue($(this), 'Dragon Kills', '裡面才判斷,隨便key', 3);
  60.  
  61. //路西歐
  62. ChgValue($(this), 'Sound Barriers', '平均音波屏障施放', 1);
  63.  
  64. //禪亞塔
  65. ChgValue($(this), 'Final Blows', '平均尾刀', 1);
  66. ChgValue($(this), 'Trans Healing', '平均超凡入聖治療', 1);
  67.  
  68. //辛梅塔
  69. ChgValue($(this), 'Portal Uptime', '平均傳送器運作時間', 1);
  70. ChgValue($(this), 'Portal Trips', '平均傳送', 1);
  71. ChgValue($(this), 'Shields Given', '平均護盾施放', 1);
  72. ChgValue($(this), 'Photon Kills', '平均光子槍擊殺', 1);
  73. ChgValue($(this), 'Sentry Kills', '平均哨戒塔擊殺', 1);
  74. ChgValue($(this), 'Solo Kills', '平均單人擊殺', 1);
  75.  
  76. //慈悲
  77. ChgValue($(this), 'Resurrects', '平均復活人數', 1);
  78.  
  79. //安娜
  80. ChgValue($(this), 'Scoped Acc', '平均狙擊命中率', 1);
  81. ChgValue($(this), 'Enemies Slept', '平均睡眠', 1);
  82. ChgValue($(this), 'Boost Assists', '平均奈米強化施放率', 1);
  83.  
  84. //莫伊拉
  85. ChgValue($(this), 'Beam Healing', '聚合光束平均治療量', 1);
  86. ChgValue($(this), 'Beam Kills', '聚合光束平均擊殺', 1);
  87.  
  88. //碧姬
  89. ChgValue($(this), 'Armor Given', '修復包平均治療量', 1);
  90.  
  91. //D.VA
  92. ChgValue($(this), 'Mech Recalls', '空降機甲率', 1);
  93. ChgValue($(this), 'Destruct Kills', '平均空投擊殺', 1);
  94.  
  95. //札莉亞
  96. ChgValue($(this), 'Avg Energy', '平均蓄能比', 1);
  97. ChgValue($(this), 'Power Kills', '平均能量擊殺', 1);
  98. ChgValue($(this), 'Graviton Kills', '平均引力擊殺', 1);
  99. ChgValue($(this), 'Proj Barriers', '平均護盾施放', 1);
  100.  
  101. //攔路豬
  102. ChgValue($(this), 'Self Healing', '平均自我治療量', 1);
  103. ChgValue($(this), 'Heroes Hooked', '平均鉤中', 1);
  104. ChgValue($(this), 'Hook Acc', '鐵鉤平均命中率', 1);
  105. ChgValue($(this), 'Hog Kills', '火力全開平均擊殺數', 1);
  106.  
  107. //萊茵哈特
  108. ChgValue($(this), 'Charge Kills', '衝鋒平均擊殺', 1);
  109. ChgValue($(this), 'Shatter Kills', '地裂擊平均擊殺', 1);
  110. ChgValue($(this), 'Fire Kills', '烈焰擊平均擊殺', 1);
  111.  
  112. //溫斯頓
  113. ChgValue($(this), 'Melee Kills', '特斯拉砲平均擊殺', 1);
  114. ChgValue($(this), 'Jump Kills', '噴射跳躍平均擊殺', 1);
  115. ChgValue($(this), 'Rage Kills', '野性之怒平均擊殺', 1);
  116.  
  117. //小美
  118. ChgValue($(this), 'Enemies Frozen', '平均凍結人數', 1);
  119. ChgValue($(this), 'Blizzard Kills', '暴風雪平均擊殺', 1);
  120.  
  121. //炸彈鼠
  122. ChgValue($(this), 'Enemy Traps', '平均陷阱發動', 1);
  123. ChgValue($(this), 'Tire Kills', '地獄飛輪平均擊殺', 1);
  124.  
  125. //奪命女
  126. ChgValue($(this), 'Venom Kills', '毒氣平均擊殺', 1);
  127.  
  128. //半藏
  129. ChgValue($(this), 'Scatter Kills', '裂破箭平均擊殺', 1);
  130.  
  131. //壁壘
  132. ChgValue($(this), 'Tank Kills', '坦克模式平均擊殺', 1);
  133.  
  134. //托比昂
  135. ChgValue($(this), 'Armor Packs', '平均裝甲包提供量', 1);
  136. ChgValue($(this), 'Weapon Kills', '平均武器擊殺', 1);
  137. ChgValue($(this), 'Turret Kills', '平均砲塔擊殺', 1);
  138. ChgValue($(this), 'Molten Kills', '爐心超載平均擊殺', 1);
  139.  
  140. //法拉
  141. ChgValue($(this), 'Direct Hits', '平均直接命中率', 1);
  142. ChgValue($(this), 'Barrage Kills', '火箭彈幕平均擊殺', 1);
  143.  
  144. //源氏
  145. ChgValue($(this), 'Dmg Reflected', '平均反彈傷害', 1);
  146.  
  147. //死神
  148. ChgValue($(this), 'Souls Gained', '平均靈魂回收', 1);
  149. ChgValue($(this), 'Blossom Kills', '死亡綻放平均擊殺', 1);
  150.  
  151. //閃光
  152. ChgValue($(this), 'Bombs Stuck', '平均脈衝炸彈黏中', 1);
  153. ChgValue($(this), 'Bomb Kills', '脈衝炸彈平均擊殺', 1);
  154.  
  155. //76
  156. ChgValue($(this), 'Biotic Fields', '生化力場平均施放', 1);
  157. ChgValue($(this), 'Helix Kills', '旋風火箭平均擊殺', 1);
  158. ChgValue($(this), 'Visor Kills', '戰術鎖定平均擊殺', 1);
  159.  
  160. //麥卡利
  161. ChgValue($(this), 'FTH Kills', '六連發平均擊殺', 1);
  162. ChgValue($(this), 'Deadeye Kills', '彈無虛發平均擊殺', 1);
  163.  
  164. //毀滅拳王
  165. ChgValue($(this), 'Meteor Kills', '流星墜每場擊殺', 1);
  166. ChgValue($(this), 'Ability Damage', '每場技能傷害量', 1);
  167. ChgValue($(this), 'Defense Shield', '最佳防禦取得護甲值', 1);
  168.  
  169. //駭影
  170. ChgValue($(this), 'Portals Killed', '每場相位轉換前擊殺', 1);
  171. ChgValue($(this), 'Enemies Hacked', '每場駭入數', 1);
  172. ChgValue($(this), 'Enemies Pulsed', '每場電磁脈衝波影響', 1);
  173.  
  174. });
  175.  
  176. $('dt').each(function(){
  177. ChgValue($(this), 'Skill Rank', '競技技術水平', 1);
  178. ChgValue($(this), 'Skill Rating', '競技天梯分數', 1);
  179. ChgValue($(this), 'On Fire', '手感發熱', 1);
  180. ChgValue($(this), 'Wins', '勝場', 1);
  181. ChgValue($(this), 'Record', '勝負紀錄', 1);
  182. ChgValue($(this), 'Win Rate','勝率', 1);
  183. });
  184.  
  185. $('div.filter-option').each(function(){
  186. ChgValue($(this), 'Quick Play', '快速對戰', 2);
  187. ChgValue($(this), "Competitive", "競技對戰", 2);
  188. ChgValue($(this), "All", "全部", 2);
  189. ChgValue($(this), " Offense", " 攻擊", 2);
  190. ChgValue($(this), " Defense", " 防禦", 2);
  191. ChgValue($(this), " Tank", " 肉盾", 2);
  192. ChgValue($(this), " Support", " 輔助", 2);
  193. ChgValue($(this), "Skill Rating", "競技天梯分數", 2);
  194. ChgValue($(this), "On Fire", "手感發燙", 2);
  195. //選單共用
  196. ChgValue($(this), "Wins", "勝場", 2);
  197. ChgValue($(this), "Eliminations", "擊殺", 2);
  198. ChgValue($(this), "Obj Kills", "攻防擊殺", 2);
  199. ChgValue($(this), "Obj Time", "攻防時間", 2);
  200. ChgValue($(this), "Damage", "傷害量", 2);
  201. ChgValue($(this), "Healing", "治療量", 2);
  202. ChgValue($(this), "Deaths", "死亡數", 2);
  203. ChgValue($(this), "Weapon Acc", "命中率", 2);
  204. ChgValue($(this), "Final Blows", "尾刀數", 2);
  205. ChgValue($(this), "Solo Kills", "單人擊殺", 2);
  206. ChgValue($(this), "Env Kills", "環境擊殺", 2);
  207. ChgValue($(this), "Overview", "總覽", 2);
  208. ChgValue($(this), "Combat", "對戰分析", 2);
  209. ChgValue($(this), "Medals", "獎牌分析", 2);
  210. });
  211.  
  212. $('header').each(function(){
  213. ChgValue($(this), "Trends", "近況走勢", 2);
  214. ChgValue($(this), "Roles", "勝場類型", 2);
  215. ChgValue($(this), "Competitive", "競技對戰", 2);
  216. ChgValue($(this), "Recent Activity", "最近對戰", 2);
  217. ChgValue($(this), "Medals", "面獎牌", 2);
  218. ChgValue($(this), "Most Played Heroes", "最常使用的英雄", 2);
  219. ChgValue($(this), "Lifetime Stats", "累計統計資料", 2);
  220. });
  221.  
  222. $('div.grouping.header').find('div.stat.double').each(function(){
  223. ChgValue($(this), "Competitive", "競技對戰", 2);
  224. ChgValue($(this), "Quick Play", "快速對戰", 2);
  225. });
  226.  
  227. $('tbody.stripe-rows').find('a.color-white').each(function(){
  228. ChgValue($(this), "Offense", "攻擊", 1);
  229. ChgValue($(this), "Support", "輔助", 1);
  230. ChgValue($(this), "Tank", "肉盾", 1);
  231. ChgValue($(this), "Defense", "防禦", 1);
  232. });
  233.  
  234. $('table.table-data.table-data-vertical').find('th').each(function(){
  235. ChgValue($(this), "Game Time", "遊戲時數", 1)
  236. ChgValue($(this), "Medals and Cards", "獎牌&投票", 1)
  237. ChgValue($(this), "Eliminations", "死亡數據", 1)
  238. ChgValue($(this), "Combat Statistics", "戰鬥總計", 1)
  239. });
  240.  
  241. $('tbody.stripe-rows').find('td').each(function(){
  242. ChgValue($(this), "Games Won", "總勝場", 1)
  243. ChgValue($(this), "Games Played", "完賽場次", 1)
  244. ChgValue($(this), "Avg Game Time", "平均完賽時間", 1)
  245. ChgValue($(this), "Time Spent Playing", "遊戲時間", 1)
  246. ChgValue($(this), "Time Spent Alive", "存活時間", 1)
  247. ChgValue($(this), "Time Spent Dead", "死亡時間", 1)
  248. ChgValue($(this), "Total Medals", "總獎牌數", 1)
  249. ChgValue($(this), "Gold Medals", "金牌", 1)
  250. ChgValue($(this), "Silver Medals", "銀牌", 1)
  251. ChgValue($(this), "Bronze Medals", "銅牌", 1)
  252. ChgValue($(this), "Voting Cards", "得票數", 1)
  253. ChgValue($(this), "Eliminations", "擊殺", 1)
  254. ChgValue($(this), "Final Blows", "尾刀", 1)
  255. ChgValue($(this), "Solo Kills", "單人擊殺", 1)
  256. ChgValue($(this), "Deaths", "死亡次數", 1)
  257. ChgValue($(this), "E:D Ratio", "死亡擊殺比", 1)
  258. ChgValue($(this), "Damage Done", "總傷害", 1)
  259. ChgValue($(this), "Healing Done", "總治療", 1)
  260. });