Yandex 页面汉化

Yandex 网站 页面汉化

  1. // ==UserScript==
  2. // @name Yandex 页面汉化
  3. // @version 1.2
  4. // @author Soyu
  5. // @description Yandex 网站 页面汉化
  6. // @description:zh-cn Yandex 网站 页面汉化
  7. // @icon
  8. // @match *://yandex.com/*
  9. // @match *://*.yandex.com/*
  10. // @grant GM_getResourceText
  11. // @grant GM_getValue
  12. // @grant GM_setValue
  13. // @namespace https://gf.qytechs.cn/zh-CN/scripts/438870-yandex-%E9%A1%B5%E9%9D%A2%E6%B1%89%E5%8C%96
  14. // @homepage https://gf.qytechs.cn/zh-CN/users/574311-soyuzom
  15. // @license GPL-3.0 License
  16. // @run-at document-end
  17. // @connect github.com
  18. // @connect raw.fastgit.org
  19. // @connect localhost
  20. // ==/UserScript==
  21.  
  22. var allNodes = document.body.querySelectorAll('*')
  23.  
  24. var allNodeArr = Array.from(allNodes)
  25.  
  26. var textObj = {
  27.  
  28. "@version": "1.1",
  29.  
  30. //首页
  31.  
  32. "Bahasa Indonesia": "巴哈萨",
  33. "Exit": "退出",
  34. "Maps": "地图",
  35. "AppMetrica": "应用分析",
  36. "Browser": "浏览器",
  37. "Finds everything": "搜索一切",
  38. "Technologies": "技术支持",
  39. "About Yandex": "关于Yandex",
  40. "Terms of Service": "服务条款",
  41. "Privacy Policy": "隐私政策",
  42. "Contact us": "联系我们",
  43. "Copyright Notice": "版权公告",
  44. "": "",
  45.  
  46. "Yandex in": "国家区域站点",
  47. "Russia": "俄罗斯",
  48. "Ukraine": "乌克兰",
  49. "Belarus": "白俄罗斯",
  50. "Kazakhstan": "哈萨克斯坦",
  51. "Uzbekistan": "乌兹别克斯坦",
  52. "Turkey": "土耳其",
  53. //设置页
  54. "Account": "账户",
  55. "Advertising": "广告",
  56. "Search settings": "搜索设置",
  57. "Search suggestions": "搜索建议",
  58. "Show sites that you frequently visit": "显示您经常访问的网站",
  59. "Your favorite sites will appear first in the list of search hints along with an icon and a short description to make them more noticeable. ": "您喜欢的网站将首先出现在搜索提示列表中,并附有图标和简短描述,以使其更加明显。",
  60. "Filter search results": "过滤搜索结果",
  61. "With Yandex search you can find any information available on the internet. Yandex offers different filtering modes to help you avoid unwanted content in search results:": "通过Yandex搜索,您可以在互联网上找到任何可用的信息。Yandex提供了不同的过滤模式,以帮助您避免搜索结果中不需要的内容:",
  62. "No filter": "无过滤",
  63. "Moderate filter": "中等",
  64. "Family search": "家庭",
  65. "Save": "保存",
  66. "Back": "返回",
  67.  
  68. "Ad settings": "广告设置",
  69. "Home page and new Yandex Browser tab": "主页和新的Yandex浏览器选项卡",
  70. "Show ads": "展示广告",
  71. "Take my interests into account": "考虑我的兴趣",
  72. "Use my location": "使用我的位置",
  73. "Back": "返回",
  74.  
  75.  
  76.  
  77. //搜索页
  78.  
  79. "Search": "搜索",
  80. "Advanced search": "高级搜索",
  81. "Web": "网页",
  82. "Images": "图片",
  83. "Video": "视频",
  84. "News": "新闻",
  85. "Translate": "翻译",
  86. "Disk": "硬盘",
  87. "Mail": "邮件",
  88. "Ads": "广告",
  89. "In Singapore": "在新加坡",
  90. "Last 24 hours": "24小时",
  91. "Past 2 weeks": "2周+",
  92. "Past month": "一个月+",
  93. "Russian": "俄语",
  94. "English": "英语",
  95. "More": "更多",
  96. "Clear": "清除",
  97. "Bing": "必应",
  98. "Google": "谷歌",
  99. "Beijing": "北京",
  100. "Hong Kong": "香港",
  101. "Settings": "设置",
  102. "Feedback": "反馈",
  103. "Turn off Family search": "关闭家庭搜索",
  104. "Back to top": "第一页",
  105. "next": "下一页",
  106.  
  107. //搜图
  108. "Size": "大小",
  109. "Any size": "全部",
  110. "Large": "大",
  111. "Medium": "中",
  112. "Small": "小",
  113. "OK": "确定",
  114.  
  115. "Orientation": "方向",
  116. "Any orientation": "任何方向",
  117. "Horizontal": "横屏",
  118. "Vertical": "垂直",
  119. "Square": "宽屏",
  120.  
  121. "Type": "类型",
  122. "Any type": "任何类型",
  123. "Photos": "照片",
  124. "White background": "白色背景",
  125. "Drawings and sketches": "图纸草图",
  126. "People": "人物",
  127. "Demotivators": "激励",
  128.  
  129. "Color": "颜色",
  130. "Any color": "任何颜色",
  131. "Color images only": "仅限颜色图片",
  132. "Black and white": "黑白",
  133.  
  134. "File": "文件",
  135. "Any file": "任何文件",
  136. "Recent": "最近",
  137. "On this site": "指定网站",
  138. "Site URL": "网址",
  139. "Reset": "重置",
  140.  
  141. //视频
  142.  
  143. "See also": "猜你喜欢",
  144. "Users who viewed these videos also watched": "‎其他用户也观看了这些视频‎",
  145. "HD": "超清",
  146. "Any duration": "任何时常",
  147. "Less than 10 minutes": "10分钟以内",
  148. "10-65 minutes": "10-65分钟",
  149. "More than 65 minutes": "65分钟以上",
  150.  
  151. //硬盘
  152. "Telemost": "电话会议",
  153. "Calendar": "日历",
  154. "Notes": "笔记",
  155. "Contacts": "联系人",
  156. "Messenger": "信息",
  157.  
  158. //翻译
  159. "Text": "文字",
  160. "Sites": "网站",
  161. "Documents": "文档",
  162. "Images": "图片",
  163. "For business": "商用",
  164. "Translate in Google": "使用谷歌翻译",
  165. "report error": "错误报告",
  166. "Mobile version": "移动版",
  167. "Developers": "开发者",
  168. "User Agreement": "用户协议",
  169. "Popular translations": "热门翻译",
  170. "Help": "帮助",
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178. "yyy": "收尾"
  179. }
  180.  
  181. var excutNode = ['IMG','BR','HR','FORM','SELECT','OPTION','INPUT','SCRIPT','STYLE','ts']
  182.  
  183. console.time('translate')
  184. allNodeArr.forEach(item=>{
  185. if (item.childNodes && !excutNode.includes(item.nodeName)) {
  186. item.childNodes.forEach(item => {
  187. if(item.nodeName === '#text'){
  188. var text = textObj[item.data]
  189. if(text){
  190. item.data = text
  191. }
  192.  
  193. }
  194. })
  195. }
  196. })
  197. console.timeEnd('translate')

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址