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

Method init

renderer/renderJS/main_ui_lib.js:1264–1287  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1262 }
1263
1264 init() {
1265 for ( const element of MA.byId('prefcanvas').querySelectorAll('page-replace')) {
1266 const replaceType = element.safeAttribute('data-type')
1267 const replaceKey = element.safeAttribute('data-name')
1268 const replaceExt = element.safeAttribute('data-extra')
1269
1270 switch ( replaceType ) {
1271 case 'version-input' :
1272 element.replaceWith(this.#doVersion(replaceKey))
1273 break
1274 case 'button-input':
1275 element.replaceWith(this.#doButton(replaceKey))
1276 break
1277 case 'special-input' :
1278 element.replaceWith(this.#doSpecial(replaceKey))
1279 break
1280 case 'switch-input':
1281 element.replaceWith(this.#doSwitch(replaceKey, replaceExt || 3))
1282 break
1283 default :
1284 break
1285 }
1286 }
1287 }
1288
1289 forceUpdate() {
1290 for ( const update of this.update ) {

Callers 1

constructorMethod · 0.95

Calls 4

#doVersionMethod · 0.95
#doButtonMethod · 0.95
#doSpecialMethod · 0.95
#doSwitchMethod · 0.95

Tested by

no test coverage detected