@@ -21,7 +21,6 @@ func initSettings() {
21
21
if err != nil {
22
22
utils .Log .Fatalf ("failed get settings: %+v" , err )
23
23
}
24
-
25
24
for i := range settings {
26
25
if ! isActive (settings [i ].Key ) && settings [i ].Flag != model .DEPRECATED {
27
26
settings [i ].Flag = model .DEPRECATED
@@ -42,7 +41,7 @@ func initSettings() {
42
41
continue
43
42
}
44
43
// save
45
- if stored != nil && item .Key != conf .VERSION {
44
+ if stored != nil && item .Key != conf .VERSION && stored . Value != item . DeprecatedValue {
46
45
item .Value = stored .Value
47
46
}
48
47
if stored == nil || * item != * stored {
@@ -129,7 +128,7 @@ func InitialSettings() []model.SettingItem {
129
128
// global settings
130
129
{Key : conf .HideFiles , Value : "/\\ /README.md/i" , Type : conf .TypeText , Group : model .GLOBAL },
131
130
{Key : "package_download" , Value : "true" , Type : conf .TypeBool , Group : model .GLOBAL },
132
- {Key : conf .CustomizeHead , Value : `<script src="https://polyfill.io/v3/polyfill.min.js?features=String.prototype.replaceAll"></script>` , Type : conf .TypeText , Group : model .GLOBAL , Flag : model .PRIVATE },
131
+ {Key : conf .CustomizeHead , DeprecatedValue : `<script src="https://polyfill.io/v3/polyfill.min.js?features=String.prototype.replaceAll"></script>` , Type : conf .TypeText , Group : model .GLOBAL , Flag : model .PRIVATE },
133
132
{Key : conf .CustomizeBody , Type : conf .TypeText , Group : model .GLOBAL , Flag : model .PRIVATE },
134
133
{Key : conf .LinkExpiration , Value : "0" , Type : conf .TypeNumber , Group : model .GLOBAL , Flag : model .PRIVATE },
135
134
{Key : conf .SignAll , Value : "true" , Type : conf .TypeBool , Group : model .GLOBAL , Flag : model .PRIVATE },
0 commit comments