Commit graph

323 commits

Author SHA1 Message Date
Sylvester Keil
38166d4e05
Add Zotero.intl namespace
Move `Zotero.getString()` and intl init code to `Zotero.intl` to make
it easier to re-use.

Link `Zotero.getString()` to `Zotero.intl.getString()`.

Do not expose `getStringFromBundle`, `pluralFormGet`, and
`pluralFormNumForms` because they are not used.
2018-07-28 21:31:20 +02:00
Adomas Venčkauskas
cb8280f0ff Move Zotero.Prefs into its own file 2018-07-11 15:53:46 +03:00
Sylvester Keil
06cb9aff98 Prefer use of Services.appinfo 2018-07-11 13:58:41 +03:00
Dan Stillman
0383f104dd Fix "Import into new collection" option when handling importable file 2018-06-14 16:41:33 -04:00
Dan Stillman
040e0a726a Simplify page path component parsing for zotero://open-pdf 2018-05-05 01:30:42 -04:00
Dan Stillman
60e0d79e01 Don't allow page path component for new-style zotero://open-pdf URLs
That's only necessary for ZotFile URLs.
2018-05-05 01:19:38 -04:00
Dan Stillman
609657a8e4 Add zotero://open-pdf handler to open PDF at a given page
This is loosely based on the same functionality in ZotFile, but it tries
to do the right thing based on existing Zotero settings: either the new
PDF handler setting in the prefs or the system-default app. The latter
can only reliably be determined on Windows (and this uses ZotFile's
function to read that from the registry), but this tries to figure it
out on macOS and Linux too using the Mozilla handler service. (The
handler service only gets you an app name, not a path, so on Linux we
can try reading mimetypes.list and the like in case someone is using a
system-default okular or evince not in /usr/bin, but that's not yet
implemented.)

This uses the new 5.0 URL format, and a 'page' query parameter instead
of a path component:

zotero://open-pdf/library/items/[itemKey]?page=[page]
zotero://open-pdf/groups/[groupID]/items/[itemKey]?page=[page]

It also accepts ZotFile-style URLs, though, so if you uninstall ZotFile
you should still be able to open those links. ZotFile will need to
accept the new format for new links to work when ZotFile is installed,
since it will override this handler.

