init commit

This commit is contained in:
Julian Freeman
2024-07-05 20:57:47 -04:00
parent f9731bbd3e
commit 2a38a3bf18
46 changed files with 6407 additions and 0 deletions

23
.gitignore vendored Normal file
View File

@@ -0,0 +1,23 @@
node_modules
# Output
.output
.vercel
/.svelte-kit
/build
# OS
.DS_Store
Thumbs.db
# Env
.env
.env.*
!.env.example
!.env.test
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.idea/

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
engine-strict=true

38
README.md Normal file
View File

@@ -0,0 +1,38 @@
# create-svelte
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
## Creating a project
If you're seeing this, you've probably already done this step. Congrats!
```bash
# create a new project in the current directory
npm create svelte@latest
# create a new project in my-app
npm create svelte@latest my-app
```
## Developing
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
```bash
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
```
## Building
To create a production version of your app:
```bash
npm run build
```
You can preview the production build with `npm run preview`.
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.

1608
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

25
package.json Normal file
View File

@@ -0,0 +1,25 @@
{
"name": "policies-gen",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"tauri": "tauri"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/adapter-static": "^3.0.2",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@tauri-apps/cli": "^1.6.0",
"bulma": "^1.0.1",
"svelte": "^4.2.7",
"vite": "^5.0.3"
},
"type": "module",
"dependencies": {
"@tauri-apps/api": "^1.6.0"
}
}

3
src-tauri/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
# Generated by Cargo
# will have compiled files and executables
/target/

3669
src-tauri/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

26
src-tauri/Cargo.toml Normal file
View File

@@ -0,0 +1,26 @@
[package]
name = "app"
version = "0.1.0"
description = "A Tauri App"
authors = ["you"]
license = ""
repository = ""
default-run = "app"
edition = "2021"
rust-version = "1.60"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
tauri-build = { version = "1.5.3", features = [] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.7.0", features = [] }
[features]
# this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled.
# If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes.
# DO NOT REMOVE!!
custom-protocol = [ "tauri/custom-protocol" ]

3
src-tauri/build.rs Normal file
View File

@@ -0,0 +1,3 @@
fn main() {
tauri_build::build()
}

BIN
src-tauri/icons/128x128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
src-tauri/icons/32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
src-tauri/icons/icon.icns Normal file

Binary file not shown.

BIN
src-tauri/icons/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
src-tauri/icons/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

19
src-tauri/src/main.rs Normal file
View File

@@ -0,0 +1,19 @@
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {}!", name)
}
#[tauri::command]
fn bye(name: &str) -> String {
format!("Bye, {}!", name)
}
fn main() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![greet, bye])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

66
src-tauri/tauri.conf.json Normal file
View File

@@ -0,0 +1,66 @@
{
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
"build": {
"beforeBuildCommand": "npm run build",
"beforeDevCommand": "npm run dev",
"devPath": "http://localhost:5173",
"distDir": "../build"
},
"package": {
"productName": "policies-gen",
"version": "0.1.0"
},
"tauri": {
"allowlist": {
"all": false
},
"bundle": {
"active": true,
"category": "DeveloperTool",
"copyright": "",
"deb": {
"depends": []
},
"externalBin": [],
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
],
"identifier": "com.tauri.dev",
"longDescription": "",
"macOS": {
"entitlements": null,
"exceptionDomain": "",
"frameworks": [],
"providerShortName": null,
"signingIdentity": null
},
"resources": [],
"shortDescription": "",
"targets": "all",
"windows": {
"certificateThumbprint": null,
"digestAlgorithm": "sha256",
"timestampUrl": ""
}
},
"security": {
"csp": null
},
"updater": {
"active": false
},
"windows": [
{
"fullscreen": false,
"height": 640,
"resizable": true,
"title": "浏览器策略生成器",
"width": 900
}
]
}
}

13
src/app.html Normal file
View File

