citeproc-rs support (#2220)
Disabled under zotero.cite.useCiteprocRs by default
This commit is contained in:
parent
55e8f7914b
commit
44b6cd0525
22 changed files with 7429 additions and 182 deletions
|
@ -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({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue