fixed 'pref' type having + on every added line
This commit is contained in:
parent
bb2d08fe5c
commit
6cf212ecd8
2 changed files with 1 additions and 2 deletions
|
@ -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");
|
||||
|
|
2
pref.go
2
pref.go
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue