Commit graph

12062 commits

Author SHA1 Message Date
Abe Jellinek
ffb68f2f6c Make Library#_initSave() async to match superclass
Fixes .catch() error
2025-07-30 22:30:34 -04:00
Abe Jellinek
ce0ee4b693 Migrate Promise#return() in file.js 2025-07-30 22:30:34 -04:00
Abe Jellinek
9cad92b817 fx140: Fix ZoteroProtocolHandler URI parsing
nsIURI#pathQueryRef no longer includes the authority component. A URI
that would've had pathQueryRef '//authority/path' before will now have
pathQueryRef '/path'.

Reader seems to be functional after this change.
2025-07-30 22:30:34 -04:00
Abe Jellinek
2a077ab131 Remove Zotero.spawn()
This method relied on Bluebird and can be replaced by just awaiting an
async function.
2025-07-30 22:30:34 -04:00
Abe Jellinek
76232fda21 Replace use of Zotero.spawn() in ZoteroProtocolHandler 2025-07-30 22:30:34 -04:00
Abe Jellinek
2b0255435e Replace use of Zotero.spawn() in http.js 2025-07-30 22:30:33 -04:00
windingwind
6222737d1a fx140: Fix titlebar and window control icons 2025-07-30 22:30:33 -04:00
Abe Jellinek
488bcc484f Replace uses of Zotero.Promise.defer() as a constructor 2025-07-30 22:30:33 -04:00
Abe Jellinek
bb8a8a4362 fx140: Use import statements in MJS files 2025-07-30 22:30:33 -04:00
Abe Jellinek
c434ec40dd fx140: Remove unused bare imports 2025-07-30 22:30:33 -04:00
Abe Jellinek
c8dd6095c8 fx140: Fix remaining bare importESModule() calls 2025-07-30 22:30:33 -04:00
Abe Jellinek
9d6669eb1e fx140: Add ChromeUtils.import() shim for plugins
We can decide if we want to keep this, but it's an easy change that
seems useful for dev builds.
2025-07-30 22:30:32 -04:00
Abe Jellinek
f0ac59f3dc Add functional shim for Zotero.Promise.method()
For translation.
2025-07-30 22:30:31 -04:00
Abe Jellinek
60983dadd5 fx140: Fix other bare imports in file.js 2025-07-30 22:30:31 -04:00
Abe Jellinek
1197683ab3 fx140: Fix other bare imports in utilities_internal.js 2025-07-30 22:30:31 -04:00
Abe Jellinek
4f8a1bc968 fx140: Fix ctypes imports in utilities_internal.js 2025-07-30 22:30:31 -04:00
Abe Jellinek
a9df0424e5 fx140: Fix InlineSpellChecker import in editorInstance.js 2025-07-30 22:30:31 -04:00
Abe Jellinek
6053091563 fx140: ESMify EPUB and uses 2025-07-30 22:30:31 -04:00
Abe Jellinek
95038a7da5 fx140: ESMify RemoteTranslate and uses 2025-07-30 22:30:30 -04:00
Abe Jellinek
33d97f585e Remove duplicate require.js from windows that import include.js 2025-07-30 22:30:30 -04:00
Abe Jellinek
27bd0708b6 fx140: Use ZOTERO_CONFIG as module in standalone.js and debugViewer.js 2025-07-30 22:30:30 -04:00
Abe Jellinek
c1f018eae8 fx140: ESMify actors 2025-07-30 22:30:30 -04:00
Abe Jellinek
c607b8f455 delayGenerator(): Use native Promise#then() 2025-07-30 22:30:29 -04:00
Abe Jellinek
496e067d11 fx140: Streamer: Don't use hiddenDOMWindow
WebSocket is available globally.
2025-07-30 22:30:29 -04:00
Abe Jellinek
c16b74ec5b fx140: ESMify/asyncify preference panes 2025-07-30 22:30:29 -04:00
Abe Jellinek
32f812d515 Load each preference pane in its own scope
To eliminate conflicts between top-level const/let declarations.
2025-07-30 22:30:29 -04:00
Abe Jellinek
9be57b3110 Update ConcurrentCaller to use native promises 2025-07-30 22:30:29 -04:00
Abe Jellinek
06dc00af24 Migrate Promise#filter() in collectionTree.js 2025-07-30 22:30:29 -04:00
Abe Jellinek
4a1ca8ea96 Migrate Promise#isPending() in zotero.js 2025-07-30 22:30:28 -04:00
Abe Jellinek
37a6e0a61f Migrate Promise#delay() in schema.js 2025-07-30 22:30:28 -04:00
Abe Jellinek
c9a5a66020 fx140: Don't use hiddenDOMWindow for editable-text sizing
Causes an error on Linux.
2025-07-30 22:30:28 -04:00
Abe Jellinek
a61f7035ad fx140: Use ZOTERO_CONFIG as module in itemTree.jsx 2025-07-30 22:30:28 -04:00
Abe Jellinek
75a2c325ec Fix error on shutdown 2025-07-30 22:29:58 -04:00
Abe Jellinek
eeb94aea48 fx140: Fix more broken code 2025-07-30 22:18:36 -04:00
Abe Jellinek
ece2b59700 fx140: More progress toward startup 2025-07-30 22:18:36 -04:00
Abe Jellinek
c506e41072 fx140: Add working require.js, more progress toward startup 2025-07-30 22:18:36 -04:00
Abe Jellinek
e94ed24e20 Add Promise.defer() to Bluebird shim 2025-07-30 22:18:35 -04:00
Abe Jellinek
05d19fc6aa Replace Bluebird with async in xpcom/ 2025-07-30 22:18:35 -04:00
Abe Jellinek
8d0923f119 fx140: Remove Bluebird
All module code runs in strict mode, and that breaks Bluebird.