This functionality will be necessary for annotation extraction (#1018)
and for imported annotations from Mendeley (#1451).
2018-05-05 00:55:22 -04:00
Adomas Venčkauskas
5e5b567782 Add a connector document integration endpoint
Specifically for google docs via the connector, but could potentially be
used for any integration via HTTP or connector.
2018-04-20 13:08:34 +03:00
Martynas Bagdonas
991a50d090 New PDF recognizer 2018-02-20 09:32:06 +02:00
Dan Stillman
9a43b53ebe Show file path instead of "(null)" when installing style via file open
And fix deprecation warning from passing an nsIFile

(Also updates the Zotero.Styles.install() documentation to note that the
first parameter's `file` property can be a string path.)
2017-12-08 00:42:03 -05:00
Dan Stillman
52bbb79fd0 Remove citeproc-prereqs, which isn't necessary anymore 2017-09-30 19:07:29 -04:00
Dan Stillman
e9439c978b Allow setting data directory via -datadir command-line flag
Can be an absolute path or 'profile' to use 'zotero' subdirectory of
profile directory as in earlier versions (but which won't be treated as
a legacy location eligible for migration)

Closes #1305
2017-09-11 03:52:51 -04:00
Dan Stillman
d8d9758f27 Filter stack displayed in startup error dialog 2017-09-11 03:52:51 -04:00
Dan Stillman
48778b5d50 Fix "undefined" for stack when a string is passed as Zotero.startupError 2017-09-11 03:52:51 -04:00
Dan Stillman
9652b9f553 Fix logged errors and debug messages in timeline 2017-07-29 22:17:08 -04:00
Dan Stillman
4c9f389aa8 Fix external zotero:// links 2017-07-29 17:13:46 -04:00
Dan Stillman
33b40829b8 Add locale switcher to Advanced prefs
Closes https://www.zotero.org/trac/ticket/1733 (!)
2017-07-21 07:51:57 -04:00
Dan Stillman
ae19ffcf9b Use getService() for another protocol handler call
Follow-up to dd5d3a8668 -- not sure if this one matters, but probably
can't hurt
2017-07-12 18:59:46 -04:00
Dan Stillman
55b2dc39bf Fix Firefox 55 breakage (and remove unnecessary locale lookups)
We were manually looking up the current locale in various places and
passing it to nsIStringBundleService::createBundle(), but that hasn't
even been a supported argument for years. (I assume it was a long time
ago?)
2017-07-09 06:59:50 -04:00
Dan Stillman
86cf7cbd07 Update translators/styles at startup and on push notifications
Previously, if a translator or style was fixed, people didn't get the
fix until their client checked the repository for updates, which could
take up to 24 hours. Now, in addition to checking once a day, we check
every time Zotero is started and also when we receive a notification
from the streaming server, which happens immediately after a translators
or style is updated on GitHub. To avoid DDoSing ourselves, the
notification includes a random delay (within a given period) before the
update is triggered by the client.

The streaming server connection is now made when either "Automatically
check for updated translators and styles" or "Sync automatically" is
enabled. It can be disabled via the extensions.zotero.streaming.enabled
pref.
2017-07-04 18:46:30 -04:00
Dan Stillman
ef1715e9ee Fix "Generate Report from Collection" when sorting by creator or date 2017-06-22 05:48:11 -04:00
Dan Stillman
653f041140 Fix report generation after 4e1937680f 2017-06-04 21:33:14 -04:00
Tom Najdek
14bf3184bb Fixes and tweaks to make tests work with babelized code
* Use mocha, chai & sinon from the npm. As of sinon 2.0
  sinon-as-promised is no longer required so it is removed
* Tweak code to re-use the same loader with the same environment
  throghout the code
* Introduce browserify step for testing tools that only provide
  node-compatible libraries (sinon, chai-as-promised)
* Introduce copy step for test data to resolve multiple issues with
  tests depending on files not being symlinks
* Re-introduce custom implementation of setTimeout to resolve issues
  with few tests
* Re-introduce custom Bluebird Promises config & monkey patch
2017-06-01 11:36:16 -04:00
Dan Stillman
d5a8a3420d Additional locale service updates for Firefox 54 compatibility
Follow-up to 0ac37ab65a
2017-05-26 01:37:54 -04:00
Dan Stillman
6afc58a629 Move require() into ZoteroContext and fix Bluebird module path 2017-05-24 00:58:41 -04:00
Dan Stillman
eaf8d36963 Adds a -debugger command-line flag to start the devtools server
Follow-up to https://github.com/zotero/zotero-standalone-build/commit/22cfe2404

The devtools must be included in the build by passing the -t flag to
build.sh in zotero-standalone-build.

After starting Zotero with the flag, connect from a Firefox instance
with remote debugging enabled by choosing "Connect…" from the Web
Developer menu and connecting to port 6100.
2017-03-17 17:12:12 -04:00
Dan Stillman
1ea80c4352 Fix handling of some old-style URLs in zotero:// protocol handler 2017-02-08 00:20:52 -05:00
Dan Stillman
ae47ae28bd Fix #1163, Unable to open zotero urls from tinymce 2017-01-30 14:01:04 -05:00
Dan Stillman
b073c3e680 Fix mangled output from Zotero.Utilities.getAsyncInputStream()
Proper fix (as opposed to 5236d01791) for
https://forums.zotero.org/discussion/64022/5-0-beta-generate-report-is-often-garbled
2017-01-30 13:33:23 -05:00
Dan Stillman
e6d7ae8e2f Fix truncated reports with multi-byte characters 2017-01-26 22:32:33 -05:00
Dan Stillman
255320656f Fix extended characters in reports (since 5236d01791) 2017-01-26 01:53:27 -05:00
Dan Stillman
5236d01791 Fix mangled large reports
https://forums.zotero.org/discussion/64022/5-0-beta-generate-report-is-often-garbled

Records are being truncated, though I'm not sure why. But just read the input
stream into a string for now.
2017-01-21 06:33:36 -05:00
Dan Stillman
f44264cd4d Add HTML-based console viewer for easier real-time debug output
Since 1) debug output logging via the prefs isn't necessarily possible
for startup errors in Standalone, 2) real-time output is prohibitively
slow and has a miniscule scrollback buffer on Windows unless you use a
Cygwin or Git terminal, and 3) copying/pasting/emailing was annoying
anyway, make -ZoteroDebug open a popup window that shows errors and
debug output and allows submitting straight to the server with a Debug
ID.

This should replace the existing debug output viewer as well, but that's
less of a priority.

