openai.com汉化

汉化界面的部分菜单及内容

  1. // ==UserScript==
  2. // @name openai.com汉化
  3. // @namespace Violentmonkey Scripts
  4. // @match https://*.openai.com/*
  5. // @grant none
  6. // @version 1.0
  7. // @author -
  8. // @description 汉化界面的部分菜单及内容
  9. // @author sec
  10. // @namespace https://t.me/KingRan_qun
  11. // ==/UserScript==
  12.  
  13.  
  14.  
  15.  
  16. (function() {
  17. 'use strict';
  18.  
  19. const i18n = new Map([
  20.  
  21. ['To-Do', '待办事项'],
  22. ['Welcome to ChatGPT', '欢迎来到ChatGPT'],
  23. ['Log in with your OpenAI account to continue', '用您的OpenAI账户登录(不可用)以继续'],
  24. ['Log in', '登录(不可用)'],
  25. ['Sign up', '注册(不可用)'],
  26. ['You need an OpenAI account', '您需要一个OpenAI账户'],
  27. ['You must have an OpenAI account to use ChatGPT. If you don\'t have one, sign up now and return to chat.openai.com to log in and continue.', '您必须有一个OpenAI账户才能使用ChatGPT。如果您还没有,现在就注册(不可用),然后返回chat.openai.com登录(不可用)并继续。'],
  28. ['Create an OpenAI account', '创建一个OpenAI账户'],
  29. ['Cancel', '取消'],
  30. ['Create your account', '创建您的账户'],
  31. ['Email address', '电子邮件地址'],
  32. ['Enter the code shown above', '输入上面显示的代码'],
  33. ['Continue', '继续'],
  34. ['Already have an account? Log in', '已经有了一个账户?请登录(不可用)'],
  35. ['Continue with Google', '继续使用谷歌'],
  36. ['Continue with Microsoft Account', '继续使用微软账户'],
  37. ['with Google', '用谷歌'],
  38. ['with Microsoft Account', '使用微软账户'],
  39. ['Already have an account?', '已经有了一个账户?'],
  40. ['Not available', '不可用'],
  41. ['OpenAI\'s services are not available in your country.', 'OpenAI的服务在您的国家无法使用。'],
  42. ['Create Your Account', '创建您的账户'],
  43. ['PasswordShow passwordShow password', '密码显示密码显示密码'],
  44. ['Your password must contain:', '您的密码必须包含。'],
  45. ['At least 8 characters', '至少有8个字符'],
  46. ['Verify your email', '验证您的电子邮件'],
  47. ['We sent an email to ', '我们发送了一封电子邮件给 '],
  48. ['Click the link inside to get started.', '点击里面的链接即可开始。'],
  49. ['Open Gmail‍', '打开Gmail'],
  50. ['Resend email‍', '重新发送电子邮件'],
  51. ['Tell us about you', '告诉我们你的情况'],
  52. ['First name', '名'],
  53. ['Last name', '姓氏'],
  54. ['Organization name', '组织名称'],
  55. ['By clicking \"Continue\", you agree to our Terms and confirm you\'re 18 years or older.', '通过点击继续,你同意我们的条款,并确认你是18岁或以上。'],
  56. ['Enter code', '输入代码'],
  57. ['Please enter the code we just sent you.', '请输入我们刚刚发给你的代码。'],
  58. ['How will you primarily use OpenAI?', '您将主要如何使用OpenAI?'],
  59. ['I\'m building a product or feature', '我正在构建一个产品或功能'],
  60. ['I\'m exploring personal use', '我在探索个人使用'],
  61. ['I\'m conducting AI research', '我正在进行人工智能研究'],
  62. ['I\'m a journalist or content creator', '我是一名记者或内容创作者'],
  63. ['Overview', '概况'],
  64. ['Documentation', '文档'],
  65. ['Examples', '实例'],
  66. ['Playground', '游戏场'],
  67. ['Introducing ChatGPT research release', '介绍ChatGPT研究版本'],
  68. ['Welcome to OpenAI', '欢迎来到OpenAI'],
  69. ['Start with the basics', '从基础知识开始'],
  70. ['Quickstart tutorial', '快速入门教程'],
  71. ['Learn by building a quick sample app', '通过建立一个快速样本应用程序来学习'],
  72. ['Explore some example tasks', '探索一些示例任务'],
  73. ['Build an application', '构建一个应用程序'],
  74. ['We no longer require you to register your applications with OpenAI.', '我们不再要求您向OpenAI注册(不可用)您的应用程序。'],
  75. ['Text completion', '文本完成'],
  76. ['Generate and edit text', '生成和编辑文本'],
  77. ['Code completionLimited beta', '代码补全有限的测试版'],
  78. ['Generate, edit, and explain code', '生成、编辑和解释代码'],
  79. ['Image generationBeta', '图像生成Beta版'],
  80. ['Generate and edit images', '生成和编辑图像'],
  81. ['Fine-tuning', '微调'],
  82. ['Train a model for your use case', '为你的用例训练一个模型'],
  83. ['Embeddings', '嵌入系统'],
  84. ['Search, classify, and compare text', '搜索、分类和比较文本'],
  85. ['Help center', '帮助中心'],
  86. ['Answers to frequently asked questions.', '对常见问题的回答。'],
  87. ['Visit help center', '访问帮助中心'],
  88. ['Community', '社区'],
  89. ['Ask questions and discuss topics with other developers.', '提出问题并与其他开发者讨论主题。'],
  90. ['Visit community', '访问社区'],
  91. ['Meet ambassadors', '认识大使'],
  92. ['Support', '支持服务'],
  93. ['Get in touch with an OpenAI support specialist.', '与OpenAI的支持专家取得联系。'],
  94. ['Chat with us', '与我们聊天'],
  95. ['Upgrade', '升级'],
  96. ['Personal', '个人'],
  97. ['Try it‍', '试试吧'],
  98. ['Read more‍', '阅读更多'],
  99. ['Manage account', '管理账户'],
  100. ['View API keys', '查看API密钥'],
  101. ['Invite team', '邀请团队'],
  102. ['Help', '帮助'],
  103. ['Pricing', '价格'],
  104. ['Terms & policies', '条款和政策'],
  105. ['Log out', '登出'],
  106. ['Could not fetch usage for this organization, if this issue persists please contact us through our help center at help.openai.com.', '无法获取该组织的使用情况,如果这个问题持续存在,请通过我们的帮助中心help.openai.com联系我们。'],
  107. ['Usage', '使用情况'],
  108. ['Below you\'ll find a summary of API usage for your organization. All dates and times are UTC-based, and data may be delayed up to 5 minutes.', '下面你会发现你的组织的API使用情况的摘要。所有的日期和时间都是基于UTC的,数据可能会延迟5分钟。'],
  109. ['December', '十二月'],
  110. ['DAILY', '每日'],
  111. ['CUMULATIVE', '累计'],
  112. ['Daily usage', '每日使用量'],
  113. ['Aggregate daily usage is not available before March 1st, 2022', '在2022年3月1日之前,每日累计使用量不可用。'],
  114. ['Free trial usage', '免费试用用量'],
  115. ['GRANT #', '补助金 # 授予的信用过期'],
  116. ['Daily usage breakdown ', '每日使用量分类 '],
  117. ['All org members', '所有组织成员'],
  118. ['Model usage', '模型使用量'],
  119. ['requests', '请求'],
  120. ['API keys', 'API密钥'],
  121. ['Your secret API keys are listed below. Please note that we do not display your secret API keys again after you generate them.', '你的秘密API密钥列在下面。请注意,在你生成API密匙后,我们不会再显示你的密匙。'],
  122. ['Do not share your API key with others, or expose it in the browser or other client-side code. In order to protect the security of your account, OpenAI may also automatically rotate any API key that we\'ve found has leaked publicly.', '请不要与他人分享您的API密钥,也不要在浏览器或其他客户端代码中曝光。为了保护您的账户安全,OpenAI也可能会自动旋转任何我们发现已经公开泄露的API密钥。'],
  123. ['You currently do not have any API keys. Please create one below.', '您目前没有任何API密钥。请在下面创建一个。'],
  124. ['Default organization', '默认组织'],
  125. ['If you belong to multiple organizations, this setting controls which organization is used by default when making', '如果您属于多个组织,此设置可以控制在使用上述API密钥时默认使用哪个组织。'],
  126. ['with the API keys above.', '使用上述API密钥时,默认使用哪个组织。'],
  127. ['Note: You can also specify which organization to use for each API request. ', '注意:你也可以为每个API请求指定使用哪个组织。'],
  128. ['Payment methods', '支付方式'],
  129. ['Billing history', '账单历史'],
  130. ['Preferences', '偏好'],
  131. ['Billing overview', '账单概览'],
  132. ['Free trial', '免费试用'],
  133. ['You are currently on the free trial. Head over to your', '您目前正处于免费试用阶段。请到您的'],
  134. ['page to view how many free trial credits are remaining on your account.', '页面,查看您的账户中还有多少免费试用点数。'],
  135. ['Payment methods', '付款方式'],
  136. ['Add or change payment method', '添加或更改付款方式'],
  137. ['Billing history', '账单历史'],
  138. ['View past and current invoices', '查看过去和当前的发票'],
  139. ['Set monthly spend limits', '设置每月支出限额'],
  140. ['Preferences', '首选项'],
  141. ['Manage company information', '管理公司信息'],
  142. ['View pricing and FAQs', '查看价格和常见问题'],
  143. ['GET STARTED', '开始吧'],
  144. ['Introduction', '介紹'],
  145. ['Key concepts', '关键概念'],
  146. ['Next steps', '接下来的步骤'],
  147. ['Libraries', '图书馆'],
  148. ['Models', '模型'],
  149. ['GUIDES', '指南'],
  150. ['Code completion', '代码完成'],
  151. ['Image generation', '图像生成'],
  152. ['Moderation', '微调'],
  153. ['Safety best practices', '安全的最佳实践'],
  154. ['Production best practices', '生产最佳实践'],
  155. ['API REFERENCE', 'API参考'],
  156. ['Introduction', '简介'],
  157. ['Authentication', '认证'],
  158. ['Models', '模型'],
  159. ['Completions', '完成'],
  160. ['Edits', '编辑'],
  161. ['Images', '图片'],
  162. ['Files', '档案'],
  163. ['Fine-tunes', '微调'],
  164. ['Moderations', '审校'],
  165. ['Engines', '引擎'],
  166. ['Parameter details', '参数详情'],
  167. ['Answer questions based on existing knowledge.', '在现有知识的基础上回答问题。'],
  168. ['Grammar correction', '语法纠正'],
  169. ['Corrects sentences into standard English.', '将句子纠正为标准英语。'],
  170. ['Summarize for a 2nd grader', '为二年级学生总结'],
  171. ['Translates difficult text into simpler concepts.', '将困难的文本翻译成更简单的概念。'],
  172. ['Natural language to OpenAI API', '自然语言到OpenAI API'],
  173. ['Create code to call to the OpenAI API using a natural language instruction.', '创建代码,使用自然语言指令调用OpenAI API。'],
  174. ['Text to command', '文本到命令'],
  175. ['Translate text into programmatic commands.', '将文本翻译成程序性指令。'],
  176. ['English to other languages', '英语到其他语言'],
  177. ['Translates English text into French, Spanish and Japanese.', '将英语文本翻译成法语、西班牙语和日语。'],
  178. ['Natural language to Stripe API', '自然语言到Stripe API'],
  179. ['Create code to call the Stripe API using natural language.', '创建代码以使用自然语言调用Stripe API。'],
  180. ['SQL translate', 'SQL翻译'],
  181. ['Translate natural language to SQL queries.', '将自然语言翻译成SQL查询。'],
  182. ['Parse unstructured data', '解析非结构化数据'],
  183. ['Create tables from long form text', '从长格式文本中创建表格'],
  184. ['Classification', '分类'],
  185. ['Classify items into categories via example.', '通过实例将项目分类。'],
  186. ['Python to natural language', '从Python到自然语言'],
  187. ['Explain a piece of Python code in human understandable language.', '用人类可理解的语言解释一段Python代码。'],
  188. ['Movie to Emoji', '电影到表情符号'],
  189. ['Convert movie titles into emoji.', '将电影标题转换为表情符号。'],
  190. ['Calculate Time Complexity', '计算时间复杂度'],
  191. ['Find the time complexity of a function.', '找到一个函数的时间复杂性。'],
  192. ['Translate programming languages', '翻译编程语言'],
  193. ['Translate from one programming language to another', '从一种编程语言翻译成另一种编程语言'],
  194. ['Advanced tweet classifier', '高级推文分类器'],
  195. ['Advanced sentiment detection for a piece of text.', '对一段文字进行高级情感检测。'],
  196. ['Explain code', '解释代码'],
  197. ['Explain a complicated piece of code.', '解释一段复杂的代码。'],
  198. ['Keywords', '关键词'],
  199. ['Extract keywords from a block of text.', '从一个文本块中提取关键词。'],
  200. ['Factual answering', '事实性回答'],
  201. ['Ad from product description', '从产品描述到广告'],
  202. ['Turn a product description into ad copy.', '将产品描述变成广告文案。'],
  203. ['Product name generator', '产品名称生成器'],
  204. ['Create product names from examples words. Influenced by a community prompt.', '从实例词中创建产品名称。受社区提示的影响。'],
  205. ['TL;DR summarization', 'TL;DR总结'],
  206. ['Summarize text by adding a \'tl;dr:\' to the end of a text passage. It shows that the API understands how to perform a number of tasks with no instructions.', '通过在文本段落的末尾添加tl;dr来总结文本。它表明API理解如何执行一些没有说明的任务。'],
  207. ['Python bug fixer', 'Python错误修复器'],
  208. ['Find and fix bugs in source code.', '查找并修复源代码中的错误。'],
  209. ['Spreadsheet creator', '电子表格创建器'],
  210. ['Create spreadsheets of various kinds of data. It\'s a long prompt but very versatile. Output can be copy+pasted into a text file and saved as a .csv with pipe separators.', '创建各种数据的电子表格。这是一个很长的提示,但用途非常广泛。输出可以复制+粘贴到文本文件中,并保存为带有管道分隔符的.csv。'],
  211. ['JavaScript helper chatbot', 'JavaScript助手聊天机器人'],
  212. ['Message-style bot that answers JavaScript questions', '回答JavaScript问题的消息式机器人'],
  213. ['ML/AI language model tutor', 'ML/AI语言模型辅导员'],
  214. ['Bot that answers questions about language models', '回答关于语言模型问题的机器人'],
  215. ['Science fiction book list maker', '科幻书单制作者'],
  216. ['Create a list of items for a given topic.', '为一个给定的主题创建一个项目列表。'],
  217. ['Tweet classifier', '推特分类器'],
  218. ['Basic sentiment detection for a piece of text.', '对一段文字进行基本的情感检测。'],
  219. ['Airport code extractor', '机场代码提取器'],
  220. ['Extract airport codes from text.', '从文本中提取机场代码。'],
  221. ['SQL request', 'SQL请求'],
  222. ['Create simple SQL queries.', '创建简单的SQL查询。'],
  223. ['Extract contact information', '提取联系信息'],
  224. ['Extract contact information from a block of text.', '从一个文本块中提取联系信息。'],
  225. ['JavaScript to Python', '将JavaScript转换为Python'],
  226. ['Convert simple JavaScript expressions into Python.', '将简单的JavaScript表达式转换成Python。'],
  227. ['Friend chat', '朋友聊天'],
  228. ['Emulate a text message conversation.', '模仿文本信息对话。'],
  229. ['Mood to color', '心情到颜色'],
  230. ['Turn a text description into a color.', '把文本描述变成一种颜色。'],
  231. ['Write a Python docstring', '写一个Python文档串'],
  232. ['An example of how to create a docstring for a given Python function. We specify the Python version, paste in the code, and then ask within a comment for a docstring, and give a characteristic beginning of a docstring', '一个如何为给定的Python函数创建一个文档串的例子。我们指定Python版本,粘贴代码,然后在注释中询问一个文档串,并给出一个文档串的特征开头'],
  233. ['Analogy maker', '类比生成器'],
  234. ['Create analogies. Modified from a community prompt to require fewer examples.', '创建类比。从社区提示中修改,要求减少例子。'],
  235. ['JavaScript one line function', 'JavaScript单行函数'],
  236. ['Turn a JavaScript function into a one liner.', '把一个JavaScript函数变成一个单行字。'],
  237. ['Micro horror story creator', '微型恐怖故事创建者'],
  238. ['Creates two to three sentence short horror stories from a topic input.', '从一个主题输入创建两到三句话的短篇恐怖故事。'],
  239. ['Third-person converter', '第三人称转换器'],
  240. ['Converts first-person POV to the third-person. This is modified from a community prompt to use fewer examples.', '将第一人称POV转换为第三人称。这是从社区提示中修改的,使用较少的例子。'],
  241. ['Notes to summary', '笔记到摘要'],
  242. ['Turn meeting notes into a summary.', '将会议记录变成摘要。'],
  243. ['VR fitness idea generator', 'VR健身创意生成器'],
  244. ['Create ideas for fitness and virtual reality games.', '创建健身和虚拟现实游戏的创意。'],
  245. ['ESRB rating', 'ESRB评级'],
  246. ['Categorize text based upon ESRB ratings.', '根据ESRB评级对文本进行分类。'],
  247. ['Essay outline', '作文提纲'],
  248. ['Generate an outline for a research topic.', '为一个研究课题生成一个大纲。'],
  249. ['Recipe creator ', '菜谱创建者 '],
  250. ['eat at your own risk', '自食其果'],
  251. ['Create a recipe from a list of ingredients.', '根据成分清单创建一个食谱。'],
  252. ['Chat', '聊天'],
  253. ['Open ended conversation with an AI assistant.', '与人工智能助手进行开放式对话。'],
  254. ['Marv the sarcastic chat bot', '讽刺性聊天机器人Marv'],
  255. ['Marv is a factual chatbot that is also sarcastic.', 'Marv是一个实事求是的聊天机器人,也会讽刺人。'],
  256. ['Turn by turn directions', '转弯指示'],
  257. ['Convert natural language to turn-by-turn directions.', '将自然语言转换为转弯指示。'],
  258. ['Restaurant review creator', '餐厅评论创建者'],
  259. ['Turn a few words into a restaurant review.', '将几句话变成餐厅评论。'],
  260. ['Create study notes', '创建学习笔记'],
  261. ['Provide a topic and get study notes.', '提供一个主题并获得学习笔记。'],
  262. ['Interview questions', '面试问题'],
  263. ['Guide the model towards factual answering by showing it how to respond to questions that fall outside its knowledge base. Using a', '通过向模型展示如何回答超出其知识库的问题,引导模型进行事实性回答。使用一个'],
  264. ['to indicate a response to words and phrases that it doesn\'t know provides a natural response that seems to work better than more abstract replies', '来表示对它不知道的单词和短语的回答,提供了一种自然的回答,似乎比更抽象的回答效果更好。'],
  265. ['Explore what\'s possible with some example applications', '通过一些应用实例探索可能的结果'],
  266. ['Get started', '开始吧'],
  267. ['Enter an instruction or select a preset, and watch the API respond with a ', '输入一个指令或选择一个预设,然后看着API响应一个 '],
  268. ['completion', '完成'],
  269. ['that attempts to match the context or pattern you provided.', '试图匹配你提供的上下文或模式。'],
  270. ['You can control which ', '你可以通过改变模型来控制哪个 '],
  271. ['completes your request by changing the model.', '来完成你的请求。'],
  272. ['KEEP IN MIND', '牢记'],
  273. ['Use good judgment when sharing outputs, and attribute them to your name or company. ', '在分享产出时要有良好的判断力,并将它们归于你的名字或公司。'],
  274. ['Learn more', '了解更多'],
  275. ['Requests submitted to our models may be used to train and improve future models. ', '提交给我们的模型的请求可能被用来训练和改进未来的模型。'],
  276. ['Our default models\' training data cuts off in 2021, so they may not have knowledge of current events.', '我们默认模型的训练数据在2021年截止,因此它们可能不了解当前的事件。'],
  277. ['Write a tagline for an ice cream shop', '为一家冰淇淋店写标语'],
  278. ['Load a preset', '加载一个预设'],
  279. ['Mode', '模式'],
  280. ['Temperature', '溫度'],
  281. ['Maximum length', '最大长度'],
  282. ['Stop sequences', '停止序列'],
  283. ['Enter sequence and press Tab', '输入序列并按Tab键'],
  284. ['Top P', '顶部P'],
  285. ['Frequency penalty', '频率惩罚'],
  286. ['Presence penalty', '存在的惩罚'],
  287. ['Best of', '最佳'],
  288. ['Inject start text', '注入开始文本'],
  289. ['Inject restart text', '注入重新开始的文本'],
  290. ['Show probabilities', '显示概率'],
  291. ['Controls diversity via nucleus sampling:', '通过细胞核取样控制多样性。'],
  292. ['0.5 means half of all likelihood-weighted options are considered.', '0.5意味着所有可能性加权选项的一半被考虑。'],
  293. ['How much to penalize new tokens based on whether they appear in the text so far. Increases the model\'s likelihood to talk about new topics', '根据到目前为止是否在文本中出现,对新标记的惩罚程度。增加模型谈论新话题的可能性'],
  294. ['Generates multiple ', '生成多个 '],
  295. ['server-side, and displays only the best. Streaming only works when set to 1. Since it acts as a multiplier on the number of', '在服务器端生成多个新标记,并只显示最好的。流动只在设置为1时才起作用。'],
  296. ['this parameters can eat into your token quota very quickly – use caution!', '这个参数会很快吞噬你的代币配额--请谨慎使用!'],
  297. ['Text to append after the user\'s input to format the model for a response', '在用户输入后附加的文本,以格式化响应的模型'],
  298. ['Toggle token highlighting which indicates how likely a token was to be generated. ', '切换令牌的高亮显示,显示令牌生成的可能性。'],
  299. ['to debug a given generation, or see alternative options for a token', '调试一个给定的生成,或查看一个令牌的替代选项'],
  300. ['Up to four sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence', '最多四个序列,API将停止生成更多的标记。返回的文本将不包含停止序列'],
  301. ['The maximum number of tokens to ', '要生成的标记的最大数量。'],
  302. ['generat', '生成的最大数量'],
  303. ['Requests can use up to 2,048 or 4,000 tokens shared between prompt and', '请求可以使用最多2,048个或4,000个令牌,在提示和提示之间共享。'],
  304. ['The exact limit varies by model', '具体限制因型号而异'],
  305. ['One token is roughly 4 characters for normal English text', '对于正常的英文文本,一个标记大约是4个字符。'],
  306. ['Controls randomness: Lowering results in less random', '控制随机性。降低的结果是减少随机性'],
  307. ['As the temperature approaches zero, the model will become deterministic and repetitive.', '当温度接近零时,模型将变得确定性和重复性。'],
  308. ['The model which will generate the ', '将产生的模型 '],
  309. ['Some models are suitable for natural language tasks, others specialize in code', '有些模型适用于自然语言任务,有些则专门用于代码'],
  310. ['Content filter preferences', '内容过滤偏好'],
  311. ['View code', '查看代码'],
  312. ['You can use the following code to start integrating your current prompt and settings into your application', '您可以使用以下代码开始将您当前的提示和设置整合到您的应用程序中'],
  313. ['Your API Key can be found', '可以找到你的API密钥'],
  314. ['You should use environment variables or a secret management tool to expose your key to your applications', '你应该使用环境变量或秘密管理工具,将你的密钥暴露给你的应用程序'],
  315. ['Most capable model in the GPT-3series.Can perform any task the other ', 'GPT-3系列中能力最强的型号,可以执行其他型号的任何任务。'],
  316. ['models can,oftenwith higher quality,longer outputand better instruction-following.Itcan process up to 4,000 tokensper request.', '它可以处理多达4,000个标记的请求。'],
  317. ['STRENGTHS', '优势'],
  318.  
  319.  
  320.  
  321.  
  322. ['Updated', '更新于'],
  323.  
  324.  
  325. ['Forks', '复刻'],
  326.  
  327. ])
  328.  
  329. replaceText(document.body)
  330. // |
  331.  
  332. const bodyObserver = new MutationObserver(mutations => {
  333. mutations.forEach(mutation => {
  334. mutation.addedNodes.forEach(addedNode => replaceText(addedNode))
  335. })
  336. })
  337. bodyObserver.observe(document.body, { childList: true, subtree: true })
  338.  
  339. function replaceText(node) {
  340. nodeForEach(node).forEach(htmlnode => {
  341. i18n.forEach((value, index) => {
  342. // includes可直接使用 === 以提高匹配精度
  343. const textReg = new RegExp(index, 'g')
  344. if (htmlnode instanceof Text && htmlnode.nodeValue.includes(index))
  345. htmlnode.nodeValue = htmlnode.nodeValue.replace(textReg, value)
  346. else if (htmlnode instanceof HTMLInputElement && htmlnode.value.includes(index))
  347. htmlnode.value = htmlnode.value.replace(textReg, value)
  348. })
  349. })
  350. }
  351.  
  352. function nodeForEach(node) {
  353. const list = []
  354. if (node.childNodes.length === 0) list.push(node)
  355. else {
  356. node.childNodes.forEach(child => {
  357. if (child.childNodes.length === 0) list.push(child)
  358. else list.push(...nodeForEach(child))
  359. })
  360. }
  361. return list
  362. }
  363. })();

QingJ © 2025

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