chunibyocola/sc-translator-crx

Sync settings: Exporting with custom styles enabled fails

mrsimpson opened this issue · 1 comments

I set a custom css on the theme options:

#sc-translator-root {
    font-size: 1rem;
}

When exporting the settings, the JSON is being truncated:

{
  "afterSelectingTextRegExpList": [],
  "audioPlaybackRate": 1,
  "audioVolume": 100,
  "autoInsertResult": false,
  "autoPasteInTheInputBox": false,
  "autoTranslateAfterInput": true,
  "autoTranslateWebpageHostList": [],
  "btnPosition": { "x": 5, "y": 5 },
  "contextMenus": [
    { "enabled": true, "id": "TRANSLATE_SELECTION_TEXT" },
    { "enabled": false, "id": "LISTEN_SELECTION_TEXT" },
    { "enabled": false, "id": "OPEN_SEPARATE_WINDOW" },
    { "enabled": false, "id": "OPEN_THIS_PAGE_WITH_PDF_VIEWER" },
    { "enabled": false, "id": "TRANSLATE_CURRENT_PAGE" }
  ],
  "customizeStyleText": "

^ there's nothing more coming

Consequently, settings with styles cannot be imported either.

When there is pound mark in box, this will happen. I don't know pound mark in "href" will make this happen before. Thanks for your report!