MCPcopy
hub / github.com/liriliri/eruda / Tool

Interface Tool

eruda.d.ts:67–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 * @see https://eruda.liriliri.io/docs/plugin.html
66 */
67 export interface Tool {
68 /**
69 * Every plugin must have a unique name, which will be shown as the tab name on the top.
70 */
71 name: string
72 /**
73 * Called when plugin is added, and a document element used to display content is passed in.
74 * The element is wrapped as a jQuery like object, provided by the licia utility library.
75 */
76 init(el: unknown): void
77 /**
78 * Called when switch to the panel. Usually all you need to do is to show the container element.
79 */
80 show(): Tool | undefined
81 /**
82 * Called when switch to other panel. You should at least hide the container element here.
83 */
84 hide(): Tool | undefined
85 /**
86 * Called when plugin is removed using `eruda.remove('plugin name')`.
87 */
88 destroy(): void
89 }
90
91 export interface ToolConstructor {
92 new (): Tool

Callers 32

init.jsFile · 0.65
eruda.jsFile · 0.65
bootFunction · 0.65
initMethod · 0.65
initMethod · 0.65
initMethod · 0.65
initMethod · 0.65
initMethod · 0.65
elements.jsFile · 0.65
network.jsFile · 0.65
resources.jsFile · 0.65
sources.jsFile · 0.65

Implementers 2

Resourcessrc/Resources/Resources.js
Elementssrc/Elements/Elements.js

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…