diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js index feb35472f6..8f025b10df 100644 --- a/chrome/content/zotero/xpcom/citeproc.js +++ b/chrome/content/zotero/xpcom/citeproc.js @@ -17029,3 +17029,9 @@ CSL.parseParticles = function(){ } } }(); + + +if (typeof process === 'object' && process + '' === '[object process]'){ + module.exports = CSL; +} + diff --git a/chrome/content/zotero/xpcom/date.js b/chrome/content/zotero/xpcom/date.js index d520909171..db31cd1d1d 100644 --- a/chrome/content/zotero/xpcom/date.js +++ b/chrome/content/zotero/xpcom/date.js @@ -911,3 +911,7 @@ Zotero.Date = new function(){ return _localeDateOrder; } } + +if (typeof process === 'object' && process + '' === '[object process]'){ + module.exports = Zotero.Date; +} diff --git a/chrome/content/zotero/xpcom/openurl.js b/chrome/content/zotero/xpcom/openurl.js index b7b32c3fc0..c61a5c3181 100644 --- a/chrome/content/zotero/xpcom/openurl.js +++ b/chrome/content/zotero/xpcom/openurl.js @@ -505,3 +505,7 @@ Zotero.OpenURL = new function() { return item; } } + +if (typeof process === 'object' && process + '' === '[object process]'){ + module.exports = Zotero.OpenURL; +} diff --git a/chrome/content/zotero/xpcom/translation/tlds.js b/chrome/content/zotero/xpcom/translation/tlds.js index 377c36b2be..9b5405dd1e 100644 --- a/chrome/content/zotero/xpcom/translation/tlds.js +++ b/chrome/content/zotero/xpcom/translation/tlds.js @@ -268,4 +268,7 @@ const TLDS = { "za":true, "zm":true, "zw":true -}; \ No newline at end of file +}; +if (typeof process === 'object' && process + '' === '[object process]'){ + module.exports = TLDS; +} \ No newline at end of file diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index c7170f82f5..4ba9a8d8da 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -147,6 +147,25 @@ Zotero.Translate.Sandbox = { if(item.tags) item.tags = translate._cleanTags(item.tags); } + if(item.attachments) { + var attachments = item.attachments; + for(var j=0; j