MCPcopy Create free account
hub / github.com/FSGModding/FSG_Mod_Assistant / init

Method init

renderer/renderJS/setup_ui.js:71–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69 }
70
71 init() {
72 for ( const element of document.querySelectorAll('page-replace')) {
73 const replaceType = element.safeAttribute('data-type')
74 const replaceKey = element.safeAttribute('data-name')
75 const replaceExt = element.safeAttribute('data-extra')
76 const replaceKeyO = element.safeAttribute('data-key')
77
78 switch ( replaceType ) {
79 case 'special-input' :
80 element.replaceWith(this.#doSpecial(replaceKey))
81 break
82 case 'switch-input':
83 element.replaceWith(this.#doSwitch(replaceKey, replaceKeyO, replaceExt || 2))
84 break
85 case 'settings-input':
86 element.replaceWith(this.#doSettings(replaceKey))
87 break
88 case 'path-input':
89 element.replaceWith(this.#doPath(replaceKey))
90 break
91 default :
92 break
93 }
94 }
95
96 this.update.push(() => { this.#doFolders() })
97
98 this.forceUpdate()
99 }
100
101 forceUpdate() {
102 window.setup_IPC.update().then((results) => {

Callers 1

constructorMethod · 0.95

Calls 6

#doSpecialMethod · 0.95
#doSwitchMethod · 0.95
#doSettingsMethod · 0.95
#doPathMethod · 0.95
#doFoldersMethod · 0.95
forceUpdateMethod · 0.95

Tested by

no test coverage detected