|
@@ -32,7 +32,7 @@ export async function loadFeatureConf(): Promise<FeatureConfig> {
|
|
|
return featuresCache = defConf;
|
|
|
}
|
|
|
|
|
|
- return Object.freeze(featureConf ? JSON.parse(featureConf) : {});
|
|
|
+ return featuresCache = Object.freeze(featureConf ? JSON.parse(featureConf) : defConf);
|
|
|
}
|
|
|
catch(err) {
|
|
|
await setDefaultFeatConf();
|
|
@@ -48,7 +48,7 @@ export function saveFeatureConf(featureConf: FeatureConfig) {
|
|
|
if(!featureConf || typeof featureConf != "object")
|
|
|
throw new TypeError("Feature config not provided or invalid");
|
|
|
|
|
|
- log("");
|
|
|
+ log("Saving new feature config:", featureConf);
|
|
|
featuresCache = { ...featureConf };
|
|
|
return GM.setValue("betterytm-config", JSON.stringify(featureConf));
|
|
|
}
|