github gildas-lormeau/SingleFile v1.37.0

21 minutes ago

Changes

  • Added the %switch<value|case1|result1|case2|result2|...|default> function in the filename template: it compares value with each case and returns the matching result, or default when no case matches, e.g. %switch<{url-hostname-domain}|bbc|BBC|imdb|IMDb|%capitalize<{url-hostname-domain}>>; the help page documents it (#2052)
  • The script embedded in annotated pages to display, move, resize and collapse the notes is now built from single-file-core (single-file-notes.js) and minified, instead of being generated from the source of the editor
  • Pages using many web fonts are processed faster when the option "remove alternative fonts to the ones displayed" is enabled: the parsed src lists and the font details are cached (gildas-lormeau/single-file-core#12)

Fixes

  • A page auto-saved on unload from a tab being closed is saved again: the content was received without the tab of the sender, the save failed and its entry stayed in the pending saves with the "processing" status (#2053)
  • The first auto-save of a browser session is removed from the pending saves when the page has been saved (the task id 0 was read as "no task"), and the auto-save entries of pages that went away without sending their content are removed when the tab is closed, displays another page, or does not answer (#2053)
  • The unload listener of the auto-save is registered as soon as the options are received instead of on DOMContentLoaded
  • With "auto-save after page load or on page unload" and "auto-save on tab removed" both enabled, a page left before being saved is no longer lost; with "auto-save on page unload" and "auto-save on tab removed" both enabled, closing the tab no longer saves the page twice
  • With "auto-save on tab discard" enabled, hiding a tab no longer leaves the data-single-file-* marker attributes of the capture in the page, the capture kept for a hidden tab is released when the tab is closed, and a tab discarded before its capture is received is saved
  • In pages saved with notes, releasing the mouse after resizing or moving a note no longer leaves the note following the pointer: the embedded script referenced a function that only exists in the editor (#2054, regression from 2023; the pages already saved must be opened in the editor and saved again to get the fixed script)
  • In the editor, removing the selected note no longer keeps it as the selected note, adding a note selects it, and the anchor of a note is no longer looked for in the notes or in the masks
  • With "Deferred content > keep the zoom level", the sizes and positions reported to the page are scaled like the page, so pages that lay out their content from them are saved whole (#1919)
  • The option "skip the save if the file exists" only applies to the files saved in the download folder: saves to the annotation editor, the clipboard and the companion are no longer cancelled by a file of the same name in the download history, and a skipped save no longer opens the saved page nor requests a proof of existence
  • Updated single-file-core to 1.12.0

Don't miss a new SingleFile release

NewReleases is sending notifications on new releases.