解决 Chrome 提示“您的连接不是私密连接”
解决:在当前页面输入thisisunsafe
就可(不是在 URL 输入,直接在页面输入)
原因:可能证书是自签名证书(SSL),为了安全起见,直接禁止访问了,thisisunsafe
说明你已经了解并确认这是个不安全的网站,你仍要访问就给你访问了。
解决Chrome 更新到最新版本无法更新cookies
在新页面输入 chrome://flags/
,查找 Partitioned cookies
设置为 Enabled
然后重启 Relaunch
问题解决
恢复 Chrome 翻译功能
方法一
win 与 macOS 同理
# 查询域名所对应的IP地址
$ nslookup google.cn
# 进入 hosts 文件目录
$ cd /c/Windows/System32/drivers/etc/
# 打开 hosts
$ notepad hosts
# 添加
120.232.181.162 translate.googleapis.com
方法二
win
:: Copyright (c)2022 https://bookfere.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://bookfere.com/post/1020.html
@echo off
setlocal enabledelayedexpansion
chcp 437 >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>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 "" ^& break ^> %hosts_file%') do (
set "rule=%%i"
set "rule=!rule:*]=!"
if "%old_rule%"=="!rule!" set "rule=%new_rule%"
if "!new_line!"=="true" >>%hosts_file% echo.
>>%hosts_file% <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 "" ^& break ^> "%hosts_file%"
') do (
set "line=%%i"
set "line=!line:*]=!"
if "!new_line!"=="true" >>%hosts_file% echo.
>>%hosts_file% <NUL set /p="!line!"
set "new_line=true"
)
)
) else (
echo Adding the rule "%new_rule%"
echo.>>%hosts_file%
echo %comment%>>%hosts_file%
<NUL set /p="%new_rule%">>%hosts_file%
)
echo Done.
pause
macOS
#!/bin/bash
# Copyright (c)2022 https://bookfere.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://bookfere.com/post/1020.html
SOURCE_DOMAIN=google.cn
TARGET_DOMAIN=translate.googleapis.com
HOSTS_FILE=/etc/hosts
HOST_CMD=/usr/bin/host
CUT_CMD=/usr/bin/cut
SED_CMD=/usr/bin/sed
IP=$($HOST_CMD -t A $SOURCE_DOMAIN | $CUT_CMD -d ' ' -f 4)
OLD_RULE=$(cat $HOSTS_FILE | grep $TARGET_DOMAIN)
NEW_RULE="$IP $TARGET_DOMAIN"
COMMENT="# Fix Google Translate CN"
if [ -n "$OLD_RULE" ]; then
echo "A rule has been added to the hosts file. "
echo "[1] Update [2] Delete"
echo -n "Enter a number to choose an action: "
read action
if [ "$action" == "1" ]; then
if [ "$OLD_RULE" != "$NEW_RULE" ]; then
echo "Deleting the rule \"$OLD_RULE\""
echo "Adding the rule \"$NEW_RULE\""
$SED_CMD -i '' "s/.*${TARGET_DOMAIN}/${NEW_RULE}/" $HOSTS_FILE
else
echo 'The rule already exists, nothing to do.'
fi
fi
if [ "$action" == "2" ]; then
echo "Deleting the rule \"$OLD_RULE\""
PATTERN="s/\n\{0,\}${COMMENT}\n.* ${TARGET_DOMAIN}//"
$SED_CMD -i '' -e ':a' -e 'N' -e '$!ba' -e "$PATTERN" $HOSTS_FILE
fi
else
echo "Adding the rule \"$NEW_RULE\""
echo -ne "\n${COMMENT}\n${NEW_RULE}" >> $HOSTS_FILE
fi
echo 'Done.'
方法三
科学上网(全局代理)
小技巧
节点保存图片
- F12 打开开发者工具台
- ctrl + shift + p(command+Shift+p),弹出搜索框之后输入: cap
- Capture full size screenshot(全部保存)
- Capture full size screenshot(选中当前节点保存)
- 回车即可,成功保存图片,