Appearance
Class: ExtraFieldTool
Defined in: src/tools/extraField.ts:6
Get/set extra field APIs.
Extends
Constructors
Constructor
ts
new ExtraFieldTool(data?): ExtraFieldTool;Defined in: src/basic.ts:40
Parameters
data?
Pass an BasicTool instance to copy its options.
Returns
ExtraFieldTool
Inherited from
Properties
_basicOptions
ts
protected _basicOptions: BasicOptions;Defined in: src/basic.ts:14
configurations.
Inherited from
_console?
ts
protected optional _console: Console;Defined in: src/basic.ts:16
Inherited from
patchSign
ts
protected readonly patchSign: string = "zotero-plugin-toolkit@3.0.0";Defined in: src/basic.ts:21
Deprecated
Use patcherManager instead.
Inherited from
_version
ts
static _version: string = version;Defined in: src/basic.ts:23
Inherited from
Accessors
_version
Get Signature
ts
get _version(): string;Defined in: src/basic.ts:28
Get version - checks subclass first, then falls back to parent
Returns
string
Inherited from
basicOptions
Get Signature
ts
get basicOptions(): BasicOptions;Defined in: src/basic.ts:32
Returns
Inherited from
Methods
_ensureMainWindowListener()
ts
protected _ensureMainWindowListener(): void;Defined in: src/basic.ts:368
Ensure the main window listener is registered.
Returns
void
Inherited from
BasicTool._ensureMainWindowListener
_ensurePluginListener()
ts
protected _ensurePluginListener(): void;Defined in: src/basic.ts:418
Ensure the plugin listener is registered.
Returns
void
Inherited from
BasicTool._ensurePluginListener
_ensureRemoveListener()
ts
protected _ensureRemoveListener(): void;Defined in: src/basic.ts:349
Remove all Zotero event listener callbacks when the last callback is removed.
Returns
void
Inherited from
BasicTool._ensureRemoveListener
addListenerCallback()
ts
addListenerCallback<T>(type, callback): void;Defined in: src/basic.ts:319
Add a Zotero event listener callback
Type Parameters
T
T extends keyof ListenerCallbackMap
Parameters
type
T
Event type
callback
ListenerCallbackMap[T]
Event callback
Returns
void
Inherited from
createXULElement()
ts
createXULElement(doc, type): XULElement;Defined in: src/basic.ts:212
Create an XUL element
For Zotero 6, use createElementNS;
For Zotero 7+, use createXULElement.
Parameters
doc
Document
type
string
Returns
XULElement
Example
Create a <menuitem>:
ts
const compat = new ZoteroCompat();
const doc = compat.getWindow().document;
const elem = compat.createXULElement(doc, "menuitem");Inherited from
getExtraField()
Call Signature
ts
getExtraField(
item,
key,
all?): undefined | string;Defined in: src/tools/extraField.ts:59
Get extra field value by key. If it does not exists, return undefined.
Parameters
item
Item
key
string
all?
false
Whether to return all values if the field appears multiple times.
Returns
undefined | string
Call Signature
ts
getExtraField(
item,
key,
all): undefined | string[];Defined in: src/tools/extraField.ts:64
Get extra field value by key. If it does not exists, return undefined.
Parameters
item
Item
key
string
all
true
Whether to return all values if the field appears multiple times.
Returns
undefined | string[]
getExtraFields()
Call Signature
ts
getExtraFields(item, parser): Map<string, string>;Defined in: src/tools/extraField.ts:14
Get all extra fields
Parameters
item
Item
Zotero item
parser
"classical"
Parsing mode:
- "enhanced": use the enhanced custom parser (supports duplicate keys)
- "classical": use Zotero’s built-in parser (single value per key)
Returns
Map<string, string>
Call Signature
ts
getExtraFields(item, parser?): Map<string, string[]>;Defined in: src/tools/extraField.ts:15
Get all extra fields
Parameters
item
Item
Zotero item
parser?
"enhanced"
Parsing mode:
- "enhanced": use the enhanced custom parser (supports duplicate keys)
- "classical": use Zotero’s built-in parser (single value per key)
Returns
Map<string, string[]>
getGlobal()
Call Signature
ts
getGlobal(k): typeof Zotero;Defined in: src/basic.ts:93
Alpha
Parameters
k
"Zotero" | "zotero"
Returns
typeof Zotero
Inherited from
Call Signature
ts
getGlobal(k): ZoteroPane;Defined in: src/basic.ts:98
Alpha
Parameters
k
"ZoteroPane" | "ZoteroPane_Local"
Returns
ZoteroPane
Inherited from
Call Signature
ts
getGlobal(k): Zotero_Tabs;Defined in: src/basic.ts:103
Alpha
Parameters
k
"Zotero_Tabs"
Returns
Zotero_Tabs
Inherited from
Call Signature
ts
getGlobal(k): any;Defined in: src/basic.ts:108
Alpha
Parameters
k
"Zotero_File_Interface"
Returns
any
Inherited from
Call Signature
ts
getGlobal(k): any;Defined in: src/basic.ts:113
Alpha
Parameters
k
"Zotero_File_Exporter"
Returns
any
Inherited from
Call Signature
ts
getGlobal(k): any;Defined in: src/basic.ts:118
Alpha
Parameters
k
"Zotero_LocateMenu"
Returns
any
Inherited from
Call Signature
ts
getGlobal(k): any;Defined in: src/basic.ts:123
Alpha
Parameters
k
"Zotero_Report_Interface"
Returns
any
Inherited from
Call Signature
ts
getGlobal(k): any;Defined in: src/basic.ts:128
Alpha
Parameters
k
"Zotero_Timeline_Interface"
Returns
any
Inherited from
Call Signature
ts
getGlobal(k): any;Defined in: src/basic.ts:133
Alpha
Parameters
k
"Zotero_Tooltip"
Returns
any
Inherited from
Call Signature
ts
getGlobal(k): ZoteroContextPane;Defined in: src/basic.ts:138
Alpha
Parameters
k
"ZoteroContextPane"
Returns
ZoteroContextPane
Inherited from
Call Signature
ts
getGlobal(k): any;Defined in: src/basic.ts:143
Alpha
Parameters
k
"ZoteroItemPane"
Returns
any
Inherited from
Call Signature
ts
getGlobal<K, GLOBAL>(k): GLOBAL[K];Defined in: src/basic.ts:148
Alpha
Type Parameters
K
K extends | "undefined" | "menubar" | "statusbar" | "toolbar" | "window" | "stop" | "length" | "toString" | "onafterprint" | "onbeforeprint" | "onbeforeunload" | "ongamepadconnected" | "ongamepaddisconnected" | "onhashchange" | "onlanguagechange" | "onmessage" | "onmessageerror" | "onoffline" | "ononline" | "onpagehide" | "onpagereveal" | "onpageshow" | "onpageswap" | "onpopstate" | "onrejectionhandled" | "onstorage" | "onunhandledrejection" | "onunload" | "WeakRef" | "top" | "blur" | "close" | "focus" | "scroll" | "document" | "Zotero" | "globalThis" | "eval" | "parseInt" | "parseFloat" | "isNaN" | "isFinite" | "decodeURI" | "decodeURIComponent" | "encodeURI" | "encodeURIComponent" | "escape" | "unescape" | "NaN" | "Infinity" | "Symbol" | "Object" | "Function" | "String" | "Boolean" | "Number" | "Math" | "Date" | "RegExp" | "Error" | "EvalError" | "RangeError" | "ReferenceError" | "SyntaxError" | "TypeError" | "URIError" | "JSON" | "Array" | "Promise" | "ArrayBuffer" | "DataView" | "Int8Array" | "Uint8Array" | "Uint8ClampedArray" | "Int16Array" | "Uint16Array" | "Int32Array" | "Uint32Array" | "Float32Array" | "Float64Array" | "Intl" | "alert" | "cancelIdleCallback" | "captureEvents" | "confirm" | "getComputedStyle" | "getSelection" | "matchMedia" | "moveBy" | "moveTo" | "open" | "postMessage" | "print" | "prompt" | "releaseEvents" | "requestIdleCallback" | "resizeBy" | "resizeTo" | "scrollBy" | "scrollTo" | "dispatchEvent" | "cancelAnimationFrame" | "requestAnimationFrame" | "atob" | "btoa" | "clearInterval" | "clearTimeout" | "createImageBitmap" | "fetch" | "queueMicrotask" | "reportError" | "setInterval" | "setTimeout" | "structuredClone" | "addEventListener" | "removeEventListener" | "NodeFilter" | "AbortController" | "AbortSignal" | "AbstractRange" | "AnalyserNode" | "Animation" | "AnimationEffect" | "AnimationEvent" | "AnimationPlaybackEvent" | "AnimationTimeline" | "Attr" | "AudioBuffer" | "AudioBufferSourceNode" | "AudioContext" | "AudioData" | "AudioDecoder" | "AudioDestinationNode" | "AudioEncoder" | "AudioListener" | "AudioNode" | "AudioParam" | "AudioParamMap" | "AudioProcessingEvent" | "AudioScheduledSourceNode" | "AudioWorklet" | "AudioWorkletNode" | "AuthenticatorAssertionResponse" | "AuthenticatorAttestationResponse" | "AuthenticatorResponse" | "BarProp" | "BaseAudioContext" | "BeforeUnloadEvent" | "BiquadFilterNode" | "Blob" | "BlobEvent" | "BroadcastChannel" | "ByteLengthQueuingStrategy" | "CDATASection" | "CSPViolationReportBody" | "CSSAnimation" | "CSSConditionRule" | "CSSContainerRule" | "CSSCounterStyleRule" | "CSSFontFaceRule" | "CSSFontFeatureValuesRule" | "CSSFontPaletteValuesRule" | "CSSGroupingRule" | "CSSImageValue" | "CSSImportRule" | "CSSKeyframeRule" | "CSSKeyframesRule" | "CSSKeywordValue" | "CSSLayerBlockRule" | "CSSLayerStatementRule" | "CSSMathClamp" | "CSSMathInvert" | "CSSMathMax" | "CSSMathMin" | "CSSMathNegate" | "CSSMathProduct" | "CSSMathSum" | "CSSMathValue" | "CSSMatrixComponent" | "CSSMediaRule" | "CSSNamespaceRule" | "CSSNestedDeclarations" | "CSSNumericArray" | "CSSNumericValue" | "CSSPageRule" | "CSSPerspective" | "CSSPropertyRule" | "CSSRotate" | "CSSRule" | "CSSRuleList" | "CSSScale" | "CSSScopeRule" | "CSSSkew" | "CSSSkewX" | "CSSSkewY" | "CSSStartingStyleRule" | "CSSStyleDeclaration" | "CSSStyleRule" | "CSSStyleSheet" | "CSSStyleValue" | "CSSSupportsRule" | "CSSTransformComponent" | "CSSTransformValue" | "CSSTransition" | "CSSTranslate" | "CSSUnitValue" | "CSSUnparsedValue" | "CSSVariableReferenceValue" | "CSSViewTransitionRule" | "Cache" | "CacheStorage" | "CanvasCaptureMediaStreamTrack" | "CanvasGradient" | "CanvasPattern" | "CanvasRenderingContext2D" | "CaretPosition" | "ChannelMergerNode" | "ChannelSplitterNode" | "CharacterData" | "Clipboard" | "ClipboardEvent" | "ClipboardItem" | "CloseEvent" | "Comment" | "CompositionEvent" | "CompressionStream" | "ConstantSourceNode" | "ContentVisibilityAutoStateChangeEvent" | "ConvolverNode" | "CookieChangeEvent" | "CookieStore" | "CookieStoreManager" | "CountQueuingStrategy" | "Credential" | "CredentialsContainer" | "Crypto" | "CryptoKey" | "CustomElementRegistry" | "CustomEvent" | "CustomStateSet" | "DOMException" | "DOMImplementation" | "DOMMatrix" | "SVGMatrix" | "WebKitCSSMatrix" | "DOMMatrixReadOnly" | "DOMParser" | "DOMPoint" | "SVGPoint" | "DOMPointReadOnly" | "DOMQuad" | "DOMRect" | "SVGRect" | "DOMRectList" | "DOMRectReadOnly" | "DOMStringList" | "DOMStringMap" | "DOMTokenList" | "DataTransfer" | "DataTransferItem" | "DataTransferItemList" | "DecompressionStream" | "DelayNode" | "DeviceMotionEvent" | "DeviceOrientationEvent" | "Document" | "DocumentFragment" | "DocumentTimeline" | "DocumentType" | "DragEvent" | "DynamicsCompressorNode" | "Element" | "ElementInternals" | "EncodedAudioChunk" | "EncodedVideoChunk" | "ErrorEvent" | "Event" | "EventCounts" | "EventSource" | "EventTarget" | "External" | "File" | "FileList" | "FileReader" | "FileSystem" | "FileSystemDirectoryEntry" | "FileSystemDirectoryHandle" | "FileSystemDirectoryReader" | "FileSystemEntry" | "FileSystemFileEntry" | "FileSystemFileHandle" | "FileSystemHandle" | "FileSystemWritableFileStream" | "FocusEvent" | "FontFace" | "FontFaceSet" | "FontFaceSetLoadEvent" | "FormData" | "FormDataEvent" | "FragmentDirective" | "GPUError" | "GainNode" | "Gamepad" | "GamepadButton" | "GamepadEvent" | "GamepadHapticActuator" | "Geolocation" | "GeolocationCoordinates" | "GeolocationPosition" | "GeolocationPositionError" | "HTMLAllCollection" | "HTMLAnchorElement" | "HTMLAreaElement" | "HTMLAudioElement" | "HTMLBRElement" | "HTMLBaseElement" | "HTMLBodyElement" | "HTMLButtonElement" | "HTMLCanvasElement" | "HTMLCollection" | "HTMLDListElement" | "HTMLDataElement" | "HTMLDataListElement" | "HTMLDetailsElement" | "HTMLDialogElement" | "HTMLDirectoryElement" | "HTMLDivElement" | "HTMLDocument" | "HTMLElement" | "HTMLEmbedElement" | "HTMLFieldSetElement" | "HTMLFontElement" | "HTMLFormControlsCollection" | "HTMLFormElement" | "HTMLFrameElement" | "HTMLFrameSetElement" | "HTMLHRElement" | "HTMLHeadElement" | "HTMLHeadingElement" | "HTMLHtmlElement" | "HTMLIFrameElement" | "HTMLImageElement" | "HTMLInputElement" | "HTMLLIElement" | "HTMLLabelElement" | "HTMLLegendElement" | "HTMLLinkElement" | "HTMLMapElement" | "HTMLMarqueeElement" | "HTMLMediaElement" | "HTMLMenuElement" | "HTMLMetaElement" | "HTMLMeterElement" | "HTMLModElement" | "HTMLOListElement" | "HTMLObjectElement" | "HTMLOptGroupElement" | "HTMLOptionElement" | "HTMLOptionsCollection" | "HTMLOutputElement" | "HTMLParagraphElement" | "HTMLParamElement" | "HTMLPictureElement" | "HTMLPreElement" | "HTMLProgressElement" | "HTMLQuoteElement" | "HTMLScriptElement" | "HTMLSelectElement" | "HTMLSlotElement" | "HTMLSourceElement" | "HTMLSpanElement" | "HTMLStyleElement" | "HTMLTableCaptionElement" | "HTMLTableCellElement" | "HTMLTableColElement" | "HTMLTableElement" | "HTMLTableRowElement" | "HTMLTableSectionElement" | "HTMLTemplateElement" | "HTMLTextAreaElement" | "HTMLTimeElement" | "HTMLTitleElement" | "HTMLTrackElement" | "HTMLUListElement" | "HTMLUnknownElement" | "HTMLVideoElement" | "HashChangeEvent" | "Headers" | "Highlight" | "HighlightRegistry" | "History" | "IDBCursor" | "IDBCursorWithValue" | "IDBDatabase" | "IDBFactory" | "IDBIndex" | "IDBKeyRange" | "IDBObjectStore" | "IDBOpenDBRequest" | "IDBRequest" | "IDBTransaction" | "IDBVersionChangeEvent" | "IIRFilterNode" | "IdleDeadline" | "ImageBitmap" | "ImageBitmapRenderingContext" | "ImageCapture" | "ImageData" | "ImageDecoder" | "ImageTrack" | "ImageTrackList" | "InputDeviceInfo" | "InputEvent" | "IntersectionObserver" | "IntersectionObserverEntry" | "KeyboardEvent" | "KeyframeEffect" | "LargestContentfulPaint" | "Location" | "Lock" | "LockManager" | "MIDIAccess" | "MIDIConnectionEvent" | "MIDIInput" | "MIDIInputMap" | "MIDIMessageEvent" | "MIDIOutput" | "MIDIOutputMap" | "MIDIPort" | "MathMLElement" | "MediaCapabilities" | "MediaDeviceInfo" | "MediaDevices" | "MediaElementAudioSourceNode" | "MediaEncryptedEvent" | "MediaError" | "MediaKeyMessageEvent" | "MediaKeySession" | "MediaKeyStatusMap" | "MediaKeySystemAccess" | "MediaKeys" | "MediaList" | "MediaMetadata" | "MediaQueryList" | "MediaQueryListEvent" | "MediaRecorder" | "MediaSession" | "MediaSource" | "MediaSourceHandle" | "MediaStream" | "MediaStreamAudioDestinationNode" | "MediaStreamAudioSourceNode" | "MediaStreamTrack" | "MediaStreamTrackEvent" | "MessageChannel" | "MessageEvent" | "MessagePort" | "MimeType" | "MimeTypeArray" | "MouseEvent" | "MutationObserver" | "MutationRecord" | "NamedNodeMap" | "NavigationActivation" | "NavigationHistoryEntry" | "NavigationPreloadManager" | "Navigator" | "NavigatorLogin" | "Node" | "NodeIterator" | "NodeList" | "Notification" | "OfflineAudioCompletionEvent" | "OfflineAudioContext" | "OffscreenCanvas" | "OffscreenCanvasRenderingContext2D" | "OscillatorNode" | "OverconstrainedError" | "PageRevealEvent" | "PageSwapEvent" | "PageTransitionEvent" | "PannerNode" | "Path2D" | "PaymentAddress" | "PaymentMethodChangeEvent" | "PaymentRequest" | "PaymentRequestUpdateEvent" | "PaymentResponse" | "Performance" | "PerformanceEntry" | "PerformanceEventTiming" | "PerformanceMark" | "PerformanceMeasure" | "PerformanceNavigation" | "PerformanceNavigationTiming" | "PerformanceObserver" | "PerformanceObserverEntryList" | "PerformancePaintTiming" | "PerformanceResourceTiming" | "PerformanceServerTiming" | "PerformanceTiming" | "PeriodicWave" | "PermissionStatus" | "Permissions" | "PictureInPictureEvent" | "PictureInPictureWindow" | "Plugin" | "PluginArray" | "PointerEvent" | "PopStateEvent" | "ProcessingInstruction" | "ProgressEvent" | "PromiseRejectionEvent" | "PublicKeyCredential" | "PushManager" | "PushSubscription" | "PushSubscriptionOptions" | "RTCCertificate" | "RTCDTMFSender" | "RTCDTMFToneChangeEvent" | "RTCDataChannel" | "RTCDataChannelEvent" | "RTCDtlsTransport" | "RTCEncodedAudioFrame" | "RTCEncodedVideoFrame" | "RTCError" | "RTCErrorEvent" | "RTCIceCandidate" | "RTCIceTransport" | "RTCPeerConnection" | "RTCPeerConnectionIceErrorEvent" | "RTCPeerConnectionIceEvent" | "RTCRtpReceiver" | "RTCRtpScriptTransform" | "RTCRtpSender" | "RTCRtpTransceiver" | "RTCSctpTransport" | "RTCSessionDescription" | "RTCStatsReport" | "RTCTrackEvent" | "RadioNodeList" | "Range" | "ReadableByteStreamController" | "ReadableStream" | "ReadableStreamBYOBReader" | "ReadableStreamBYOBRequest" | "ReadableStreamDefaultController" | "ReadableStreamDefaultReader" | "RemotePlayback" | "Report" | "ReportBody" | "ReportingObserver" | "Request" | "ResizeObserver" | "ResizeObserverEntry" | "ResizeObserverSize" | "Response" | "SVGAElement" | "SVGAngle" | "SVGAnimateElement" | "SVGAnimateMotionElement" | "SVGAnimateTransformElement" | "SVGAnimatedAngle" | "SVGAnimatedBoolean" | "SVGAnimatedEnumeration" | "SVGAnimatedInteger" | "SVGAnimatedLength" | "SVGAnimatedLengthList" | "SVGAnimatedNumber" | "SVGAnimatedNumberList" | "SVGAnimatedPreserveAspectRatio" | "SVGAnimatedRect" | "SVGAnimatedString" | "SVGAnimatedTransformList" | "SVGAnimationElement" | "SVGCircleElement" | "SVGClipPathElement" | "SVGComponentTransferFunctionElement" | "SVGDefsElement" | "SVGDescElement" | "SVGElement" | "SVGEllipseElement" | "SVGFEBlendElement" | "SVGFEColorMatrixElement" | "SVGFEComponentTransferElement" | "SVGFECompositeElement" | "SVGFEConvolveMatrixElement" | "SVGFEDiffuseLightingElement" | "SVGFEDisplacementMapElement" | "SVGFEDistantLightElement" | "SVGFEDropShadowElement" | "SVGFEFloodElement" | "SVGFEFuncAElement" | "SVGFEFuncBElement" | "SVGFEFuncGElement" | "SVGFEFuncRElement" | "SVGFEGaussianBlurElement" | "SVGFEImageElement" | "SVGFEMergeElement" | "SVGFEMergeNodeElement" | "SVGFEMorphologyElement" | "SVGFEOffsetElement" | "SVGFEPointLightElement" | "SVGFESpecularLightingElement" | "SVGFESpotLightElement" | "SVGFETileElement" | "SVGFETurbulenceElement" | "SVGFilterElement" | "SVGForeignObjectElement" | "SVGGElement" | "SVGGeometryElement" | "SVGGradientElement" | "SVGGraphicsElement" | "SVGImageElement" | "SVGLength" | "SVGLengthList" | "SVGLineElement" | "SVGLinearGradientElement" | "SVGMPathElement" | "SVGMarkerElement" | "SVGMaskElement" | "SVGMetadataElement" | "SVGNumber" | "SVGNumberList" | "SVGPathElement" | "SVGPatternElement" | "SVGPointList" | "SVGPolygonElement" | "SVGPolylineElement" | "SVGPreserveAspectRatio" | "SVGRadialGradientElement" | "SVGRectElement" | "SVGSVGElement" | "SVGScriptElement" | "SVGSetElement" | "SVGStopElement" | "SVGStringList" | "SVGStyleElement" | "SVGSwitchElement" | "SVGSymbolElement" | "SVGTSpanElement" | "SVGTextContentElement" | "SVGTextElement" | "SVGTextPathElement" | "SVGTextPositioningElement" | "SVGTitleElement" | "SVGTransform" | "SVGTransformList" | "SVGUnitTypes" | "SVGUseElement" | "SVGViewElement" | "Screen" | "ScreenOrientation" | "ScriptProcessorNode" | "SecurityPolicyViolationEvent" | "Selection" | "ServiceWorker" | "ServiceWorkerContainer" | "ServiceWorkerRegistration" | "ShadowRoot" | "SharedWorker" | "SourceBuffer" | "SourceBufferList" | "SpeechRecognitionAlternative" | "SpeechRecognitionResult" | "SpeechRecognitionResultList" | "SpeechSynthesis" | "SpeechSynthesisErrorEvent" | "SpeechSynthesisEvent" | "SpeechSynthesisUtterance" | "SpeechSynthesisVoice" | "StaticRange" | "StereoPannerNode" | "Storage" | "StorageEvent" | "StorageManager" | "StylePropertyMap" | "StylePropertyMapReadOnly" | "StyleSheet" | "StyleSheetList" | "SubmitEvent" | "SubtleCrypto" | "Text" | "TextDecoder" | "TextDecoderStream" | "TextEncoder" | "TextEncoderStream" | "TextEvent" | "TextMetrics" | "TextTrack" | "TextTrackCue" | "TextTrackCueList" | "TextTrackList" | "TimeRanges" | "ToggleEvent" | "Touch" | "TouchEvent" | "TouchList" | "TrackEvent" | "TransformStream" | "TransformStreamDefaultController" | "TransitionEvent" | "TreeWalker" | "UIEvent" | "URL" | "webkitURL" | "URLSearchParams" | "UserActivation" | "VTTCue" | "VTTRegion" | "ValidityState" | "VideoColorSpace" | "VideoDecoder" | "VideoEncoder" | "VideoFrame" | "VideoPlaybackQuality" | "ViewTransition" | "ViewTransitionTypeSet" | "VisualViewport" | "WakeLock" | "WakeLockSentinel" | "WaveShaperNode" | "WebGL2RenderingContext" | "WebGLActiveInfo" | "WebGLBuffer" | "WebGLContextEvent" | "WebGLFramebuffer" | "WebGLProgram" | "WebGLQuery" | "WebGLRenderbuffer" | "WebGLRenderingContext" | "WebGLSampler" | "WebGLShader" | "WebGLShaderPrecisionFormat" | "WebGLSync" | "WebGLTexture" | "WebGLTransformFeedback" | "WebGLUniformLocation" | "WebGLVertexArrayObject" | "WebSocket" | "WebTransport" | "WebTransportBidirectionalStream" | "WebTransportDatagramDuplexStream" | "WebTransportError" | "WheelEvent" | "Window" | "Worker" | "Worklet" | "WritableStream" | "WritableStreamDefaultController" | "WritableStreamDefaultWriter" | "XMLDocument" | "XMLHttpRequest" | "XMLHttpRequestEventTarget" | "XMLHttpRequestUpload" | "XMLSerializer" | "XPathEvaluator" | "XPathExpression" | "XPathResult" | "XSLTProcessor" | "CSS" | "WebAssembly" | "console" | "Audio" | "Image" | "Option" | "clientInformation" | "closed" | "cookieStore" | "customElements" | "devicePixelRatio" | "event" | "external" | "frameElement" | "frames" | "history" | "innerHeight" | "innerWidth" | "location" | "locationbar" | "navigator" | "ondevicemotion" | "ondeviceorientation" | "ondeviceorientationabsolute" | "onorientationchange" | "opener" | "orientation" | "originAgentCluster" | "outerHeight" | "outerWidth" | "pageXOffset" | "pageYOffset" | "parent" | "personalbar" | "screen" | "screenLeft" | "screenTop" | "screenX" | "screenY" | "scrollX" | "scrollY" | "scrollbars" | "self" | "speechSynthesis" | "status" | "visualViewport" | "onabort" | "onanimationcancel" | "onanimationend" | "onanimationiteration" | "onanimationstart" | "onauxclick" | "onbeforeinput" | "onbeforematch" | "onbeforetoggle" | "onblur" | "oncancel" | "oncanplay" | "oncanplaythrough" | "onchange" | "onclick" | "onclose" | "oncontextlost" | "oncontextmenu" | "oncontextrestored" | "oncopy" | "oncuechange" | "oncut" | "ondblclick" | "ondrag" | "ondragend" | "ondragenter" | "ondragleave" | "ondragover" | "ondragstart" | "ondrop" | "ondurationchange" | "onemptied" | "onended" | "onerror" | "onfocus" | "onformdata" | "ongotpointercapture" | "oninput" | "oninvalid" | "onkeydown" | "onkeypress" | "onkeyup" | "onload" | "onloadeddata" | "onloadedmetadata" | "onloadstart" | "onlostpointercapture" | "onmousedown" | "onmouseenter" | "onmouseleave" | "onmousemove" | "onmouseout" | "onmouseover" | "onmouseup" | "onpaste" | "onpause" | "onplay" | "onplaying" | "onpointercancel" | "onpointerdown" | "onpointerenter" | "onpointerleave" | "onpointermove" | "onpointerout" | "onpointerover" | "onpointerrawupdate" | "onpointerup" | "onprogress" | "onratechange" | "onreset" | "onresize" | "onscroll" | "onscrollend" | "onsecuritypolicyviolation" | "onseeked" | "onseeking" | "onselect" | "onselectionchange" | "onselectstart" | "onslotchange" | "onstalled" | "onsubmit" | "onsuspend" | "ontimeupdate" | "ontoggle" | "ontouchcancel" | "ontouchend" | "ontouchmove" | "ontouchstart" | "ontransitioncancel" | "ontransitionend" | "ontransitionrun" | "ontransitionstart" | "onvolumechange" | "onwaiting" | "onwebkitanimationend" | "onwebkitanimationiteration" | "onwebkitanimationstart" | "onwebkittransitionend" | "onwheel" | "localStorage" | "caches" | "crossOriginIsolated" | "crypto" | "indexedDB" | "isSecureContext" | "origin" | "performance" | "sessionStorage" | "importScripts" | "Client" | "Clients" | "DedicatedWorkerGlobalScope" | "ExtendableCookieChangeEvent" | "ExtendableEvent" | "ExtendableMessageEvent" | "FetchEvent" | "FileReaderSync" | "FileSystemSyncAccessHandle" | "MediaStreamTrackProcessor" | "NotificationEvent" | "PushEvent" | "PushMessageData" | "PushSubscriptionChangeEvent" | "RTCRtpScriptTransformer" | "RTCTransformEvent" | "ServiceWorkerGlobalScope" | "SharedWorkerGlobalScope" | "WindowClient" | "WorkerGlobalScope" | "WorkerLocation" | "WorkerNavigator" | "onrtctransform" | "fonts" | "Map" | "WeakMap" | "Set" | "WeakSet" | "Iterator" | "Proxy" | "Reflect" | "SharedArrayBuffer" | "Atomics" | "BigInt" | "BigInt64Array" | "BigUint64Array" | "AggregateError" | "FinalizationRegistry" | "SuppressedError" | "DisposableStack" | "AsyncDisposableStack" | "Float16Array" | "TrustedHTML" | "React" | "ReactDOM" | "AccessibleNode" | "Addon" | "AddonEvent" | "AddonInstall" | "AddonManager" | "AnonymousContent" | "AudioTrack" | "AudioTrackList" | "BatteryManager" | "BrowsingContext" | "BrowsingContextGroup" | "CSSCustomPropertyRegisteredEvent" | "CSSMarginRule" | "CSSMozDocumentRule" | "CSSPositionTryRule" | "CSSPseudoElement" | "CallbackDebuggerNotification" | "CanonicalBrowsingContext" | "CanvasCaptureMediaStream" | "CaretStateChangedEvent" | "ChannelWrapper" | "CheckerboardReportService" | "ChildProcessMessageManager" | "ChildSHistory" | "ChromeMessageBroadcaster" | "ChromeMessageSender" | "ChromeNodeList" | "ChromeWorker" | "ClonedErrorHolder" | "CloseWatcher" | "CommandEvent" | "ConsoleInstance" | "ContentFrameMessageManager" | "ContentProcessMessageManager" | "CreateOfferRequest" | "DOMLocalization" | "DebuggerNotification" | "DebuggerNotificationObserver" | "DeprecationReportBody" | "DeviceLightEvent" | "Directory" | "DominatorTree" | "EventCallbackDebuggerNotification" | "FeaturePolicyViolationReportBody" | "FetchObserver" | "Flex" | "FlexItemValues" | "FlexLineValues" | "FluentBundle" | "FluentPattern" | "FluentResource" | "FrameCrashedEvent" | "FrameLoader" | "GPU" | "GPUAdapter" | "GPUAdapterInfo" | "GPUBindGroup" | "GPUBindGroupLayout" | "GPUBuffer" | "GPUCanvasContext" | "GPUCommandBuffer" | "GPUCommandEncoder" | "GPUCompilationInfo" | "GPUCompilationMessage" | "GPUComputePassEncoder" | "GPUComputePipeline" | "GPUDevice" | "GPUDeviceLostInfo" | "GPUExternalTexture" | "GPUInternalError" | "GPUOutOfMemoryError" | "GPUPipelineError" | "GPUPipelineLayout" | "GPUQuerySet" | "GPUQueue" | "GPURenderBundle" | "GPURenderBundleEncoder" | "GPURenderPassEncoder" | "GPURenderPipeline" | "GPUSampler" | "GPUShaderModule" | "GPUSupportedFeatures" | "GPUSupportedLimits" | "GPUTexture" | "GPUTextureView" | "GPUUncapturedErrorEvent" | "GPUValidationError" | "GamepadAxisMoveEvent" | "GamepadButtonEvent" | "GamepadLightIndicator" | "GamepadPose" | "GamepadServiceTest" | "GamepadTouch" | "GleanBoolean" | "GleanCategory" | "GleanCounter" | "GleanCustomDistribution" | "GleanDatetime" | "GleanDenominator" | "GleanEvent" | "GleanImpl" | "GleanLabeled" | "GleanMemoryDistribution" | "GleanMetric" | "GleanNumerator" | "GleanObject" | "GleanPingsImpl" | "GleanQuantity" | "GleanRate" | "GleanString" | "GleanStringList" | "GleanText" | "GleanTimespan" | "GleanTimingDistribution" | "GleanUrl" | "GleanUuid" | "Grid" | "GridArea" | "GridDimension" | "GridLine" | "GridLines" | "GridTrack" | "GridTracks" | "HeapSnapshot" | "IdentityCredential" | "ImageCaptureErrorEvent" | "ImageDocument" | "InspectorCSSParser" | "InspectorFontFace" | "InstallTriggerImpl" | "InvokeEvent" | "JSProcessActorChild" | "JSProcessActorParent" | "JSWindowActorChild" | "JSWindowActorParent" | "KeyEvent" | "L10nFileSource" | "L10nRegistry" | "Localization" | "MLS" | "MLSGroupView" | "MatchGlob" | "MatchPattern" | "MatchPatternSet" | "MediaController" | "MediaKeyError" | "MediaRecorderErrorEvent" | "MediaStreamEvent" | "MediaStreamTrackAudioSourceNode" | "MerchantValidationEvent" | "MessageBroadcaster" | "MessageListenerManager" | "MessageSender" | "MouseScrollEvent" | "MozCanvasPrintState" | "MozDocumentMatcher" | "MozDocumentObserver" | "MozQueryInterface" | "MozSharedMap" | "MozSharedMapChangeEvent" | "MozStorageAsyncStatementParams" | "MozStorageStatementParams" | "MozStorageStatementRow" | "MozWritableSharedMap" | "MutationEvent" | "NavigateEvent" | "Navigation" | "NavigationCurrentEntryChangeEvent" | "NavigationDestination" | "NavigationTransition" | "NetworkInformation" | "NotifyPaintEvent" | "PaintRequest" | "PaintRequestList" | "ParentProcessMessageManager" | "PeerConnectionImpl" | "PeerConnectionObserver" | "PerformanceEntryEvent" | "PlacesBookmark" | "PlacesBookmarkAddition" | "PlacesBookmarkChanged" | "PlacesBookmarkGuid" | "PlacesBookmarkKeyword" | "PlacesBookmarkMoved" | "PlacesBookmarkRemoved" | "PlacesBookmarkTags" | "PlacesBookmarkTime" | "PlacesBookmarkTitle" | "PlacesBookmarkUrl" | "PlacesEvent" | "PlacesEventCounts" | "PlacesFavicon" | "PlacesHistoryCleared" | "PlacesPurgeCaches" | "PlacesRanking" | "PlacesVisit" | "PlacesVisitRemoved" | "PlacesVisitTitle" | "PlacesWeakCallbackWrapper" | "PluginCrashedEvent" | "PopupBlockedEvent" | "PopupPositionedEvent" | "PositionStateEvent" | "PrecompiledScript" | "PrivateAttribution" | "ProcessMessageManager" | "PushManagerImpl" | "RTCPeerConnectionStatic" | "Sanitizer" | "Scheduler" | "ScreenLuminance" | "ScrollAreaEvent" | "SessionStoreFormData" | "SessionStoreScrollData" | "SimpleGestureEvent" | "SpeechGrammar" | "SpeechGrammarList" | "SpeechRecognition" | "SpeechRecognitionError" | "SpeechRecognitionEvent" | "StreamFilter" | "StreamFilterDataEvent" | "StructuredCloneHolder" | "StructuredCloneTester" | "StyleSheetApplicableStateChangeEvent" | "StyleSheetRemovedEvent" | "SyncMessageSender" | "TCPServerSocket" | "TCPServerSocketEvent" | "TCPSocket" | "TCPSocketErrorEvent" | "TCPSocketEvent" | "TaskController" | "TaskPriorityChangeEvent" | "TaskSignal" | "TestFunctions" | "TestInterfaceAsyncIterableDouble" | "TestInterfaceAsyncIterableDoubleUnion" | "TestInterfaceAsyncIterableSingle" | "TestInterfaceAsyncIterableSingleWithArgs" | "TestInterfaceIterableDouble" | "TestInterfaceIterableDoubleUnion" | "TestInterfaceIterableSingle" | "TestInterfaceJS" | "TestInterfaceLength" | "TestInterfaceMaplike" | "TestInterfaceMaplikeJSObject" | "TestInterfaceMaplikeObject" | "TestInterfaceObservableArray" | "TestInterfaceSetlike" | "TestInterfaceSetlikeNode" | "TestReflectedHTMLAttribute" | "TestTrialInterface" | "TestingDeprecatedInterface" | "TextClause" | "TimeEvent" | "TreeColumn" | "TreeColumns" | "TreeContentView" | "TrustedScript" | "TrustedScriptURL" | "TrustedTypePolicy" | "TrustedTypePolicyFactory" | "UDPMessageEvent" | "UDPSocket" | "UniFFIPointer" | "UserProximityEvent" | "VRDisplay" | "VRDisplayCapabilities" | "VRDisplayEvent" | "VREyeParameters" | "VRFieldOfView" | "VRFrameData" | "VRMockController" | "VRMockDisplay" | "VRPose" | "VRServiceTest" | "VRStageParameters" | "VideoTrack" | "VideoTrackList" | "WGSLLanguageFeatures" | "WebExtensionContentScript" | "WebExtensionPolicy" | "WebTransportReceiveStream" | "WebTransportSendStream" | "WindowContext" | "WindowGlobalChild" | "WindowGlobalParent" | "WindowRoot" | "WrapperCachedNonISupportsTestInterface" | "XRBoundedReferenceSpace" | "XRFrame" | "XRInputSource" | "XRInputSourceArray" | "XRInputSourceEvent" | "XRInputSourcesChangeEvent" | "XRPose" | "XRReferenceSpace" | "XRReferenceSpaceEvent" | "XRRenderState" | "XRRigidTransform" | "XRSession" | "XRSessionEvent" | "XRSpace" | "XRSystem" | "XRView" | "XRViewerPose" | "XRViewport" | "XRWebGLLayer" | "XULCommandEvent" | "XULElement" | "XULFrameElement" | "XULMenuElement" | "XULPopupElement" | "XULResizerElement" | "XULTextElement" | "XULTreeElement" | "AddonManagerPermissions" | "ChromeUtils" | "FuzzingFunctions" | "IOUtils" | "InspectorUtils" | "L10nOverlays" | "MediaControlService" | "Nyx" | "PathUtils" | "PlacesObservers" | "PromiseDebugging" | "SessionStoreUtils" | "TestUtils" | "UniFFIScaffolding" | "UserInteraction" | "WebrtcGlobalInformation" | "webkitSpeechGrammar" | "webkitSpeechGrammarList" | "webkitSpeechRecognition" | "_ZoteroTypes" | "ePub" | "Buffer" | "global" | "process" | "gc" | "__dirname" | "__filename" | "exports" | "module" | "require" | "setImmediate" | "clearImmediate" | "URLPattern"
GLOBAL
GLOBAL extends typeof globalThis
Parameters
k
K
Returns
GLOBAL[K]
Inherited from
Call Signature
ts
getGlobal(k): any;Defined in: src/basic.ts:156
Get global variables.
Parameters
k
string
Global variable name, Zotero, ZoteroPane, window, document, etc.
Returns
any
Inherited from
isXULElement()
ts
isXULElement(elem): boolean;Defined in: src/basic.ts:189
If it's an XUL element
Parameters
elem
Element
Returns
boolean
Inherited from
log()
ts
log(...data): void;Defined in: src/basic.ts:221
Output to both Zotero.debug and console.log
Parameters
data
...any
e.g. string, number, object, ...
Returns
void
Inherited from
patch()
ts
patch<T, K>(
object,
funcSign,
ownerSign,
patcher): void;Defined in: src/basic.ts:300
Patch a function
Type Parameters
T
T
K
K extends string | number | symbol
Parameters
object
T
The owner of the function
funcSign
K
The signature of the function(function name)
ownerSign
string
The signature of patch owner to avoid patching again
patcher
(fn) => T[K]
The new wrapper of the patched function
Returns
void
Deprecated
Use PatchHelper instead.
Inherited from
removeListenerCallback()
ts
removeListenerCallback<T>(type, callback): void;Defined in: src/basic.ts:337
Remove a Zotero event listener callback
Type Parameters
T
T extends keyof ListenerCallbackMap
Parameters
type
T
Event type
callback
ListenerCallbackMap[T]
Event callback
Returns
void
Inherited from
BasicTool.removeListenerCallback
replaceExtraFields()
ts
replaceExtraFields(
item,
fields,
options?): Promise<void>;Defined in: src/tools/extraField.ts:87
Replace extra field of an item.
Parameters
item
Item
fields
Map<string, string[]>
options?
Additional options.
save?
boolean
Whether to save the item, default to true.
Returns
Promise<void>
setExtraField()
ts
setExtraField(
item,
key,
value,
options): Promise<void>;Defined in: src/tools/extraField.ts:115
Set a key-value pair in the item's extra field. If the key already exists, it can be overwritten or appended.
Parameters
item
Item
Zotero item
key
string
Field key
value
Field value or list of values
string | string[]
options
Additional options
append?
boolean
Whether to append to existing values, default to false
save?
boolean
Whether to save the item, default to true
Returns
Promise<void>
updateOptions()
ts
updateOptions(source?): ExtraFieldTool;Defined in: src/basic.ts:442
Parameters
source?
Returns
ExtraFieldTool
Inherited from
getZotero()
ts
static getZotero(): typeof Zotero;Defined in: src/basic.ts:454
Returns
typeof Zotero