fixed 'pref' type having + on every added line

This commit is contained in:
partisan 2025-01-18 22:32:13 +01:00
parent bb2d08fe5c
commit 6cf212ecd8
2 changed files with 1 additions and 2 deletions

View file

@ -2,6 +2,5 @@ t: pref
i: /browser/app/profile/firefox.js
o: /browser/app/profile/firefox.js
-pref("browser.startup.homepage", "about:home");
+pref("browser.startup.homepage", "https://qgato.xyz");
+pref("browser.search.defaultenginename", "QGato");

View file

@ -33,7 +33,7 @@ func applyPrefModifications(targetFilePath string, modifications []string) error
end := strings.LastIndex(mod, ")")
if start > 0 && end > start {
key := strings.TrimSpace(mod[start+1 : end]) // Extract the preference key
modMap[key] = mod // Full modification line
modMap[key] = strings.TrimPrefix(mod, "+") // Full modification line
}
}
}