-ZoteroDebugText or the debug.log pref can still be used to dump to the
terminal.
2017-01-14 17:20:12 -05:00
Dan Stillman
2beb2c514c Push-based sync triggering
Immediate sync triggering on remote library change using WebSocket API.
Currently kicks off a normal sync process for the modified library --
actual object data isn't pushed.

(This might not stay enabled for 5.0 Final.)
2016-12-29 21:50:32 -05:00
Dan Stillman
99152d78e5 Fix file handling when Zotero is launched from close on Windows
When opening CSL, BibTeX, etc.
2016-12-26 17:09:29 -05:00
Tom Najdek
d4dc86c975 Remove use of syntax where curly brackets are omitted in function defs 2016-12-21 08:06:17 -05:00
Tom Najdek
54a2126b7d Remove non-standard syntax for conditional exception handling 2016-12-21 08:04:57 -05:00
Tom Najdek
39bc5398c9 Remove use of non-standard list comprehension syntax 2016-12-21 08:04:57 -05:00
Tom Najdek
269e2f8bff Replace legacy syntax for each...in with for...of 2016-12-21 08:04:09 -05:00
Dan Stillman
bba874aa18 Add option to check for updates on Standalone startup error
I think we might have come to regret not having this.
2016-12-16 06:00:28 -05:00
Dan Stillman
2f50b9b848 Fix CSL/file import when Standalone is closed
This is a bit iffy, since at least on macOS the passed file seems to
come in as either -file or -url at different times, but this seems to
work on macOS and Windows. Needs further testing with a packaged version
on Windows.
2016-12-16 03:21:52 -05:00
Adomas Ven
747c11c917 Improves proxy support (#1129)
Improves proxy support

- Automatically detect and dehyphenise https proxies which use EZProxy
  HttpsHyphens
- Web translators now pass around Zotero.Proxy instances which can
  proxify/deproxify urls passed to `translate.setLocation()` before calling
  `translate.getTranslators()`/ translate.detect()`. The proxy passing is
  done within connector background/injected processes and between
  standalone and connectors.
- Proxy protocol unified with connectors. Connectors can now pass
  proxies to `/connector/save_items`. The proxies will be used to resolve
  true item and attachment urls when saving.

Closes zotero/zotero#578, zotero/zotero#721

Relevant zotero/zotero#34, zotero/zotero#556
2016-12-12 14:29:59 +02:00
Dan Stillman
1d45f3d008 Show more startup errors in Standalone, with stack 2016-12-06 06:12:54 -05:00
Dan Stillman
2d6a1b3541 Do a better job of displaying startup errors
This helps ensure that the toolbar button opens an alert with the relevant
error instead of opening the Zotero pane with an infinite progress meter.
2016-12-05 05:59:12 -05:00
Dan Stillman
4c0abb6816 Point other profiles to new data dir after migration (+ code reorg)
Look for other profiles, from both apps (Firefox and Standalone), that
point to the data directory being migrated and update prefs.js in those
profiles to point to the new location.

Also reorganize code into Zotero.Profile and Zotero.DataDirectory
namespaces
2016-11-27 00:17:56 -05:00
Dan Stillman
c0bf2b91f6 Don't shut down Firefox on startup error (since 693c0286) 2016-11-26 23:09:28 -05:00
Dan Stillman
693c0286ea Slightly better handling of startup errors in Standalone
Run the startup error handler or show an alert with the startup error
string, and then quit Zotero
2016-11-22 18:46:55 -05:00
Dan Stillman
cfe76a6f83 Add Zotero.test, which is true during tests
(Zotero.automatedTest is only true in Travis)
2016-11-13 04:54:57 -05:00
Dan Stillman
6f6ce33377 Remove obsolete code for old Firefox versions 2016-10-08 19:15:49 -04:00
Dan Stillman
8f38b01712 Move search code into separate files in xpcom/data 2016-10-04 23:44:07 -04:00
Dan Stillman
e3a9c6779b Restore connector mode functionality in Firefox
Non-Zotero for Firefox connector code will probably need to be updated
to handle these changes.
2016-09-05 23:08:08 -04:00
Dan Stillman
b18c580dac Revert "Disable connector switching for 5.0 beta"
This reverts commit 317b1dfa0f.
2016-09-05 19:52:13 -04:00
Dan Stillman
daf0f8e0b0 Merge branch '4.0' 2016-08-14 17:27:36 -04:00
Dan Stillman
1476d9e71c Fix startup error in Firefox 50+
Closes #1077
2016-08-14 04:18:41 -04:00
Dan Stillman
2d88b07855 Set Zotero.automatedTest flag instead of .noUserInput on Travis
And don't skip alerts in Zotero.alert() during automated tests. (That
was intended to avoid long timeouts after unexpected failures, but,
e.g., PDF metadata lookups (which are currently disabled in automated
tests) should just be mocked so they don't intermittently fail.)
2016-06-24 18:28:32 -04:00
Dan Stillman
6907af86fd Add XPCOM clearTimeout() and remove Zotero.wait()
Properly emulate setTimeout() with support for cancelling timers.
2016-05-17 13:43:11 -04:00
Dan Stillman
b109279a17 Avoid errors for some invalid requests viewing attachments 2016-05-13 15:45:51 -04:00
Dan Stillman
317b1dfa0f Disable connector switching for 5.0 beta
Don't start the connector pipe (Mac/Linux), don't listen for IPC on the
command-line (Windows), and don't try to release Standalone's lock if DB is
busy when Firefox starts.
2016-05-08 22:38:58 -04:00
Dan Stillman
a78f923a72 Sync engine cleanup
- Use custom exception for user-initiated sync cancellations, which can bubble
  up to the sync runner -- this should help with a sync stop button (#915)
- Separate out deletions-downloading code
- Refactor delay generator handling on library version mismatch
- Clearer variable names
2016-05-06 04:31:49 -04:00
Philipp Zumstein
aef8453924 Fix some for each ... in cases (#978) 2016-05-03 17:51:12 -04:00
Dan Stillman
72c8711cd3 String::contains() -> indexOf() for Firefox 48 (and 38) compatibility
.contains() was removed in Firefox 48, but .includes() wasn't available until
40, so use indexOf() for now. We can start using .contains() once we no longer
need to support 38 ESR.
2016-05-03 12:08:38 -04:00
Dan Stillman
9fea9608f6 Disable debug output for AsyncChannel loading 2016-04-16 16:51:51 -04:00
Dan Stillman
1c92fe3268 Fix getFile() deprecation warning for zotero://attachment URLs 2016-04-16 16:50:27 -04:00
Dan Stillman
79504df5f8 Remove "/report.html" in report URLs
Firefox saves as Zotero Report.html (localized) without it, which is
fine.
2016-04-12 18:59:46 -04:00
Dan Stillman
0f7d1c7061 Fix various connector-mode issues for 5.0
Still more to fix
2016-04-04 06:33:15 -04:00
Aurimas Vinckevicius
ca36096bcf Add FeedReader 2016-03-22 03:38:49 -04:00
Dan Stillman
daf4a8fe4d Deasyncification 🔙 😢
While trying to get translation and citing working with asynchronously
generated data, we realized that drag-and-drop support was going to
be...problematic. Firefox only supports synchronous methods for
providing drag data (unlike, it seems, the DataTransferItem interface
supported by Chrome), which means that we'd need to preload all relevant
data on item selection (bounded by export.quickCopy.dragLimit) and keep
the translate/cite methods synchronous (or maintain two separate
versions).

What we're trying instead is doing what I said in #518 we weren't going
to do: loading most object data on startup and leaving many more
functions synchronous. Essentially, this takes the various load*()
methods described in #518, moves them to startup, and makes them operate
on entire libraries rather than individual objects.

The obvious downside here (other than undoing much of the work of the
last many months) is that it increases startup time, potentially quite a
lot for larger libraries. On my laptop, with a 3,000-item library, this
adds about 3 seconds to startup time. I haven't yet tested with larger
libraries. But I'm hoping that we can optimize this further to reduce
that delay. Among other things, this is loading data for all libraries,
when it should be able to load data only for the library being viewed.
But this is also fundamentally just doing some SELECT queries and
storing the results, so it really shouldn't need to be that slow (though
performance may be bounded a bit here by XPCOM overhead).

If we can make this fast enough, it means that third-party plugins
should be able to remain much closer to their current designs. (Some
things, including saving, will still need to be made asynchronous.)
2016-03-07 17:03:58 -05:00
Dan Stillman
ec72dd3909 Fix debug output viewing 2016-01-04 15:48:56 -05:00
Dan Stillman
f6e0b8a8b0 Fix error in Zotero protocol handler when viewing snapshots 2015-12-30 05:14:51 -05:00
Adomas Venčkauskas
2de0ed7871 Recognizes and opens files even without extensions.
Closes #842
Also:
Changes AsyncChannel to be a coroutine.
2015-11-20 16:14:55 +00:00
Dan Stillman
62aeb1da32 Full-text syncing support via API [DB reupgrade] 2015-11-12 02:54:51 -05:00
Dan Stillman
e8a887304e Move Zotero.CollectionTreeRow to separate file 2015-11-03 17:08:55 -05:00
Dan Stillman
73f4d28ab2 ZFS file sync overhaul for API syncing
This mostly gets ZFS file syncing and file conflict resolution working
with the API sync process. WebDAV will need to be updated separately.

Known issues:

- File sync progress is temporarily gone
- File uploads can result in an unnecessary 412 loop on the next data
  sync
- This causes Firefox to crash on one of my computers during tests,
  which would be easier to debug if it produced a crash log.

Also:

- Adds httpd.js for use in tests when FakeXMLHttpRequest can't be used
  (e.g., saveURI()).
- Adds some additional test data files for attachment tests
2015-10-29 04:38:27 -04:00
Aurimas Vinckevicius
88ab129ffb Add Feed and FeedItem
Also:
* _finalizeErase in Zotero.DataObject is now inheritable
* Call _initErase before starting a DB transaction
* removes Zotero.Libraries.add and Zotero.Libraries.remove (doesn't seem like this is used any more)
2015-09-21 17:08:21 -05:00
Dan Stillman
984789d304 API syncing megacommit
There's a lot more to do, and this isn't ready for actual usage, but the
basic functionality is mostly in place and has decent test coverage. It
can successfully upgrade a library last used with classic syncing and
pull down changes via the API. Uploading mostly works but is currently
disabled for safety until it has better test coverage.

Downloaded JSON is first saved to a cache table, which is then used to
populate other tables and later for generating PATCH requests and
automatically resolving conflicts (since it shows what was changed
locally and what was changed remotely). Objects with unmet dependencies
or unknown fields are skipped for now but don't block the rest of the
sync.

Some of the bigger remaining to-dos:

- Tests for uploading
- Re-do the preferences to get an API key
- File sync integration
- Full-text syncing integration
- Manual conflict resolution (though this already includes much smarter
  conflict handling that automatically resolves many conflicts)
2015-07-20 18:16:57 -04:00
Dan Stillman
02cd71ebb5 Allow overriding startup options in Zotero.reinit()
And use it in resetDB() test support function, mainly to allow
skipBundledFiles for resetDB calls. Translator installation and
initialization can take a long time, but tests that need a clean DB
don't necessarily rely on translators. Without this, running resetDB()
in beforeEach() for many tests is prohibitively slow.
2015-07-20 02:12:14 -04:00
Dan Stillman
5c523d8694 Merge branch '4.0' 2015-07-18 07:09:53 -04:00
Aurimas Vinckevicius
bf58de7e62 Update citeproc-js to 1.1.25
And split off Zotero additions
2015-07-09 16:31:57 -05:00
Dan Stillman
99dd1c0697 Merge branch '4.0'
Since modal windows (e.g., the Create Bib window and the Quick Copy site
editor window) can't use yield, style retrieval
(Zotero.Styles.getVisible()/getAll()) is now synchronous, depending on a
previous async Zotero.Styles.init(). The translator list is generated in
the prefs window and passed into the Quick Copy site editor, but it's
possible the translators API should be changed to make getTranslators()
synchronous with a prior init() as well.
2015-06-27 16:59:58 -04:00
Dan Stillman
33dedd1753 Tags overhaul [DB reupgrade]
- Simplified schema
- Tags are now added without reloading entire tag selector
  - On my system, adding 400 tags to an item (separately, with the tag
    selector updating each time) went from 59 seconds to 42. (Given that
    it takes only 13 seconds with the tag selector closed, though,
    there's clearly more work to be done.)
- Tag selector now uses HTML flexbox (in identical fashion, for now, but
  with the possibility of fancier changes later, and with streamlined
  logic thanks to the flexbox 'order' property)
- Various async fixes
- Tests
2015-06-23 05:21:58 -04:00
Dan Stillman
dcd7de03b0 Match last name alone for two-field names in search autocomplete
https://forums.zotero.org/discussion/50073/
2015-06-18 00:21:50 -04:00
Dan Stillman
ff7919553c Collections data layer cleanup
Get rid of data_access.js, at long last. Existing calls to
Zotero.getCollections() will need to be replaced with
Zotero.Collections.getByLibrary() or .getByParent().

Also removes Zotero.Collection::getCollections(), which is redundant
with Zotero.Collections.getByLibrary(), and Zotero.Collections.add().
The latter didn't didn't include a libraryID anyway, so code might as
well just use 'new Zotero.Collection' instead.
2015-05-24 04:37:34 -04:00
Dan Stillman
ef57b4e016 Relations fixes and cleanup
Relations need a complete overhaul, but this makes them generally work
again.
2015-05-24 03:08:22 -04:00
Dan Stillman
32abbe7c25 Load groups at startup, and make Zotero.Groups functions synchronous
Groups were already being loaded for the collections list, so we might
as well just store them initially and let Zotero.Libraries.getName() be
a synchronous call.
2015-05-22 04:52:05 -04:00
Dan Stillman
51c7ae6e5c Add -b option to skip translator/style installation in tests
'b' for *b*undled files

Translators and styles take a long time to install and initialize in
source installations, and they're unnecessary for many tests.

This shaves about 10 seconds off each test run for me on one system (and
that's with some help from filesystem caching).
2015-04-16 20:50:15 -04:00
Dan Stillman
293f7c6dd4 Zotero.Search.prototype.addCondition() doesn't need to be async 2015-04-16 20:48:59 -04:00
Dan Stillman
fec43f1f62 Merge branch '4.0' into api_syncing 2015-04-13 02:01:43 -04:00
Aurimas Vinckevicius
164f4e4321 More informative error messages for failed file loads 2015-04-10 19:46:57 -05:00
Aurimas Vinckevicius
f6510419cb Skip test for "recognizePDF without DOI" on Travis-CI
Breaks due to CAPTCHA when tests are run frequently
2015-04-06 23:17:41 -05:00
Dan Stillman
827eb9b32e Change command-line debug flag to -ZoteroDebug for consistency
From -zoterodebug
2015-03-24 03:38:11 -04:00
Dan Stillman
828f3f5024 Fix report generation 2015-03-17 00:05:08 -04:00
Dan Stillman
bdd69d0a53 Merge branch '4.0' into api_syncing 2015-03-16 23:41:10 -04:00
Dan Stillman
1c8abf3841 Change user library from 0 to 1
0 allowed for some accidental behavior due to old code expecting NULL,
and it prevented easy checks (``if (!libraryID)``) for a passed
libraryID. Code now uses Zotero.Libraries.userLibraryID instead of a
hard-coded value (except in schema.js). Functions can still make
libraryID optional, but they should then use
Zotero.Libraries.userLibraryID if that's to mean the user library.

There might be some code that still expects 0 that I missed.
2015-03-16 12:16:05 -04:00
Simon Kornblith
c7c58f8343 Add support function to reset the DB and a test that it works. 2015-03-09 14:25:49 -04:00
Dan Stillman
94b2865149 Fix sorting of tag autocomplete in advanced search 2015-02-25 23:58:54 -05:00
Aurimas Vinckevicius
68e7849fcf Add Zotero.Utilities.Internal.hyphenateISBN
Hyphenates ISBN-10 or ISBN-13 according to data from https://www.isbn-international.org
2015-02-24 22:42:29 -06:00
Dan Stillman
b478d8f204 Fix some errors if pane is opened during initialization 2015-02-24 22:07:30 -05:00
Dan Stillman
e2d3cc3f0d Update zotero://select to use new URLs and wait for items list load
Closes #541
2014-09-23 01:13:38 -04:00
Dan Stillman
755ead2119 Update zotero:// extensions (report, timeline, etc.) for async DB, and more
- Protocol handler extensions can now handle promises and can also make
  data available as it's ready instead of all at once (e.g., reports now
  output one entry at a time)
- zotero:// URL syntaxes are now more consistent and closer to the web
  API (old URLs should work, but some may currently be broken)

Also:

- Code to generate server API, currently available for testing via
  zotero://data URLs but eventually moving to HTTP -- zotero://data URLs match
  web API URLs, with a different prefix for the personal library (/library vs.
  /users/12345)
- Miscellaneous fixes to data objects

Under the hood:

- Extensions now return an AsyncChannel, which is an nsIChannel implementation
  that takes a promise-yielding generator that returns a string,
  nsIAsyncInputStream, or file that will be used for the channel's data
- New function Zotero.Utilities.Internal.getAsyncInputStream() takes a
  generator that yields either promises or strings and returns an async input
  stream filled with the yielded strings
- Zotero.Router parsers URLs and extract parameters
- Zotero.Item.toResponseJSON()
2014-09-09 00:36:29 -04:00
Dan Stillman
c5ee3651fe Don't try to load uncommitted files 2014-09-09 00:35:35 -04:00