MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / add

Method add

pages/viewScriptSource/libs/highlight.min.js:29–30  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

27;return Object.assign(t,e),t};class c{constructor(){
28this.rootNode=a(),this.stack=[this.rootNode]}get top(){
29return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){
30this.top.children.push(e)}openNode(e){const t=a({scope:e})
31;this.add(t),this.stack.push(t)}closeNode(){
32if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){
33for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}

Callers 14

openNodeMethod · 0.95
addTextMethod · 0.45
addSublanguageMethod · 0.45
wFunction · 0.45
openTabFunction · 0.45
createScriptButtonFunction · 0.45
createIconFunction · 0.45
updateButtonCheckerFunction · 0.45
runScriptFunction · 0.45
initSettingsFunction · 0.45
itFunction · 0.45
less.jsFile · 0.45

Calls

no outgoing calls

Tested by 1

itFunction · 0.36