And add a partial shim for the simplest and most useful methods. Not
sure if we actually want that, or if we should just replace it entirely
with native methods.
2025-07-30 22:18:35 -04:00
Tom Najdek
f5907ed3b2
Expose tag split option in item tags box (#5366) 2025-07-30 22:13:19 -04:00
Abe Jellinek
78534ff2d2 FileHandlers: Infer PDF pageIndex from annotation key
And:

- Update createAnnotation() test support function to create valid EPUB
  and snapshot annotations
- Add more FileHandlers tests
2025-07-30 11:37:52 -04:00
abaevbog
c3f8ba8eb1
Fix glitchy menupopups in dialogs opened from a context menu (#5409)
Opening a dialog window via a command from a menupopup leads to
unexpected glitches in the dialog's popups (e.g., collections menu
in newCollection dialog on macOS won't go away when you click away,
and on Windows, child collections don't appear when a parent is hovered).
This is due to some kind of race condition that arises when the dialog
appears when the popup is still closing.

This workaround captures command events from menupopups, closes the popup,
stops propagation of those events, and then dispatches a copy of
that event after a delay. This gives the popup enough time to close.

Fixes: #5408
Fixes: #4891
2025-07-30 01:56:11 -04:00
Abe Jellinek
735922a2bf
If custom file handler is set to Zotero itself, use reader (#5407) 2025-07-24 12:07:27 -04:00
Abe Jellinek
27affb9f14
Cache CSL Engine for item pane header (#5405)
Once styles are initialized.
2025-07-24 12:06:49 -04:00
Adomas Venčkauskas
11014be449 Server: Add support for UTF in server headers (RFC2047) 2025-07-24 13:26:23 +03:00
Dan Stillman
b31b71304d ZFS: Don't retry download for canceled redirect with mtime/hash match
This was a regression from the switch to `Zotero.HTTP.download()`. 302
wasn't a success code, so `HTTP.download()` would throw, and since the
status wasn't set correctly on the `XMLHttpRequest` within
`HTTP.UnexpectedStatusException`, it would think it was an interrupted
S3 connection and trigger another download after a delay.
2025-07-24 01:31:25 -04:00
Dan Stillman
a370ec8979 HTTP.download(): Don't save file for non-2xx response 2025-07-24 01:28:13 -04:00
Dan Stillman
cc0b1ad0c9 HTTP.request(): Return proper status for canceled redirect 2025-07-24 01:28:12 -04:00
Abe Jellinek
8041d7d4df Complain when Notifier/Prefs observer leaks window 2025-07-23 12:03:53 -04:00
Abe Jellinek
1eb248553a Unregister Zotero_Tabs observers when window is unloaded 2025-07-23 12:03:53 -04:00