<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Github项目 &#8211; 壹资源网</title>
	<atom:link href="https://www.iezyw.com/html/tag/github%E9%A1%B9%E7%9B%AE/feed" rel="self" type="application/rss+xml" />
	<link>https://www.iezyw.com</link>
	<description>一个降低试错成本的网站！</description>
	<lastBuildDate>Sun, 09 Oct 2022 02:09:23 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.iezyw.com/wp-content/uploads/2026/01/cropped-logo-5-32x32.png</url>
	<title>Github项目 &#8211; 壹资源网</title>
	<link>https://www.iezyw.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>谷歌翻译恢复 Chrome 浏览器翻译的正常使用方法</title>
		<link>https://www.iezyw.com/html/20225678.html</link>
		
		<dc:creator><![CDATA[壹资源网]]></dc:creator>
		<pubDate>Sun, 09 Oct 2022 15:01:46 +0000</pubDate>
				<category><![CDATA[网站源码]]></category>
		<category><![CDATA[Github项目]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google 翻译]]></category>
		<guid isPermaLink="false">https://www.iezyw.com/?p=5678</guid>

					<description><![CDATA[谷歌翻译恢复 Chrome 浏览器翻译的正常使用方法 只需一键即可完成所有修改步骤。 脚本托管在 GitHub [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>谷歌翻译恢复 Chrome 浏览器翻译的正常使用方法</p>
<p>只需一键即可完成所有修改步骤。</p>
<p>脚本托管在 GitHub Gist 上，你也可以通过以下链接直接下载到本地使用。</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-5681" title="fix-google-translate-cn" src="https://www.iezyw.com/wp-content/uploads/2022/10/fix-google-translate-cn.png" alt="fix-google-translate-cn" width="780" height="299" /></p>
<p>把代码保存为bat’文件，最后以管理员身份运行脚本即可完成!</p>
<div class="">
<pre class="enlighter-clipboard">:: Copyright (c)2022 https://www.iezyw.com
:: This is a batch script for fixing Google Translate and making it available
:: in the Chinese mainland. If you experience any problem, visit the page below:
:: https://www.iezyw.com/html/20225678.html

@echo off
setlocal enabledelayedexpansion
chcp 437 &gt;NULL

set "source_domain=google.cn"
set "target_domain=translate.googleapis.com"

set "hosts_file=C:\Windows\System32\drivers\etc\hosts"
for /f "skip=4 tokens=2" %%a in ('"nslookup %source_domain% 2&gt;NUL"') do set ip=%%a
set "old_rule=null"
set "new_rule=%ip% %target_domain%"
set "comment=# Fix Google Translate CN"

for /f "tokens=*" %%i in ('type %hosts_file%') do (
    set "line=%%i"
    :: Retrieve the rule If the target domain exists.
    if not "!line:%target_domain%=!"=="%%i" set "old_rule=%%i"
)

if not "%old_rule%"=="null" (
    echo A rule has been added to the hosts file. 
    echo [1] Update [2] Delete
    set /p action="Enter a number to choose an action: "
    if "!action!"=="1" (
        if not "%old_rule%"=="%new_rule%" (
            echo Deleting the rule "%old_rule%"
            echo Adding the rule "%new_rule%"
            set "new_line=false"
            for /f "tokens=*" %%i in ('type %hosts_file% ^| find /v /n "" ^&amp; break ^&gt; %hosts_file%') do (
                set "rule=%%i"
                set "rule=!rule:*]=!"
                if "%old_rule%"=="!rule!" set "rule=%new_rule%"
                if "!new_line!"=="true" &gt;&gt;%hosts_file% echo.
                &gt;&gt;%hosts_file% &lt;NUL set /p="!rule!"
                set "new_line=true"
            )
        ) else (
            echo The rule already exists, nothing to do.
        )
    )
    if "!action!"=="2" (
        echo Deleting the rule "%old_rule%"
        set "new_line=false"
        for /f "tokens=*" %%i in ('
            type "%hosts_file%" ^| findstr /v /c:"%comment%" ^| findstr /v "%target_domain%" ^| find /v /n "" ^&amp; break ^&gt; "%hosts_file%"
        ') do (
            set "line=%%i"
            set "line=!line:*]=!"
            if "!new_line!"=="true" &gt;&gt;%hosts_file% echo.
            &gt;&gt;%hosts_file% &lt;NUL set /p="!line!"
            set "new_line=true"
        )
    )
) else (
    echo Adding the rule "%new_rule%"
    echo.&gt;&gt;%hosts_file%
    echo %comment%&gt;&gt;%hosts_file%
    &lt;NUL set /p="%new_rule%"&gt;&gt;%hosts_file%
)

echo Done.
pause</pre>
<pre></pre>
<p>如果你用的是 macOS 系统<br />
打开“终端”，拷贝以下命令并将其粘贴到终端上，按回车，输入你的系统密码，再按回车。<br />
注意，输入密码时是不显示任何信息的，只要确保输入的密码是正确的就可以。</p>
<pre>sudo bash -c "$(curl -skL https://fere.link/ow3cld)"
</pre>
<p>如果看到如下所示提示，表示规则添加成功，也就可以正常使用 Chrome 的谷歌翻译功能了。</p>
<pre><code>Adding the rule "142.250.70.195 translate.googleapis.com"
Done.</code></pre>
<p>&nbsp;</p>
<p>* 提示：终端打开的方式为，打开“访达（Finder）”，在左侧边栏找到并进入“应用程序（Applications）”文件夹，在里面找到并进入“实用工具（Utilities）”文件夹，在这里面就可以找到“终端（Terminal）”，双击打开。</p>
<p>​* 注意：​由于代码是托管在 GitHub 的，因此在请求 URL 的时候可能会遇到网络不通畅的情况，如果运行命令后长时间没反应，建议按 Ctrl + C 中止运行，​然后再重新运行一遍上面的命令，一般最多尝试两三次。</p>
<p>此命令可以重复使用。添加规则后再次使用时会出现交互提示信息，输入 1 会尝试更新已添加规则的 IP 地址，如果没有变化则不做任何修改，输入 2 会删除已添加的规则。</p>
<p>Github 开源项目地址：https://gist.github.com/bookfere</p>
</div>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
