I am encountering an issue with my user.js file that sets user_prefs()
for the new tab page in Firefox. When I have the function call on a single line with escaped quotes, it works perfectly fine. However, when the parameter is a multi-line string, it fails to work. Does anyone have any suggestions on how I can make this work as a multiline string while still maintaining readability?
Example that Works:
user_pref("browser.newtabpage.pinned", "[{\"url\":\"https://amazon.com/\",\"label\":\"amazon\",\"baseDomain\":\"amazon.com\"}...;
Example that Doesn't Work:
user_pref("browser.newtabpage.pinned",
`[
{
"url": "https://amazon.com/",
"label": "amazon"...;
},
{
"url": "https://app.ynab.com",
"label": "ynab",
"baseDomain": "app.ynab.com"
}
]`);