Commit graph

9019 commits

Author SHA1 Message Date
Abe Jellinek
2639981dda
Block remote content when indexing HTML file (#3157) 2023-06-12 23:43:18 -04:00
Abe Jellinek
30624c6aba Preferences: Remove extraDTD pane option
Include FTL localizations directly in your pane XHTML fragment:

    <linkset>
        <html:link rel="localization" href="make-it-red.ftl"/>
    </linkset>

Fixes #3161
2023-06-12 13:25:20 -04:00
Abe Jellinek
75df7bcbdd Item Pane: Allow "long" fields to wrap
Aligns with Z6 behavior.

Fixes #3163
2023-06-12 12:38:30 -04:00
Dan Stillman
ffd6a988e1 Await plugin bootstrap methods 2023-06-12 01:39:57 -04:00
Dan Stillman
027060ba86 Log reason when calling bootstrap methods 2023-06-07 01:58:18 -04:00
Abe Jellinek
6106e379c9 Plugins: Uninstall immediately but allow undo
When you uninstall a plugin through the UI, XPIInstall:
1. Sets the plugin's `pendingUninstall` to true
2. Calls our onUninstalling() method
3. Waits for the Add-ons window to be closed
4. Actually uninstalls the plugin
5. Calls our onUninstalled() method

If you undo the uninstallation between steps 2 and 3, the remaining steps
instead look like:
3. Sets the plugin's `pendingUninstall` to false
4. Calls our onOperationCancelled() method

This commit changes our implementation of the bootstrapped plugin lifecycle so
that the shutdown and uninstall hooks are called from onUninstalling() (step 2).
If you close the Add-ons window without undoing, nothing more happens. The
plugin remains uninstalled. If you undo before closing, though, we call the
plugin's lifestyle hooks just as if it had been newly installed (unless it was
disabled before uninstallation, in which case we call install but not startup).

This mirrors the behavior of Firefox WebExtensions and makes things work more
like you'd expect: uninstalling a plugin immediately deactivates it, and undoing
activates it again.
2023-06-06 16:14:33 -04:00
Abe Jellinek
a28b949dc1 Preferences: Attach preferences to all added nodes in tree
mutation.addedNodes only contains the top-level nodes, so we need to query for
all nodes with preference attributes in their trees.
2023-06-06 14:00:57 -04:00
Martynas Bagdonas
bb85e11a92 Fix tab selection when closing a tab nearby
Fixes #3151
2023-06-06 19:42:34 +03:00
Martynas Bagdonas
785dcb30c3 Ensure that note is created when inserting an image
Fixes #3155
2023-06-06 16:22:19 +03:00
Abe Jellinek
5e41b3ab4d Place word processor plugin installers under heading and fix spacing
Fixes #3147
2023-06-05 10:52:04 -04:00
Abe Jellinek
d077388616 Fix WebDAV settings
- Fix mistaken reference to event.target (instead of currentTarget) in sync
  function
- Move sync functions to fields for easier debugging - can't set a breakpoint
  inside an inner function in the Firefox debugger

