Refactor hostname to be a runtime option
Add a `hostname` field under Server in your conf file, see the updated nitter.conf in the repo for an example. The compile-time option (-d:hostname) is no longer used.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import macros, tables, strutils, xmltree
|
||||
|
||||
const hostname {.strdefine.} = "nitter.net"
|
||||
|
||||
type
|
||||
PrefKind* = enum
|
||||
checkbox, select, input
|
||||
@@ -24,7 +22,7 @@ const prefList*: OrderedTable[string, seq[Pref]] = {
|
||||
"Privacy": @[
|
||||
Pref(kind: input, name: "replaceTwitter",
|
||||
label: "Replace Twitter links with Nitter (blank to disable)",
|
||||
defaultInput: hostname, placeholder: "Nitter hostname"),
|
||||
defaultInput: "nitter.net", placeholder: "Nitter hostname"),
|
||||
|
||||
Pref(kind: input, name: "replaceYouTube",
|
||||
label: "Replace YouTube links with Invidious (blank to disable)",
|
||||
|
||||
Reference in New Issue
Block a user