- Set min-width and min-height to width and height so buttons never shrink
- Remove defunct .zotero-clicky-* styles from 2x block in zotero.css
- Include zotero-platform/content/zotero.css in searchDialog.xhtml
- It seems only the defunct 2x styles from zotero.css were being applied, so
the buttons would have been unstyled on a non-hiDPI display
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.
- 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
- Switch to Mozilla's Timer.jsm for timer functions in XPCOM scope
- Add setInterval/clearInterval/requestIdleCallback/cancelIdleCallback
- Add all timer functions to plugins sandbox
Firefox has switched on all platforms, Chrome and Edge on Windows use
"Settings", and we really don't want to have to say different things for
different platforms
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
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.
- 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.
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.
(And update the en-US version with some strings that we don't use but
might if we updated to a slightly newer version of the updater before
they got rid of the dedicated update window)
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.
So a custom build doesn't have to modify each .ftl file
`app-name` is redundant with the Firefox strings, but it's what we used
previously and is easier to remember.
`nsIWebProgressListener.onStateChange()` gets called twice at the end of
requests, once with `stateFlags` set to `327696` and once with it set to
`262160`, which corresponds to `STATE_STOP + STATE_IS_NETWORK +
STATE_IS_REQUEST` and `STATE_STOP + STATE_IS_NETWORK`. httpd.js debug
logging shows that the connection is closed between the two calls. In
WebProgressFinishListener, we were previously calling `onFinish` after
the first one, but in Zotero 7, at least on Linux (or maybe just on
slower machines due to a race condition), the file from `saveURI()`
doesn't appear to be reliably written after the first call, causing
`Attachments.downloadFile()` to fail in `_enforcePDF()` due to an empty
file.
This changes WebProgressFinishListener to wait until the second
`STATE_STOP` call. We'll have to confirm whether this is the
state-change pattern for all requests, but it fixes our Find Available
PDF tests in CI.
https://firefox-source-docs.mozilla.org/dom/ioutils_migration.html
This also fixes a bug when `getContentsAsync()` is passed an
`nsIInputStream` or `nsIChannel` where raw bytes were returned instead
of a string. Not sure if we're doing that anywhere. If we are, this
would presumably break that code, but the function is supposed to return
a decoded string.
From some 2017-era langpacks I had downloaded. These strings aren't in
current langpacks, which use a different update mechanism, but we're
bundling a modified version of updates.xhtml from Firefox.
All declared Fluent files need to exist for a locale to be used (in a
window?). Since Mozilla code tries to load Fluent files, we need to copy
non-English Mozilla .ftl files to their default effective path (just in
the app omni.ja instead of the toolkit omni.ja).
Fixes#3094