Commit graph

152 commits

Author SHA1 Message Date
Dan Stillman
a648da8507 Markdown/HTML note export: Switch hard-coded translator ids to constants 2021-12-15 06:10:58 -05:00
Martynas Bagdonas
19977598eb Markdown note export (#2214) 2021-12-15 06:10:58 -05:00
Dan Stillman
3732f97d41 Add OpenURL resolver directory
Remove the apparently obsolete [1] WorldCat `lookup?IP=requestor` search
functionality and replace with a hierarchical menu populated directly
from our directory [2].

Also switch to https://www.worldcat.org/registry/gateway as the default
resolver, which seems to be the same as
http://worldcatlibraries.org/registry/gateway but with HTTPS support

Fixes #1811
Fixes #1853

[1] https://forums.zotero.org/discussion/79312/search-for-resolvers-gives-out-of-date-information
[2] https://www.zotero.org/support/locate/openurl_resolvers
2021-08-13 06:25:16 -04:00
Dan Stillman
bda52827da Reset note font size to 14 for new editor 2021-03-03 16:03:31 -05:00
Dan Stillman
7cd861a9e1 Change PDF reader beta pref to a general beta pref
The PDF reader pref is now "Use Zotero PDF reader and new note editor
(beta, My Library only)". Toggling the pref prompts to restart, and
Zotero.isPDFBuild -- which currently controls the PDF reader, new note
editor, and tabs UI -- is set based on that pref at startup.
2021-03-02 18:12:24 -05:00
Adomas Venčkauskas
50dae87b07 Add a warning dialog for an outdated doc template 2021-03-02 18:10:44 -05:00
Dan Stillman
f0816cc8fb Add temporary prefs checkbox to use internal PDF reader
And use when opening PDFs in My Library from items list and
zotero://open-pdf

This also adds "Zotero" to the main PDF reader pref, which will be the
real way to set this, but that option is hidden for now so that group
library items will still open with the configured reader.
2021-03-02 17:58:28 -05:00
Dan Stillman
8026f744c5 Remove old HTML snapshot annotation support
Any data trapped in these tables hasn't been accessible in many years.
2021-03-02 17:36:04 -05:00
Dan Stillman
8417ad7c80 Add extensions.zotero.reopenPanesOnRestart hidden pref
Closes #1752
2019-11-21 23:51:37 -07:00
Dan Stillman
9a49718638 Remove some old Zotero for Firefox code
In particular, remove code related to opening/closing the Zotero pane,
which affects tests. The pane is now opened by default in Firefox, which
brings its behavior closer to the main version.
2019-08-27 00:47:39 -04:00
Dan Stillman
d353439980 Add retractions.enabled hidden pref to disable retraction checking 2019-06-11 21:24:17 -04:00
Dan Stillman
7f4f2770ba Add notification banner when retracted items are found
And other retraction tweaks
2019-06-07 01:15:17 -04:00
Dan Stillman
d0f7fd6df7 Add separate "Rename linked files" pref for auto-renaming
Defaulting to false

People who've been relying on auto-renaming of linked files for the last
year will have to turn this back on.
2019-02-26 22:23:43 -05:00
Adomas Venčkauskas
a24cada451 React Tag Selector polish, i18n and tests
- 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
2019-01-21 11:01:27 +02:00
Dan Stillman
e48a1a2abb Remove lots of old Zotero for Firefox code
We still run tests in Firefox, so not everything can be removed.
2018-08-17 03:17:08 -04:00
Dan Stillman
c2ca70055c Merge branch 'electron' 2018-08-16 19:16:46 -04:00
Dan Stillman
ce5be0bc75 Automatically download open-access PDFs when saving via the connector
If there's no translated PDF or the translated PDF fails and the item
has a DOI, check Zotero's Unpaywall mirror for possible sources and try
to download one of those.

Unlike with "Add Item by Identifier" and "Find Available PDF" in the
item context menu, this does not try the DOI/URL page, since it would
result in more data leakage and most of the time you'd be saving from
the DOI page already. We could consider offering it as an option, but
for it to be useful, you'd have to have an institutional subscription,
be on-campus or connected via VPN (for now), and be saving from
somewhere other than the main page.

A new connector endpoint, sessionProgress, takes the place of
attachmentProgress. Unlike attachmentProgress, sessionProgress can show
new attachments that have been added to the save, and with a little more
work should also be able to show when a parent item has been recognized
for a directly saved PDF.

This also adds support for custom PDF resolvers, available to all PDF
retrieval methods. I'll document those separately.

Closes #1542
2018-08-16 00:57:22 -04:00
Adomas Venčkauskas
28535ac64d Throw proper error in Prefs.get(). Use double-quotes in default prefs 2018-07-11 19:35:14 +03:00
Dan Stillman
17b4c2e98e Show upgrade prompt for connector pings from below a certain version
Shows a prompt once per restart or once per day, whichever is longer,
with an option to not show again for a month. Can be disabled completely
by setting extensions.zotero.showConnectorVersionWarning to false.

Currently prompts for connector versions below 5.0.35.

This is a temporary solution for #1489 until the connector checks and
warns on its own when it's outdated and most people are on a version
that does that (particularly Safari users, who don't auto-upgrade).
2018-04-29 04:53:00 -04:00
Dan Stillman
da09a3bb96 Allow custom handler for PDF files
Configurable via extensions.zotero.fileHandler.pdf hidden pref for now,
though we'll probably make it a visible pref.

We also appear to have been doing blocking launches when launch()
failed, which may have been causing UI hangs when opening files on some
Linux installations. (I'm not sure if that's an issue with recent
Firefox builds. launch() works on Ubuntu 17.10.) All launches are now
async.

This is a rewritten version of PR #1450 by @ehhc.

Closes #1450
2018-03-05 19:36:50 -05:00
Adomas Venčkauskas
13766e1f6c Show delayed citations checkbox in doc prefs dialog after initialization
Closes #1458
2018-03-05 14:26:57 +02:00
Dan Stillman
e1e5178869 Shorten auto-renaming pref
So we now have autoRecognizeFiles and autoRenameFiles.
2018-03-01 04:09:17 -05:00
Dan Stillman
97661539dc Automatically retrieve metadata when saving PDFs
Applies to dragging to the collections pane or the items pane, adding
via New Item menu, or saving via the connector server

If the renaming pref is enabled, the PDF is renamed after recognition.

Can be disabled in the preferences

Closes #917
2018-03-01 01:28:28 -05:00
Dan Stillman
f8b41c971c Automatic attachment file renaming changes
Automatic renaming is now done for dragging of an external file onto an
item (as added in 7cb95f41) as well as dragging as a linked file,
dragging a non-native (not text or HTML) URL, "Attach Link to File…",
"Attach Stored Copy of File…", and "Retrieve Metadata for PDF". It only
applies if a single file is being added and if the parent item has no
non-HTML attachments. By default, the renaming only applies to PDFs, but
this can be changed with the renameAttachmentFiles.automatic.fileTypes
hidden pref.

A new General pref, "Automatically rename attachment files using parent
metadata", controls whether the renaming happens.

Files saved via web translators are renamed regardless of this pref,
because they would often be gibberish otherwise.

Closes #113
2018-02-27 18:45:03 -05:00
Adomas Venčkauskas
966c293dea Add a pref to always show doc integration automatic updates option 2018-02-12 10:47:16 +02:00
Dan Stillman
a6564e92d7 Update proxy authentication URLs
And try all, since it doesn't do any of this unless there's a PAC file,
it's not actually a network request unless the site should be proxied,
and it should only make a single HEAD request unless a previous one
fails.

There's a possibility some proxies are limited to HTTP, in which case
changing these to HTTPS might stop this from working. If so, we'd need
to add back HTTP addresses.

Closes #1273
2017-07-28 20:41:10 -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
Adomas Venčkauskas
6336a30cb9 Remove obsolete styles related code 2017-05-03 14:00:17 +03:00
Dan Stillman
cc516005c0 "Import"/"Import from Clipboard" shortcut key changes
- Add Cmd/Ctrl-Shift-I for "Import…"
- Cmd/Ctrl-Shift-V apparently pastes without formatting, so don't override it.
  Instead, add a shortcut key to the menu option, defaulting to
  Cmd-Option-Shift-I/Ctrl-Alt-Shift-I
- The I in both is now localizable
2017-01-19 15:28:27 -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
d7809d6c1f Increase default note font size to 12 2016-12-25 23:20:19 -05:00
Dan Stillman
3b6b6aa36b Remove tab mode
Closes #1135
2016-12-21 05:11:21 -05:00
Adomas Ven
d6d4e4b33e Saner feed database management (#1131)
* Mark feedItems read in a single batch SQL update
* Automatically remove old feed items
* User-facing preference globally and per-feed for feed item expiration
2016-12-13 09:07:43 -05:00
Dan Stillman
cbcf9cb3de Color long time intervals red in debug output to terminal
Defaults to 250 ms. The threshold can be changed with
extensions.zotero.debug.slowTime. Set to 0 to disable.
2016-12-02 17:28:39 -05:00
Dan Stillman
f55c2f51ee Remove extensions.zotero.debug.time and always show interval in output 2016-12-02 17:28:39 -05:00
Dan Stillman
c7bbde3c4f Add default pref for quicksearch mode to avoid recreating during tests 2016-11-29 03:28:49 -05:00
Dan Stillman
a6cfe6cd9a Remove export charset checkbox in prefs
Instead, just always show the (greatly shortened, after 0609b62a) menu
on export when the translator supports it (which probably fewer
translators actually need to do).

This leaves the pref in place, but it can be removed eventually (and
changing the default for a while I believe will cause the existing pref
line to be removed for anyone who has it set to true already).
2016-11-27 17:11:05 -05:00
Dan Stillman
a5b222edac Convert dataDir pref to string path and remove lastDataDir
.persistentDescriptor now appears to return (and parse) a string path anyway on
macOS, which is the only place where it didn't use a string path to begin with,
so this will only affect earlier users.
2016-11-12 16:44:34 -05:00
LinuxMercedes
6bff554976 Add a second horizontal layout to Zotero for small screens (#1010) 2016-05-27 20:57:29 -04:00
Dan Stillman
df1cdb9754 Abstract field tweaks
- Allow clicking on non-editable abstract field to expand/collapse it
- Change cursor when hovering over abstract to show it can be toggled
- Default abstracts to expanded
2016-04-06 02:04:06 -04:00
Dan Stillman
f70c2bfa0a Feed item button tweaks
- Fix persistence of last translation target
- Add checkbox to menuitem of selected target
- Remove unnecessary flex attributes

Also:

- Move collectionTreeView row id (e.g., "L1", "C123") and image
  generation to Zotero.Library and Zotero.Collection properaties,
  .collectionTreeViewID and .collectionTreeViewImage -- currently used
  only for the feed add-to button, but could be expanded for use in
  collectionTreeView
2016-04-05 02:24:58 -04:00
Adomas Venčkauskas
3dc0ad3745 Add feed menu buttons. Close adomasven/zotero#9. 2016-04-01 12:25:37 +03:00
Adomas Venčkauskas
12fc6cfbe8 Various feeds changes
- Hide notes, tags and related for feed items in itembox
- Add feed support for <enclosure> elements
- Add feed syncing methods for synced settings (additional work is
  needed on the sync architecture to download synced settings from the
  server)
- Change feed item clear policy to be less aggressive
- Adjust for deasyncification
- Disable translate-on-select
- Close adomasven/zotero#7, Remove context menu items from feeds
2016-03-22 06:56:36 -04:00
Adomas Venčkauskas
0d4025e9fb Add preferences for feed sorting and toggle read hotkey 2016-03-22 06:56:36 -04:00
Adomas Venčkauskas
e206b0af5e Various feeds changes
- Change sort order for feed items to natural order
- Remove display of dates in itembox
- Trim html tags from creators in FeedReader parser
2016-03-22 06:56:33 -04:00
Adomas Venčkauskas
b75cc8f9d0 Closes #437, Detect when data directory is in Dropbox
Display a warning when choosing data directory
Or on opening Zotero Pane for existing users with data dir in dropbox

Also:
Fix a bug where it won't use custom path if "Choose..." button is
pressed instead of radio button.
Change filepicker to show current data directory on display
2015-11-12 20:24:39 +00: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
80d5b74cf3 Merge 4.0 up to 28301ea45f
Conflicts:
	chrome/content/zotero/preferences/preferences_export.js
	chrome/content/zotero/xpcom/proxy.js
2015-05-26 17:48:22 -04:00
rmzelle
06e6168cb4 Implement locale drop-down menus 2015-05-26 00:12:04 -04:00
LinuxMercedes
34c0e746f5 Add an option to not show the proxy redirection notification 2015-05-25 17:38:24 -05:00