Adds a "Run as async function" checkbox that wraps the code in an async
function and displays the value returned by a `return` statement.
This also properly catches errors and displays them in the results pane.
This is a replacement for the Execute JS extension that could be used
with Zotero for Firefox.
To enable, go to the Config Editor in the Advanced pane of the
preferences and set devtools.chrome.enabled to true, and then restart
Zotero. A "Run JavaScript" option will appear in the Tools menu.
- Added icon-button UI code for the menubutton
- Upgrade to React 16 to allow non-standard attrs, such as `tooltiptext`
to support XUL tooltips
- Add i18n support for React UI elements
- Update tests for reactified tag selector
None of our existing files match these rules perfectly, but they're
something to aspire to. I've only checked a handful of files, so there
may be some unwanted or missing rules, and there are definitely some
missing globals.
Some of our more common spacing inconsistencies are currently set as
warnings rather than errors so they can be easily disabled to see more
dangerous stuff.
At some point we can use --fix to correct many problems in existing
files, but we should go through existing pull requests before doing that
to avoid conflicts. Eventually, we'll want to enforce linting as part of
a pre-push hook and CI.
This is hard to do currently because the natural place to do it (and
where the previous seeAlso stuff was done) is translate_item.js, but
with async import translators that now only gets one item at a time,
whereas saving item relations requires all items to be saved. So this
would probably need to be done in the import code in translate.js.
It might also require undoing
https://github.com/zotero/zotero/pull/453 so that getResourceURI() works
on notes and figuring out another solution for the problem that was
trying to solve.
Invalid paths, including Windows UNC paths on other OSes, caused exports
to fail. Now they're ignored, which is what we do for other missing
attachment files.
Fixes#1622
Translators can include `proxy: false` in the attachment object to
indicate that the URL should be used as is, without further proxying.
This generally isn't necessary, but sometimes it is (e.g., on
EBSCOhost), and in theory we should start using this whenever a PDF URL
is extracted from the page instead of being constructed manually by the
translator.
Closes#1612