@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en" data-theme="light">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
<!--<script src="https://kit.fontawesome.com/cedc22fd63.js" crossorigin="anonymous"></script>-->
</body>
</html>

View File

@@ -0,0 +1,26 @@
<script>
const browsers = [
"Chrome",
"Edge",
"Brave",
];
const icons = {
"Chrome": "images/chrome_32.png",
"Edge": "images/edge_32.png",
"Brave": "images/brave_32.png",
}
export let checked_browser = "Chrome";
</script>
<div class="tabs is-toggle">
<ul>
{#each browsers as browser}
<li class:is-active={checked_browser === browser}>
<a href="/" on:click={() => checked_browser = browser}>
<img src={icons[browser]} alt={browser} class="image is-24x24" />
<span class="pl-1">{browser}</span>
</a>
</li>
{/each}
</ul>
</div>

12
src/lib/BrowserTab.svelte Normal file
View File

@@ -0,0 +1,12 @@
<script>
import Setting from "$lib/Setting.svelte";
export let browser;
export let settings_info;
export let hidden;
</script>
<div class:is-hidden={hidden}>
{#each settings_info as setting (browser + "=" + setting["name"])}
<Setting setting_info={setting} {browser} />
{/each}
</div>

26
src/lib/Great.svelte Normal file
View File

@@ -0,0 +1,26 @@
<script>
import { invoke } from "@tauri-apps/api/tauri";
export let func;
let name = "";
let msg = "";
async function greet() {
msg = await invoke(func, { name });
}
</script>
<div class="box m-4">
<div class="columns">
<div class="column">
<input id="greet-input" placeholder="Enter a name ..." bind:value={name} class="input is-primary"/>
</div>
<div class="column">
<button on:click={greet} class="button is-primary">Click</button>
</div>
</div>
<p>{msg}</p>
</div>

42
src/lib/Setting.svelte Normal file
View File

@@ -0,0 +1,42 @@
<script>
import Switch from "$lib/Switch.svelte";
export let setting_info;
export let browser;
let enabled = setting_info["enabled"];
let allow_recommend = setting_info["allow_recommend"];
let option = setting_info["default_value"];
</script>
<div class="box">
<div class="columns mb-0">
<div class="column">
<h5 class="is-size-5 has-text-weight-bold">{setting_info["display_name"]}</h5>
</div>
<div class="column is-narrow">
<Switch bind:checked={enabled} />
</div>
</div>
{#each Object.keys(setting_info["values"]) as key (browser + setting_info["name"] + key)}
<div class="py-1">
<label class="radio">
<input type="radio"
name={browser + setting_info["name"]}
checked={setting_info["default_value"] === key}
value={key}
bind:group={option}
/>
{setting_info["values"][key]}
</label>
</div>
{/each}
{#if setting_info["allow_recommend"]}
<div class="block is-flex is-justify-content-flex-end">
<label class="checkbox">
<input type="checkbox" bind:checked={allow_recommend} />
设置为默认
</label>
</div>
{/if}
</div>

61
src/lib/Switch.svelte Normal file
View File

@@ -0,0 +1,61 @@
<script>
export let checked;
</script>
<div class="switch-container">
<label class="switch">
<input type="checkbox" class="switch-checkbox" bind:checked />
<span class="slider"></span>
</label>
</div>
<style>
/* The switch - the box around the slider */
.switch-container {
width: 51px;
height: 31px;
position: relative;
}
/* Hide default HTML checkbox */
.switch-checkbox {
opacity: 0;
width: 0;
height: 0;
position: absolute;
}
.switch {
width: 100%;
height: 100%;
display: block;
background-color: #e9e9eb;
border-radius: 16px;
cursor: pointer;
transition: all 0.2s ease-out;
}
/* The slider */
.slider {
width: 27px;
height: 27px;
position: absolute;
left: calc(50% - 27px / 2 - 10px);
top: calc(50% - 27px / 2);
border-radius: 50%;
background: #FFFFFF;
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 3px 1px rgba(0, 0, 0, 0.06);
transition: all 0.2s ease-out;
cursor: pointer;
}
.switch:has( > .switch-checkbox:checked) {
background-color: #4258ff;
}
.switch:has( > .switch-checkbox:checked) .slider {
left: calc(50% - 27px / 2 + 10px);
top: calc(50% - 27px / 2);
}
</style>

1
src/lib/index.js Normal file
View File

@@ -0,0 +1 @@
// place files you want to import through the `$lib` alias in this folder.

View File

@@ -0,0 +1,225 @@
{
"SingleValues": [
{
"name": "AutofillAddressEnabled",
"values": {
"0": "禁止使用“自动填充”功能填写地址",
"1": "自动填充地址信息"
},
"default_value": "0",
"display_name": "自动填充地址信息",
"allow_recommend": true,
"enabled": true
},
{
"name": "AutofillCreditCardEnabled",
"values": {
"0": "禁止使用“自动填充”功能填写信用卡信息",
"1": "允许使用“自动填充”功能填写信用卡信息"
},
"default_value": "0",
"display_name": "允许使用“自动填充”功能填写信用卡信息",
"allow_recommend": true,
"enabled": true
},
{
"name": "DefaultGeolocationSetting",
"values": {
"1": "允许网站跟踪用户的地理位置",
"2": "不允许任何网站跟踪用户的地理位置",
"3": "每次网站尝试跟踪用户的地理位置时都询问我"
},
"default_value": "2",
"display_name": "默认地理位置设置",
"allow_recommend": true,
"enabled": true
},
{
"name": "PasswordManagerEnabled",
"values": {
"0": "禁止使用密码管理器保存密码",
"1": "允许使用密码管理器保存密码"
},
"default_value": "0",
"display_name": "允许将密码保存到密码管理器",
"allow_recommend": true,
"enabled": true
},
{
"name": "PaymentMethodQueryEnabled",
"values": {
"0": "始终告诉网站,没有任何已保存的付款方式",
"1": "允许网站检查用户是否有已保存的付款方式"
},
"default_value": "0",
"display_name": "允许网站查询可用的付款方式",
"allow_recommend": true,
"enabled": true
},
{
"name": "PrivacySandboxAdMeasurementEnabled",
"values": {
"0": "为您的用户停用 Privacy Sandbox 广告衡量设置",
"1": "允许用户在其设备上开启或关闭 Privacy Sandbox 广告衡量设置"
},
"default_value": "0",
"display_name": "选择是否可以停用 Privacy Sandbox 广告衡量设置",
"allow_recommend": true,
"enabled": true
},
{
"name": "PrivacySandboxAdTopicsEnabled",
"values": {
"0": "为您的用户停用 Privacy Sandbox 广告主题设置",
"1": "允许用户在其设备上开启或关闭 Privacy Sandbox 广告主题设置"
},
"default_value": "0",
"display_name": "选择是否可以停用 Privacy Sandbox 广告主题设置",
"allow_recommend": true,
"enabled": true
},
{
"name": "PrivacySandboxPromptEnabled",
"values": {
"0": "不向用户显示 Privacy Sandbox 提示",
"1": "允许 Google Chrome 确定是否显示 Privacy Sandbox 提示"
},
"default_value": "0",
"display_name": "选择是否可向用户显示 Privacy Sandbox 提示",
"allow_recommend": true,
"enabled": true
},
{
"name": "PrivacySandboxSiteEnabledAdsEnabled",
"values": {
"0": "为您的用户停用 Privacy Sandbox 网站建议采用的广告设置",
"1": "允许用户在其设备上开启或关闭 Privacy Sandbox 网站建议采用的广告设置"
},
"default_value": "0",
"display_name": "选择是否可以停用 Privacy Sandbox 网站建议采用的广告设置",
"allow_recommend": true,
"enabled": true
},
{
"name": "TorDisabled",
"values": {
"0": "开启 Tor",
"1": "禁用 Tor"
},
"default_value": "1",
"display_name": "Tor",
"allow_recommend": false,
"enabled": true
},
{
"name": "BraveRewardsDisabled",
"values": {
"0": "开启 Brave 奖励",
"1": "禁用 Brave 奖励"
},
"default_value": "1",
"display_name": "Brave 奖励",
"allow_recommend": false,
"enabled": true
},
{
"name": "BraveWalletDisabled",
"values": {
"0": "开启 Brave 钱包",
"1": "禁用 Brave 钱包"
},
"default_value": "1",
"display_name": "Brave 钱包",
"allow_recommend": false,
"enabled": true
},
{
"name": "BraveVPNDisabled",
"values": {
"0": "开启 Brave VPN",
"1": "禁用 Brave VPN"
},
"default_value": "1",
"display_name": "Brave VPN",
"allow_recommend": false,
"enabled": true
}
],
"ExtensionSettings": [
{
"id": "cjpalhdlnbpafiamejdnhcphjbkeiagm",
"name": "uBlock Origin",
"description": "一款高效的网络请求过滤工具,占用极低的内存和 CPU。",
"modes": {
"blocked": "阻止安装",
"allowed": "允许安装",
"force_installed": "强制安装",
"normal_installed": "默认安装",
"removed": "移除"
},
"default_mode": "normal_installed",
"update_url": "https://clients2.google.com/service/update2/crx",
"enabled": true
},
{
"id": "cfnpidifppmenkapgihekkeednfoenal",
"name": "TrafficLight",
"description": "Bitdefender TrafficLight adds a strong and non-intrusive layer of security to your browsing experience.",
"modes": {
"blocked": "阻止安装",
"allowed": "允许安装",
"force_installed": "强制安装",
"normal_installed": "默认安装",
"removed": "移除"
},
"default_mode": "normal_installed",
"update_url": "https://clients2.google.com/service/update2/crx",
"enabled": true
},
{
"id": "ghgabhipcejejjmhhchfonmamedcbeod",
"name": "Click&Clean",
"description": "当浏览器关闭时,这款应用程序删除你的浏览历史,防止他人跟踪你的网上活动。",
"modes": {
"blocked": "阻止安装",
"allowed": "允许安装",
"force_installed": "强制安装",
"normal_installed": "默认安装",
"removed": "移除"
},
"default_mode": "normal_installed",
"update_url": "https://clients2.google.com/service/update2/crx",
"enabled": true
},
{
"id": "aapbdbdomjkkjkaonfhkkikfgjllcleb",
"name": "Google 翻译",
"description": "浏览网页时可轻松查看翻译版本。由Google翻译小组提供。",
"modes": {
"blocked": "阻止安装",
"allowed": "允许安装",
"force_installed": "强制安装",
"normal_installed": "默认安装",
"removed": "移除"
},
"default_mode": "normal_installed",
"update_url": "https://clients2.google.com/service/update2/crx",
"enabled": false
},
{
"id": "mlpapfcfoakknnhkfpencomejbcecdfp",
"name": "IP Domain Country Flag",
"description": "Shows country flag and other IP / domain information in the location bar.",
"modes": {
"blocked": "阻止安装",
"allowed": "允许安装",
"force_installed": "强制安装",
"normal_installed": "默认安装",
"removed": "移除"
},
"default_mode": "normal_installed",
"update_url": "https://clients2.google.com/service/update2/crx",
"enabled": false
}
]
}

View File

@@ -0,0 +1,181 @@
{
"SingleValues": [
{
"name": "AutofillAddressEnabled",
"values": {
"0": "禁止使用“自动填充”功能填写地址",
"1": "自动填充地址信息"
},
"default_value": "0",
"display_name": "自动填充地址信息",
"allow_recommend": true,
"enabled": true
},
{
"name": "AutofillCreditCardEnabled",
"values": {
"0": "禁止使用“自动填充”功能填写信用卡信息",
"1": "允许使用“自动填充”功能填写信用卡信息"
},
"default_value": "0",
"display_name": "允许使用“自动填充”功能填写信用卡信息",
"allow_recommend": true,
"enabled": true
},
{
"name": "DefaultGeolocationSetting",
"values": {
"1": "允许网站跟踪用户的地理位置",
"2": "不允许任何网站跟踪用户的地理位置",
"3": "每次网站尝试跟踪用户的地理位置时都询问我"
},
"default_value": "2",
"display_name": "默认地理位置设置",
"allow_recommend": true,
"enabled": true
},
{
"name": "PasswordManagerEnabled",
"values": {
"0": "禁止使用密码管理器保存密码",
"1": "允许使用密码管理器保存密码"
},
"default_value": "0",
"display_name": "允许将密码保存到密码管理器",
"allow_recommend": true,
"enabled": true
},
{
"name": "PaymentMethodQueryEnabled",
"values": {
"0": "始终告诉网站,没有任何已保存的付款方式",
"1": "允许网站检查用户是否有已保存的付款方式"
},
"default_value": "0",
"display_name": "允许网站查询可用的付款方式",
"allow_recommend": true,
"enabled": true
},
{
"name": "PrivacySandboxAdMeasurementEnabled",
"values": {
"0": "为您的用户停用 Privacy Sandbox 广告衡量设置",
"1": "允许用户在其设备上开启或关闭 Privacy Sandbox 广告衡量设置"
},
"default_value": "0",
"display_name": "选择是否可以停用 Privacy Sandbox 广告衡量设置",
"allow_recommend": true,
"enabled": true
},
{
"name": "PrivacySandboxAdTopicsEnabled",
"values": {
"0": "为您的用户停用 Privacy Sandbox 广告主题设置",
"1": "允许用户在其设备上开启或关闭 Privacy Sandbox 广告主题设置"
},
"default_value": "0",
"display_name": "选择是否可以停用 Privacy Sandbox 广告主题设置",
"allow_recommend": true,
"enabled": true
},
{
"name": "PrivacySandboxPromptEnabled",
"values": {
"0": "不向用户显示 Privacy Sandbox 提示",
"1": "允许 Google Chrome 确定是否显示 Privacy Sandbox 提示"
},
"default_value": "0",
"display_name": "选择是否可向用户显示 Privacy Sandbox 提示",
"allow_recommend": true,
"enabled": true
},
{
"name": "PrivacySandboxSiteEnabledAdsEnabled",
"values": {
"0": "为您的用户停用 Privacy Sandbox 网站建议采用的广告设置",
"1": "允许用户在其设备上开启或关闭 Privacy Sandbox 网站建议采用的广告设置"
},
"default_value": "0",
"display_name": "选择是否可以停用 Privacy Sandbox 网站建议采用的广告设置",
"allow_recommend": true,
"enabled": true
}
],
"ExtensionSettings": [
{
"id": "cjpalhdlnbpafiamejdnhcphjbkeiagm",
"name": "uBlock Origin",
"description": "一款高效的网络请求过滤工具,占用极低的内存和 CPU。",
"modes": {
"blocked": "阻止安装",
"allowed": "允许安装",
"force_installed": "强制安装",
"normal_installed": "默认安装",
"removed": "移除"
},
"default_mode": "normal_installed",
"update_url": "https://clients2.google.com/service/update2/crx",
"enabled": true
},
{
"id": "cfnpidifppmenkapgihekkeednfoenal",
"name": "TrafficLight",
"description": "Bitdefender TrafficLight adds a strong and non-intrusive layer of security to your browsing experience.",
"modes": {
"blocked": "阻止安装",
"allowed": "允许安装",
"force_installed": "强制安装",
"normal_installed": "默认安装",
"removed": "移除"
},
"default_mode": "normal_installed",
"update_url": "https://clients2.google.com/service/update2/crx",
"enabled": true
},
{
"id": "ghgabhipcejejjmhhchfonmamedcbeod",
"name": "Click&Clean",
"description": "当浏览器关闭时,这款应用程序删除你的浏览历史,防止他人跟踪你的网上活动。",
"modes": {
"blocked": "阻止安装",
"allowed": "允许安装",
"force_installed": "强制安装",
"normal_installed": "默认安装",
"removed": "移除"
},
"default_mode": "normal_installed",
"update_url": "https://clients2.google.com/service/update2/crx",
"enabled": true
},
{
"id": "aapbdbdomjkkjkaonfhkkikfgjllcleb",
"name": "Google 翻译",
"description": "浏览网页时可轻松查看翻译版本。由Google翻译小组提供。",
"modes": {
"blocked": "阻止安装",
"allowed": "允许安装",
"force_installed": "强制安装",
"normal_installed": "默认安装",
"removed": "移除"
},
"default_mode": "normal_installed",
"update_url": "https://clients2.google.com/service/update2/crx",
"enabled": false
},
{
"id": "mlpapfcfoakknnhkfpencomejbcecdfp",
"name": "IP Domain Country Flag",
"description": "Shows country flag and other IP / domain information in the location bar.",
"modes": {
"blocked": "阻止安装",
"allowed": "允许安装",
"force_installed": "强制安装",
"normal_installed": "默认安装",
"removed": "移除"
},
"default_mode": "normal_installed",
"update_url": "https://clients2.google.com/service/update2/crx",
"enabled": false
}
]
}

271
src/lib/templates/edge.json Normal file
View File

@@ -0,0 +1,271 @@
{
"SingleValues": [
{
"name": "AlternateErrorPagesEnabled",
"values": {
"0": "不会调用 Web 服务,并且将显示标准错误页",
"1": "使用 Web 服务针对网络错误生成 URL 和搜索建议"
},
"default_value": "0",
"display_name": "找不到网页时建议类似页面",
"allow_recommend": true,
"enabled": true
},
{
"name": "AutofillAddressEnabled",
"values": {
"0": "不会建议或填写地址信息",
"1": "使用以前存储的信息自动填写 Web 表单中的地址信息"
},
"default_value": "0",
"display_name": "启用地址自动填充",
"allow_recommend": true,
"enabled": true
},
{
"name": "AutofillCreditCardEnabled",
"values": {
"0": "不会建议、填充或推荐新的付款方式",
"1": "允许用户使用以前存储的信息在 Web 窗体中自动完成信用卡或借记卡等付款方式"
},
"default_value": "0",
"display_name": "启用付款方式自动填充",
"allow_recommend": true,
"enabled": true
},
{
"name": "AutofillMembershipsEnabled",
"values": {
"0": "无法在使用 Microsoft Edge 时自动保存其成员身份信息并用于填写表单字段",
"1": "自动保存其成员身份信息,并在使用 Microsoft Edge 时用于填写表单字段"
},
"default_value": "0",
"display_name": "保存和填充成员身份",
"allow_recommend": true,
"enabled": true
},
{
"name": "ConfigureDoNotTrack",
"values": {
"0": "不会发送请求",
"1": "始终向要求跟踪信息的网站发送 Do Not Track 请求"
},
"default_value": "1",
"display_name": "配置 Do Not Track",
"allow_recommend": true,
"enabled": true
},
{
"name": "ControlDefaultStateOfAllowExtensionFromOtherStoresSettingEnabled",
"values": {
"0": "无效果",
"1": "启用来自其他商店的允许扩展"
},
"default_value": "1",
"display_name": "配置“允许来自其他商店的扩展”设置的默认状态",
"allow_recommend": true,
"enabled": true
},
{
"name": "DefaultGeolocationSetting",
"values": {
"1": "允许网站跟踪用户的物理位置",
"2": "不允许任何网站跟踪用户的物理位置",
"3": "每当网站想要跟踪用户的物理位置时询问"
},
"default_value": "2",
"display_name": "默认地理位置设置",
"allow_recommend": true,
"enabled": true
},
{
"name": "DiagnosticData",
"values": {
"0": "关闭",
"1": "必需数据",
"2": "可选数据"
},
"default_value": "1",
"display_name": "发送有关浏览器使用情况的必需和可选诊断数据",
"allow_recommend": true,
"enabled": true
},
{
"name": "EdgeShoppingAssistantEnabled",
"values": {
"0": "不会自动针对零售域应用价格比较、优惠券、折扣和快速结帐等购物功能",
"1": "价格比较、优惠券、折扣和快速结帐等购物功能将自动应用于零售域"
},
"default_value": "0",
"display_name": "已启用在 Microsoft Edge 中购物的功能",
"allow_recommend": true,
"enabled": true
},
{
"name": "EdgeWalletCheckoutEnabled",
"values": {
"0": "用户在 Microsoft Edge 上购物时无法使用电子钱包结帐",
"1": "可以选择在 Microsoft Edge 上购物时是否使用电子钱包结帐"
},
"default_value": "0",
"display_name": "启用电子钱包结帐功能",
"allow_recommend": true,
"enabled": true
},
{
"name": "PasswordManagerEnabled",
"values": {
"0": "无法保存并添加新密码",
"1": "可以在 Microsoft Edge 中保存并添加其密码"
},
"default_value": "0",
"display_name": "允许将密码保存到密码管理器",
"allow_recommend": true,
"enabled": true
},
{
"name": "PaymentMethodQueryEnabled",
"values": {
"0": "禁止检查可用的付款方式",
"1": "可以检查用户是否保存了付款方式"
},
"default_value": "0",
"display_name": "允许网站查询可用的付款方式",
"allow_recommend": true,
"enabled": true
},
{
"name": "PersonalizationReportingEnabled",
"values": {
"0": "禁止将浏览数据发送给 Microsoft",
"1": "允许将浏览数据发送给 Microsoft"
},
"default_value": "0",
"display_name": "允许将浏览数据发送给 Microsoft",
"allow_recommend": true,
"enabled": true
},
{
"name": "PrimaryPasswordSetting",
"values": {
"0": "自动",
"1": "使用设备密码",
"2": "使用自定义主密码",
"3": "自动填充关闭"
},
"default_value": "3",
"display_name": "配置要求用户在使用密码自动填充时输入设备密码的设置",
"allow_recommend": true,
"enabled": true
},
{
"name": "RelatedMatchesCloudServiceEnabled",
"values": {
"0": "可以在受限网站上的“查找页面”中接收相关匹配项",
"1": "可以在所有网站上的“查找页面”中接收相关匹配项"
},
"default_value": "0",
"display_name": "在“在页面查找”中配置相关匹配项",
"allow_recommend": true,
"enabled": true
},
{
"name": "ResolveNavigationErrorsUseWebService",
"values": {
"0": "使用本机 API 尝试解决网络连接和导航问题",
"1": "使用 Web 服务执行网络连接测试"
},
"default_value": "0",
"display_name": "启用使用 Web 服务解决导航错误",
"allow_recommend": true,
"enabled": true
},
{
"name": "ShowMicrosoftRewards",
"values": {
"0": "禁用 Microsoft Rewards 体验",
"1": "开启 Microsoft Rewards 体验"
},
"default_value": "0",
"display_name": "展示 Microsoft Rewards体验",
"allow_recommend": true,
"enabled": true
},
{
"name": "TabServicesEnabled",
"values": {
"0": "不会向选项卡组织服务发送任何数据",
"1": "用户创建选项卡组或激活某些“组相似选项卡”功能时Microsoft Edge 会将选项卡数据发送到其选项卡组织服务"
},
"default_value": "0",
"display_name": "启用选项卡组织建议",
"allow_recommend": true,
"enabled": true
}
],
"ExtensionSettings": [
{
"id": "odfafepnkmbhccpbejgmiehpchacaeak",
"name": "uBlock Origin",
"description": "一款高效的网络请求过滤工具,占用极低的内存和 CPU。",
"modes": {
"blocked": "阻止安装",
"allowed": "允许安装",
"force_installed": "强制安装",
"normal_installed": "默认安装",
"removed": "移除"
},
"default_mode": "normal_installed",
"update_url": "https://edge.microsoft.com/extensionwebstorebase/v1/crx",
"enabled": true
},
{
"id": "dacknjoogbepndbemlmljdobinliojbk",
"name": "Click&Clean",
"description": "当浏览器关闭时,这款应用程序删除你的浏览历史,防止他人跟踪你的网上活动。",
"modes": {
"blocked": "阻止安装",
"allowed": "允许安装",
"force_installed": "强制安装",
"normal_installed": "默认安装",
"removed": "移除"
},
"default_mode": "normal_installed",
"update_url": "https://edge.microsoft.com/extensionwebstorebase/v1/crx",
"enabled": true
},
{
"id": "mhjnajgcbhkdhnfgcfjimgdddjjondoc",
"name": "IP Domain Country Flag",
"description": "Shows country flag and other IP / domain information in the location bar.",
"modes": {
"blocked": "阻止安装",
"allowed": "允许安装",
"force_installed": "强制安装",
"normal_installed": "默认安装",
"removed": "移除"
},
"default_mode": "normal_installed",
"update_url": "https://edge.microsoft.com/extensionwebstorebase/v1/crx",
"enabled": false
}
],
"SearchEngines": [
{
"number": "1",
"name": "Google",
"keyword": "google.com",
"is_default": true,
"search_url": "{google:baseURL}search?q={searchTerms}&{google:RLZ}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchboxStats}{google:searchFieldtrialParameter}{google:iOSSearchLanguage}{google:prefetchSource}{google:searchClient}{google:sourceId}{google:contextualSearchVersion}ie={inputEncoding}",
"enabled": true
},
{
"number": "2",
"name": "Bing",
"keyword": "bing.com",
"is_default": false,
"search_url": "{bing:baseURL}search?q={searchTerms}&{bing:cvid}{bing:msb}{google:assistedQueryStats}",
"enabled": false
}
]
}

2
src/routes/+layout.js Normal file
View File

@@ -0,0 +1,2 @@
export const prerender = true;
export const ssr = false;

View File

@@ -0,0 +1,9 @@
<script>
import "bulma/css/bulma.css";
</script>
<slot>
</slot>

38
src/routes/+page.svelte Normal file
View File

@@ -0,0 +1,38 @@
<script>
import BrowserSwitch from "$lib/BrowserSwitch.svelte";
import BrowserTab from "$lib/BrowserTab.svelte";
import { SingleValues as chrome_settings } from "$lib/templates/chrome.json";
import { SingleValues as edge_settings } from "$lib/templates/edge.json";
import { SingleValues as brave_settings } from "$lib/templates/brave.json";
const settings_dic = {
"Chrome": chrome_settings,
"Edge": edge_settings,
"Brave": brave_settings,
}
let checked_browser = "Chrome";
$: should_hidden = {
"Chrome": checked_browser !== "Chrome",
"Edge": checked_browser !== "Edge",
"Brave": checked_browser !== "Brave",
}
</script>
<div class="m-4">
<div class="my-4">
<BrowserSwitch bind:checked_browser />
</div>
<div>
{#each Object.keys(settings_dic) as browser (browser + "Tab")}
<BrowserTab browser={browser}
settings_info={settings_dic[browser]}
bind:hidden={should_hidden[browser]}
/>
{/each}
</div>
</div>

BIN
static/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/images/brave_32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/images/chrome_32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/images/edge_32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

13
svelte.config.js Normal file
View File

@@ -0,0 +1,13 @@
import adapter from '@sveltejs/adapter-static';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter()
}
};
export default config;

6
vite.config.js Normal file
View File

@@ -0,0 +1,6 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()]
});