2 Star 5 Fork 2

Lemon399/TamperMonkey-CLI

forked from devaper/TamperMonkey-CLI
关闭
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
_manifest.mts 1.43 KB
一键复制 编辑 原始数据 按行查看 历史
Lemon399 提交于 7个月前 . fix: ESLint 9
import type { ScriptManifest } from "../../declarations/script-manifest.js";
import { debug, AdRules, alertLog } from "./buildConfig.mjs";
import presets from "./_preset.mjs";
const manifest: ScriptManifest = {
name: "AdBlock Script for WebView",
"name:zh-CN": "套壳油猴的广告拦截脚本",
author: "Lemon399",
version: "2.8.6",
description: "Parse ABP Cosmetic rules to CSS and apply it.",
"description:zh-CN": "将 ABP 中的元素隐藏规则转换为 CSS 使用",
resource: {},
match: ["http://*/*", "https://*/*"],
"run-at": "document-start",
grant: null,
namespace: "https://lemon399-bitbucket-io.vercel.app/",
source: [
"https://gitee.com/lemon399/tampermonkey-cli/tree/master/projects/abp_parse",
"https://bitbucket.org/lemon399/tampermonkey-cli/src/master/projects/abp_parse/",
],
connect: [],
copyright: "GPL-3.0",
license: "GPL-3.0",
};
for (const rule of presets.onlineRules) {
const domain = /:\/\/([\w.-]+?)\//.exec(rule.地址)?.[1];
if (manifest.resource) {
manifest.resource[rule.标识] = rule.地址;
}
if (
domain &&
Array.isArray(manifest.connect) &&
!manifest.connect.includes(domain)
) {
manifest.connect.push(domain);
}
}
if (debug) {
manifest.name += " Debug";
(manifest["name:zh-CN"] as string) += " 调试";
manifest.version += "c";
}
if (AdRules) {
manifest.version += "r";
}
if (alertLog) {
manifest.version += "a";
}
export default manifest;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
NodeJS
1
https://gitee.com/lemon399/tampermonkey-cli.git
git@gitee.com:lemon399/tampermonkey-cli.git
lemon399
tampermonkey-cli
TamperMonkey-CLI
master

搜索帮助