Cleanup code
This commit is contained in:
@@ -17,17 +17,6 @@ export function registerHandlebarsHelpers() {
|
||||
const { Handlebars } = globalThis
|
||||
if (!Handlebars) return
|
||||
|
||||
Handlebars.registerHelper("select", function (selected, options) {
|
||||
const escapedValue = RegExp.escape(Handlebars.escapeExpression(selected))
|
||||
const rgx = new RegExp(` value=["']${escapedValue}["']`)
|
||||
const html = options.fn(this)
|
||||
return html.replace(rgx, "$& selected")
|
||||
})
|
||||
|
||||
Handlebars.registerHelper("getMagicBackground", function (magic) {
|
||||
return game.i18n.localize(MAGICS[magic]?.background ?? "")
|
||||
})
|
||||
|
||||
Handlebars.registerHelper("getMagicLabel", function (magic) {
|
||||
return game.i18n.localize(MAGICS[magic]?.label ?? "")
|
||||
})
|
||||
@@ -44,10 +33,6 @@ export function registerHandlebarsHelpers() {
|
||||
return MAGICS[magic]?.speciality?.[speciality]?.classicon ?? ""
|
||||
})
|
||||
|
||||
Handlebars.registerHelper("getMagicSpecialityIcon", function (magic, speciality) {
|
||||
return MAGICS[magic]?.speciality?.[speciality]?.icon ?? ""
|
||||
})
|
||||
|
||||
Handlebars.registerHelper("getMagicSpecialityElementIcon", function (magic, speciality) {
|
||||
return MAGICS[magic]?.speciality?.[speciality]?.elementicon ?? ""
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user