2
2
3
3
[ English] ( README.md )
4
4
5
- 屏蔽指定的网站防止其显示在 Google 以及其他搜索引擎中
5
+ 在搜索结果中屏蔽指定的网站
6
6
7
7
[ Chrome 应用商店] ( https://chrome.google.com/webstore/detail/ublacklist/pncfbmialoiaghdehhbnbhkkgmjanfhe ) / [ Firefox 扩展] ( https://addons.mozilla.org/en-US/firefox/addon/ublacklist/ ) / [ App Store] ( https://apps.apple.com/us/app/ublacklist-for-safari/id1547912640 ) (支持 macOS 和 iOS,特别鸣谢 [ Group-Leafy] ( https://github.com/HoneyLuka/uBlacklist/tree/safari-port/safari-project ) )
8
8
9
9
## 介绍
10
10
11
11
此扩展可防止您指定的网站出现在 Google 和其他的一些搜索引擎中。
12
12
13
- 您可以为搜索结果添加规则或点击工具栏图标以屏蔽指定的网站。规则可以通过以下方式指定:[ 匹配模式] ( https://developer.mozilla.org/zh-CN/docs/mozilla/add-ons/webextensions/match_patterns ) (示例: ` *://*.example.com/* ` ,这样的话会屏蔽 example.org 网站 ) 或使用[ 正则表达式] ( https://developer.mozilla.org/zh-CN/docs/web/javascript/guide/regular_expressions ) (示例: ` /example\.(net|org)/ ` ,这样的话可以屏蔽 example.net 和 example.org 两个网站 ).
13
+ 您可以为搜索结果添加规则或点击工具栏图标以屏蔽指定的网站。规则可以通过以下方式指定:[ 匹配模式] ( https://developer.mozilla.org/zh-CN/docs/mozilla/add-ons/webextensions/match_patterns ) (示例:` *://*.example.com/* ` ) 或使用[ 正则表达式] ( https://developer.mozilla.org/zh-CN/docs/web/javascript/guide/regular_expressions ) (示例:` /example\.(net|org)/ ` ).
14
14
15
- 您可以通过云存储跨设备同步规则集。 目前,支持 Google Drive 和 Dropbox。
15
+ 您可以通过云存储跨设备同步规则集。目前,支持 Google Drive 和 Dropbox。
16
16
17
- 您还可以订阅公共规则集。 该网站列出了一些订阅:https://iorate.github.io/ublacklist/subscriptions
17
+ 您还可以订阅公共规则集。该网站列出了一些订阅:
18
+ https://iorate.github.io/ublacklist/subscriptions
18
19
19
20
## 支持的搜索引擎
20
21
21
- 此扩展支持以下搜索引擎
22
+ 此扩展支持以下搜索引擎。
22
23
23
24
| | 网页 | 图片 | 视频 | 新闻 |
24
25
| ------------ | ------------------ | ------------------ | ------------------ | ------------------ |
25
26
| Google | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
26
- | Bing | \* 1 | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
27
- | Brave | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
27
+ | Bing | : heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
28
+ | Brave \* 3 | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
28
29
| DuckDuckGo | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
29
30
| Ecosia | :heavy_check_mark : | | | |
30
- | Qwant | :heavy_check_mark : | :heavy_check_mark : | \* 2 | :heavy_check_mark : |
31
- | SearX \* 3 | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
31
+ | Kagi | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
32
+ | Qwant | :heavy_check_mark : | :heavy_check_mark : | \* 1 | :heavy_check_mark : |
33
+ | SearX \* 2 | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
32
34
| Startpage | :heavy_check_mark : | | :heavy_check_mark : | :heavy_check_mark : |
33
35
| Yahoo! JAPAN | :heavy_check_mark : | | | |
34
36
| Yandex | :heavy_check_mark : | | | |
35
37
36
- \* 1 仅当 "Always play videos on Qwant.com" 关闭时<br >
37
- \* 2 仅支持某些公共实例,如果您想将自己的 SearX/SearXNG 添加到支持列表,你需要前往` src/common/search-engines.ts ` ,并手动将您的搜索引擎添加到列表中,然后手动进行构建。
38
+ \* 1 仅当 "Always play videos on Qwant.com" 关闭时。<br >
39
+ \* 2 仅支持某些公共实例,如果您想将自己的 SearX/SearXNG 添加到支持列表,你需要前往` src/common/search-engines.ts ` ,并手动将您的搜索引擎添加到列表中,然后手动进行构建。<br >
40
+ \* 3 由于获取图片链接的完整 URL 有困难,此扩展在 Brave 图片搜索上不支持子域名屏蔽。(例如,如果链接指向 "www.example.com",扩展会屏蔽整个 "example.com"。)
38
41
39
42
## 发布订阅
40
43
41
44
要将规则集发布为订阅,请将以 UTF-8 编码的规则集文件放在合适的 HTTP(S) 服务器上,然后发布 URL。 这是托管在 GitHub 上的示例:<br >
42
45
https://raw.githubusercontent.com/iorate/ublacklist-example-subscription/master/uBlacklist.txt
43
46
44
- 在 _ Chrome _ 浏览器中且 uBlacklist >=6.6.0 ,订阅链接是有效的。为 ` name ` 和 ` url ` 添加订阅, 以下 URL 可用作选项页面的快捷方式:
47
+ 你可以在规则集前放置 YAML frontmatter。建议设定 ` name ` 变量。
45
48
46
49
```
47
- https://iorate.github.io/ublacklist/subscribe?name={urlEncode(name)}&url={urlEncode(url)}
50
+ ---
51
+ name: Your ruleset name
52
+ ---
53
+ *://*.example.com/*
54
+ ```
55
+
56
+ 在 _ Chrome_ 浏览器上的 uBlacklist >=6.6.0 中,订阅链接是有效的。要添加 ` url ` 为订阅, 以下 URL 可用作选项页面的快捷方式:
57
+
58
+ ```
59
+ https://iorate.github.io/ublacklist/subscribe?url={urlEncode(url)}
48
60
```
49
61
50
62
对于上面的示例:<br >
51
- https://iorate.github.io/ublacklist/subscribe?name=Example& url=https%3A%2F%2Fraw.githubusercontent.com%2Fiorate%2Fublacklist-example-subscription%2Fmaster%2FuBlacklist.txt
63
+ https://iorate.github.io/ublacklist/subscribe?url=https%3A%2F%2Fraw.githubusercontent.com%2Fiorate%2Fublacklist-example-subscription%2Fmaster%2FuBlacklist.txt
52
64
53
65
## 开发者
54
66
55
67
### 构建
56
68
57
- 为了构建这个扩展,你需要下载并安装 [ pnpm] ( https://pnpm.io/ ) >=9.7.0 or [ corepack] ( https://github.com/nodejs/corepack ) (currently distributed with Node.js)。
69
+ 为了构建这个扩展,你需要下载并安装 [ pnpm] ( https://pnpm.io/ ) >=9.7.0 或 [ corepack] ( https://github.com/nodejs/corepack ) (目前 Node.js 安装时自带 )。
58
70
59
71
``` shell
60
72
# If you use corepack
@@ -70,7 +82,7 @@ pnpm install
70
82
pnpm build
71
83
```
72
84
73
- 在您提交` Pull Request ` 之前,您需要确保` pnpm check ` 通过测试,否则可能会影响 github actions 自动构建 。
85
+ 在您提交 Pull Request 之前,您需要确保 ` pnpm check ` 通过测试 。
74
86
75
87
``` shell
76
88
pnpm check
@@ -88,11 +100,11 @@ GOOGLE_DRIVE_API_KEY=...
88
100
GOOGLE_DRIVE_API_SECRET=...
89
101
```
90
102
91
- ### 语言
103
+ ### 本地化
92
104
93
- 添加一个语言,
105
+ 要添加一个语言,
94
106
95
- 1 . 定义一个 ISO 语言代码 ,例如` en ` 指的是 [ kLanguageInfoTable] ( https://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/languages/internal/languages.cc ) .
107
+ 1 . 确定所要添加语言的 ISO 代码 ,例如 ` en ` ,参见 [ kLanguageInfoTable] ( https://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/languages/internal/languages.cc ) .
96
108
1 . 复制 ` src/_locales/en/messages.json.ts ` 到 ` src/_locales/${languageCode}/messages.json.ts ` 并翻译条目.
97
109
1 . 打开 ` src/scripts/dayjs-locales.ts ` 并导入 dayjs 语言环境.
98
110
1 . 要本地化网上商店的描述和屏幕截图,请创建 ` web-store-assets/${languageCode}/ ` 并添加文件。
0 commit comments