-
Notifications
You must be signed in to change notification settings - Fork 4k
/
Copy pathvalues.ts
121 lines (115 loc) · 2.89 KB
/
values.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import { defaultStore } from "./storage"
type cloaks = "default" | "google" | "wikipedia" | "canvas" | "classroom" | "powerschool";
// Where all of our values like Search Engines, WispServers & SupportedSites live.
const SearchEngines: Record<string, string> = {
ddg: "https://duckduckgo.com/?q=%s",
google: "https://google.com/search?q=%s",
bing: "https://bing.com/search?q=%s"
}
const WispServers: Record<string, string> = {
"default": (location.protocol === "https:" ? "wss://" : "ws://") + location.host + "/wisp/",
"ruby": "wss://ruby.rubynetwork.co/wisp/",
"wisp.run": "wss://wisp.run/",
"custom": defaultStore.getVal("customWispUrl")
}
const SupportedSites: Record<string, "uv" | "sj"> = {
"discord.gg": "sj",
"discord.com": "sj",
"spotify.com": "sj",
"spotify.link": "sj",
"youtube.com": "uv",
"youtu.be": "uv",
"google.com": "uv"
};
interface SettingsVals {
i18n: {
lang: "selectedLanguage",
languages: {
en: string,
jp: string
}
},
proxy: {
wispServer: string,
proxy: {
key: string,
available: {
uv: string;
sj: string;
automatic: string
}
},
searchEngine: string,
transport: {
key: string,
available: {
epoxy: string;
libcurl: string;
}
},
},
tab: {
cloak: string;
ab: string;
},
marketPlace: {
themes: string;
plugins: string;
appearance: {
video: string;
image: string;
theme: {
payload: string;
name: string;
}
}
}
}
/**
* This object allows us to access things such as the wisp server url and other things that aren't just one offs
*/
const SettingsVals: SettingsVals = {
i18n: {
lang: "selectedLanguage",
languages: {
en: "en_US",
jp: "jp"
}
},
proxy: {
wispServer: "wispServer",
proxy: {
key: "proxy",
available: {
sj: "sj",
uv: "uv",
automatic: "automatic"
}
},
searchEngine: "searchEngine",
transport: {
key: "transport",
available: {
epoxy: "epoxy",
libcurl: "libcurl"
}
}
},
tab: {
cloak: "cloak",
ab: "aboutblank"
},
marketPlace: {
themes: "themes",
plugins: "plugins",
appearance: {
video: "video",
image: "image",
theme: {
name: "themeName",
payload: "themePayload"
}
}
}
}
export { SearchEngines, WispServers, SupportedSites, SettingsVals, type cloaks }