Skip to content

Instantly share code, notes, and snippets.

declare const Zotero: any
declare const location: any
export const is7 = (typeof location !== 'undefined' && location.search) ? ((new URLSearchParams(location.search)).get('is7') === 'true') : Zotero.platformMajorVersion >= 102
function clientname(): string {
if (typeof location !== 'undefined' && location.search) return (new URLSearchParams(location.search)).get('clientName')
// if (process.versions.node) return 'Zotero' // testing
if (Zotero.clientName) return Zotero.clientName as string
if (Zotero.BetterBibTeX?.clientName) return Zotero.BetterBibTeX.clientName as string
// class from https://gist.github.com/lentschi/3fcbf7f6894b11bee1eb3d6a832a84e6
/**
* Asyncronous iterable iterator for IndexedDB object stores or indexes
*
* @author Florian Lentsch <office@florian-lentsch.at>
* @license MIT
*
* ____________________________________________________________________________
* REQUIREMENTS: You may have to add "lib": ["esnext.asynciterable"] to
* your tsconfig.json - see https://stackoverflow.com/questions/43694281/ts2318-cannot-find-global-type-asynciterableiterator-async-generator?answertab=votes#tab-top
var CSL = require('citeproc')
var styleAsText = <contents of style.csl>
// Load your list of references
const references = {
item1: {
id: 'item1',
type: 'book',
title: 'Stuff',
{
"name": "tt",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "tap && echo success"
},
"author": "",
"license": "ISC",
import { createDB, createTable, insertMany, many } from "blinkdb";
import loki from "lokijs";
import { Bench } from "tinybench";
import charsJson from "./config2.json";
charsJson.forEach((char, i) => char.id = i)
interface Char {
id: number;
u: string;
import { createDB, createTable, insertMany, many } from "blinkdb";
import loki from "lokijs";
import { Bench } from "tinybench";
import charsJson from "./config2.json";
charsJson.forEach((char, i) => char.id = i)
interface Char {
id: number;
u: string;
import { createDB, createTable, insertMany, many } from "blinkdb";
import loki from "lokijs";
import { Bench } from "tinybench";
import charsJson from "./config2.json";
charsJson.forEach((char, i) => char.id = i)
interface Char {
id: number;
u: string;
print('zotero-live-citations a522fcd')
local mt, latest = pandoc.mediabag.fetch('https://retorque.re/zotero-better-bibtex/exporting/zotero.lua.revision')
latest = string.sub(latest, 1, 10)
if 'a522fcd' ~= latest then
print('new version "' .. latest .. '" available at https://retorque.re/zotero-better-bibtex/exporting')
end
do
local _ENV = _ENV
seeds: 2149186375 163827995 1217693442 67424215 365381741 74637275 1627905362 77016740 22956580 60539394 586585112 391263016 2740196667 355728559 2326609724 132259842 2479354214 184627854 3683286274 337630529
seed-to-soil map:
3229936931 3770233758 236381937
3646926122 3757559297 12674461
938394995 626913497 352323383
2516043511 0 51589736
3224558845 3632370674 5378086
3154383669 3733142176 3946275
2567633247 1181073360 126906268
'use strict';
const espree = require('espree');
module.exports = {
preprocess: function (text, filename) {
if (text[0] !== '{') return [{ text, filename }]
// detect header
const prefix = `const ZoteroTranslator${Date.now()} = `;