自定义脚本

This commit is contained in:
微凉
2020-12-31 17:08:54 +08:00
parent 495c3f25e9
commit b394711859
2 changed files with 2 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ info:
footer_url: https://www.nn.ci #网页底部文字链接 footer_url: https://www.nn.ci #网页底部文字链接
music_img: https://img.oez.cc/2020/12/19/0f8b57866bdb5.gif #预览音乐文件时的图片 music_img: https://img.oez.cc/2020/12/19/0f8b57866bdb5.gif #预览音乐文件时的图片
check_update: true #前端是否显示更新 check_update: true #前端是否显示更新
script: #自定义脚本,可以是脚本的链接,也可以直接是脚本内容,如document.querySelector('body').style="background-image:url('https://api.mtyqx.cn/api/random.php');background-attachment:fixed"
server: server:
port: "5244" #程序监听端口 port: "5244" #程序监听端口
search: true #是否开启搜索接口,开启搜索之后密码和根目录都会失效,所以前端暂时不做搜索 search: true #是否开启搜索接口,开启搜索之后密码和根目录都会失效,所以前端暂时不做搜索

View File

@@ -10,6 +10,7 @@ type Config struct {
FooterUrl string `yaml:"footer_url" json:"footer_url"` FooterUrl string `yaml:"footer_url" json:"footer_url"`
MusicImg string `yaml:"music_img" json:"music_img"` MusicImg string `yaml:"music_img" json:"music_img"`
CheckUpdate bool `yaml:"check_update" json:"check_update"` CheckUpdate bool `yaml:"check_update" json:"check_update"`
Script string `yaml:"script" json:"script"`
} `yaml:"info"` } `yaml:"info"`
Server struct{ Server struct{
Port string `yaml:"port"`//端口 Port string `yaml:"port"`//端口