We can do it because it was only used to create a note from annotations.
No need to update schema version in Zotero client, unless using new
features when creating a note from annotations.
We added a `toggleSort()` call on the title, so then when called again
it reverses the direction. To avoid, sort by creator and then title in
the second test.
Because regex is built using a template string, \s* is actually escaped
into s*, i.e. literal "s" appearing 0 or more times. In most cases this
would mean that output can have spacing slightly off. In extreme case,
when identifier starts with letter "s", this could this could lead to
identifier being stored incorrectly.
Also adjusted tests to be more strict and mock data to cover this case.
`waitForDialog()` now returns a regular window, and
`window.document.documentElement.textContent` includes all form
elements, so this updates a test to include the checkbox label.
And fix magic numbers for content-type sniffing, which wrongly used the
Unicode replacement character (which likely just meant we were falling
back to file-extension-based detection)
Use the new PageData mechanism for character set detection, don't try to
index HTML files directly without properly detecting the charset, and
generally simplify the indexing code.
HTML files are now considered cached files that require indexing and
won't be indexed automatically in Zotero.FullText.findTextInItems(),
which breaks certain expectations, including in some tests. This will
need to be addressed.
Remove Zotero.Browser and add HiddenBrowser.jsm. Post-Fission, web/file
content loads in a separate process, so it's not possible (as best as I
can tell) to directly access the contents of a hidden browser -- it just
appears as about:blank in the parent process. We now use Mozilla's
JSWindowActor mechanism [1] to get page data, including character set
and body text for full-text indexing. We'll have to evaluate other uses
of hidden browsers to see how to handle them.
This also adds include.jsm for loading the Zotero object into a JSM.
[1] https://firefox-source-docs.mozilla.org/dom/ipc/jsactors.html
listbox is gone, but richlistbox is still here as a custom element and
works fine for cases where we don't need virtualization.
groupbox label and richlistitem styles should probably be copied to
somewhere global once tuned a bit.