Update Word for Mac submodule. Update template version check

This commit is contained in:
Adomas Venčkauskas 2023-06-15 12:04:53 +03:00 committed by Dan Stillman
parent e3e607a6d4
commit 6efa55ffdf
2 changed files with 8 additions and 4 deletions

@ -1 +1 @@
Subproject commit c629d85970b5e194d46fde802fd2ee711fa88a64
Subproject commit 846bbfd24cb7270fa36a6a26a2662719c0530e30

View file

@ -63,7 +63,11 @@ const EXPORTED_DOCUMENT_MARKER = "ZOTERO_TRANSFER_DOCUMENT";
const NOTE_CITATION_PLACEHOLDER_LINK = 'https://www.zotero.org/?';
const TEMPLATE_VERSION = 1;
const TEMPLATE_VERSIONS = {
MacWord16: 2,
WinWord: 1,
OpenOffice: 1
};
const MENDELEY_URI_RE = /^http:\/\/www\.mendeley\.com\/documents\/\?uuid=(.*)/;
@ -163,8 +167,8 @@ Zotero.Integration = new function() {
* @returns {Boolean} true if integration operation should be cancelled
*/
this.warnOutdatedTemplate = function (agent, templateVersion) {
const validAgents = new Set(['OpenOffice', 'MacWord2016', 'MacWord16', 'WinWord']);
if (!validAgents.has(agent) || templateVersion >= TEMPLATE_VERSION) return false;
const expectedTemplateVersion = TEMPLATE_VERSIONS[agent];
if (typeof expectedTemplateVersion != 'undefined' && templateVersion >= expectedTemplateVersion) return false;
const daysToIgnore = 30;
const now = Math.floor(Date.now() / 1000);
const updateTemplateDelayedOn = Zotero.Prefs.get('integration.updateTemplateDelayedOn');