citeproc-rs support (#2220)

Disabled under zotero.cite.useCiteprocRs by default
This commit is contained in:
Adomas Ven 2021-12-16 00:28:41 +02:00 committed by GitHub
parent 55e8f7914b
commit 44b6cd0525
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 7429 additions and 182 deletions

View file

@ -1,7 +1,7 @@
'use strict';
var require = (function() {
var win, Zotero;
var win, cons, Zotero;
Components.utils.import('resource://zotero/loader.jsm');
var requirer = Module('/', '/');
var _runningTimers = {};
@ -72,7 +72,6 @@ var require = (function() {
return Zotero || {};
}
var cons;
if (typeof win.console !== 'undefined') {
cons = console;
}
@ -82,6 +81,9 @@ var require = (function() {
cons[key] = text => {getZotero(); typeof Zotero !== 'undefined' && false && Zotero.debug(`console.${key}: ${text}`)};
}
}
if (!win.console) {
win.console = cons;
}
let globals = {
window: win,
document: typeof win.document !== 'undefined' && win.document || {},
@ -90,7 +92,9 @@ var require = (function() {
setTimeout: win.setTimeout,
clearTimeout: win.clearTimeout,
requestAnimationFrame: win.setTimeout,
cancelAnimationFrame: win.clearTimeout
cancelAnimationFrame: win.clearTimeout,
TextEncoder: TextEncoder,
TextDecoder: TextDecoder,
};
Object.defineProperty(globals, 'Zotero', { get: getZotero });
var loader = Loader({