Fixes #3142
2023-06-05 10:32:37 -04:00
Dan Stillman
ea1e28c7b7 Update translate submodule 2023-06-01 06:08:40 -04:00
Dan Stillman
fd7cf71043 fx-compat: Fix Page textbox in classic citation dialog 2023-05-30 17:32:21 -04:00
Dan Stillman
d5a584c28b Don't close window with Cmd-W on first tab if other tabs are open
Closes #2572
2023-05-29 06:00:31 -04:00
Dan Stillman
7c902d40a9 Timer updates
- Switch to Mozilla's Timer.jsm for timer functions in XPCOM scope
- Add setInterval/clearInterval/requestIdleCallback/cancelIdleCallback
- Add all timer functions to plugins sandbox
2023-05-28 04:51:21 -04:00
Dan Stillman
773a89b0f3 Fix title of import wizard 2023-05-27 06:42:11 -04:00
Dan Stillman
77241d1c71 Fix test in collection tree selectLibrary()
getRowIndexByID() can only return an integer or false
2023-05-27 02:34:03 -04:00
Dan Stillman
cd20df8d74 Fix sw_vers being run repeatedly in View Output window on macOS
Fixes #3136
2023-05-26 06:45:23 -04:00
Dan Stillman
3f739fc1b4 "Capitalize" → "Fix Case" for creator context menu
https://forums.zotero.org/discussion/105117/zotero-7-thank-you-for-adding-right-click-case-change-for-author-names
2023-05-25 21:56:31 -04:00
Dan Stillman
b2b768cd4b Fix fileQuitItemUnix is null error in PDF reader window 2023-05-25 21:56:31 -04:00
Abe Jellinek
4cfe682367
Remove outdated startup error messages (#3138) 2023-05-25 21:38:12 -04:00
Abe Jellinek
42572efca9 Fix error when adding link attachment with unparseable URL
https://forums.zotero.org/discussion/105158/zotero-7-beta-attach-link-to-uri-logosres-does-not-work-any-longer
2023-05-25 18:45:48 +03:00
Abe Jellinek
a4c3f5267b Fix ScienceDirect PDF downloads
ScienceDirect sometimes puts the `name` directive at the end of the Content-Type
header instead of in Content-Disposition. That isn't strictly spec-approved, but
there are other directives (`charset` and `boundary`) that can also be appended
to Content-Type per the spec. We want to strip them before looking for handlers.

https://forums.zotero.org/discussion/105194/sciencedirect-pdf-downloads-not-working-zotero-7
2023-05-25 17:57:32 +03:00
Dan Stillman
6e2ec2300d Fix checking for Firefox profiles high up in filesystem
This was triggering an erroneous warning dialog about a failure to check
for Firefox profiles during Linux tests (where the profile is at
something like /tmp/tmp.l5phnqSxBH/Zotero), but it could also affect a
custom profile directory location.
2023-05-25 03:37:06 -04:00
Abe Jellinek
6405997723 Use Zotero.appName in window title 2023-05-25 09:13:42 +03:00
Abe Jellinek
91fec9024c Bidi: Fix control characters appearing in reader window titles on Windows
Fix in 6d5ce578e4 only affected tabs.

Fixes #3135
2023-05-25 09:05:36 +03:00
Abe Jellinek
087a9859b4 Fix preference binding issues and "Include Zotero Links" checkboxes
- Set zotero-noteQuickCopy-menu's preference attribute to the correct key
- Warn about all ID-ish preference attribute values
  - zotero-noteQuickCopy-menu's preference attribute was being set to the ID of
    a now-nonexistent <preference> element. preference attribute values should
    be preference keys now, but we were only warning if the associated
    <preference> element was actually there
  - We can't warn in all cases where the preference doesn't yet exist, because
    some preferences don't have default values, and we shouldn't limit to
    preferences that don't exist, because then the warning will stop showing
    after the preference is persisted once
- When a <preference> ID is replaced by the associated key, update the
  preference attribute so future syncFromPref() and syncToPrefOnModify() calls
  will set the correct preference
- Listen to a range of events on all bound nodes, no matter their type
- Don't resolve _firstPaneLoadDeferred until actually done loading

Fixes #3131.
2023-05-24 20:46:00 +03:00
Martynas Bagdonas
26068a855c Make note editor iframe an XUL element to avoid focus anomalies
Fixes #3128
2023-05-24 17:38:15 +01:00
Dan Stillman
0b1d958a86 Fix erroneous warning if Firefox profile directory can't be found
`Zotero.File.getContentsAsync()` now uses IOUtils rather than OS.File
2023-05-24 06:53:23 -04:00
Dan Stillman
f5433f04e6 Update searchfox link to permalink 2023-05-24 02:25:20 -04:00
Abe Jellinek
caa1036da2 Remote translation: Don't use wantGlobalProperties
Not necessary - just use the properties we inherit from contentWindow. This
fixes the DOMParser constructor, which fails if called without a window context
from a non-system principal.

https://forums.zotero.org/discussion/105163/zotero-7-doi-translator-broken-in-scaffold
2023-05-23 22:30:24 +03:00
Abe Jellinek
fd6ea99967 Item box: Always save current item when switching items
Fixes #3125
2023-05-23 19:40:09 +03:00
Abe Jellinek
61749d39a6 Item box: Populate both fields on creator autocomplete click
Fixes #3129
2023-05-23 19:06:56 +03:00
Dan Stillman
8440501ad2 Remove unused Zotero.isBigSurOrLater property 2023-05-23 01:55:31 -04:00
Dan Stillman
f9dab9b041 Show correct OS info in error reports 2023-05-23 01:55:31 -04:00
Dan Stillman
478dcc4f0f Add Zotero.Utilities.Internal.subprocess(command, args)
To run a short-lived command and return stdout

The Subprocess module can also start long-running process and
communicate with them, but we'll implement something different for that
if we need it.
2023-05-23 01:46:25 -04:00
Dan Stillman
522de4ad92 Add 32/64-bit info after version number in about dialog on Windows/Linux 2023-05-22 23:58:00 -04:00
Dan Stillman
66623b945e Temporary fix for context-menu options getting triggered on Windows
https://forums.zotero.org/discussion/105103/right-click-on-collections-or-items-not-functioning-properly-in-zotero-7
2023-05-22 06:16:53 -04:00
Dan Stillman
55fe6f33f5 fx-compat: Fix XMLSerializer calls
https://forums.zotero.org/discussion/105118/zotero-7-error-upon-exporting-in-mods-format
2023-05-22 01:34:41 -04:00
Dan Stillman
c653449cc0 Increase active tabs count from 2 to 3 on <=8 GB systems
To match current Zotero 6 behavior on non-Windows systems
2023-05-20 19:12:19 -04:00
Abe Jellinek
db4a79838b Preferences: Resync menulists when their subtrees change 2023-05-19 16:54:32 +03:00
Abe Jellinek
ff43d1877e Focus preferences window if already open on Cmd-Comma 2023-05-19 16:46:24 +03:00
Abe Jellinek
f299692de7 Allow window dragging from PDF reader toolbar
Fixes #2713
2023-05-16 16:23:32 +03:00
Dan Stillman
3ba6fbf0f7 Avoid warnings in console due to duplicated brand.ftl
zoteroPane.xhtml includes base.js via customElements.js, and base.js
inserts brand.ftl, so we don't need to include brand.ftl as a link.
2023-05-10 07:12:24 -04:00
Dan Stillman
08a508b750 fx-compat: Fix collections-containing-an-item highlight 2023-05-09 17:49:18 -04:00
Abe Jellinek
fa31956d28
fx-compat: Fix feed button appearance/overflow behavior (#3114) 2023-05-09 16:38:33 -04:00
Abe Jellinek
942986c6b6 fx-compat: Use native checkboxes for Quick Copy options 2023-05-09 16:01:52 +03:00
Abe Jellinek
508cd0a64c
Hide About window in Window menu (Mac) (#3113) 2023-05-08 20:35:40 -04:00
Abe Jellinek
8c37865c07 Fix add-on install error message when file is entirely invalid
If the file wasn't an XPI at all, or it didn't contain valid metadata for fx102,
the error message would previously show "%S" where the add-on name should be.
Now we fall back to the file path.
2023-05-08 20:13:47 +03:00
Abe Jellinek
b30f97dad5 fx-compat: Allow file drop on Add-ons window
Fixes #3099
2023-05-08 20:06:47 +03:00