mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-13 19:46:28 +00:00
Add compile-time variable for default hostname
This commit is contained in:
parent
11887b793a
commit
f27bc63d9d
1 changed files with 4 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
||||||
import asyncdispatch, times, macros, tables, xmltree
|
import asyncdispatch, times, macros, tables, xmltree
|
||||||
import types
|
import types
|
||||||
|
|
||||||
|
const hostname {.strdefine.} = "nitter.net"
|
||||||
|
|
||||||
withCustomDb("prefs.db", "", "", ""):
|
withCustomDb("prefs.db", "", "", ""):
|
||||||
try:
|
try:
|
||||||
createTables()
|
createTables()
|
||||||
|
@ -24,11 +26,12 @@ type
|
||||||
defaultInput*: string
|
defaultInput*: string
|
||||||
placeholder*: string
|
placeholder*: string
|
||||||
|
|
||||||
|
# TODO: write DSL to simplify this
|
||||||
const prefList*: Table[string, seq[Pref]] = {
|
const prefList*: Table[string, seq[Pref]] = {
|
||||||
"Privacy": @[
|
"Privacy": @[
|
||||||
Pref(kind: input, name: "replaceTwitter",
|
Pref(kind: input, name: "replaceTwitter",
|
||||||
label: "Replace Twitter links with Nitter (blank to disable)",
|
label: "Replace Twitter links with Nitter (blank to disable)",
|
||||||
defaultInput: "nitter.net", placeholder: "Nitter hostname"),
|
defaultInput: hostname, placeholder: "Nitter hostname"),
|
||||||
|
|
||||||
Pref(kind: input, name: "replaceYouTube",
|
Pref(kind: input, name: "replaceYouTube",
|
||||||
label: "Replace YouTube links with Invidious (blank to disable)",
|
label: "Replace YouTube links with Invidious (blank to disable)",
|
||||||
|
|
Loading…
Reference in a new issue