refactor: migrate legacy wire namespace to wrn
This commit is contained in:
@@ -21,15 +21,15 @@ export function collectScripts(
|
||||
}
|
||||
if (/\bdata-wrn-action=/.test(body)) scripts.push("/__wrnexus/actions.js");
|
||||
if (
|
||||
/\bdata-wire-theme-(toggle|set)\b/.test(body) ||
|
||||
/\bdata-wire-accent-(set|clear)\b/.test(body)
|
||||
/\bdata-wrn-theme-(toggle|set)\b/.test(body) ||
|
||||
/\bdata-wrn-accent-(set|clear)\b/.test(body)
|
||||
) {
|
||||
scripts.push(THEME_JS_HREF);
|
||||
}
|
||||
if (/\bdata-schema="[A-Za-z0-9_-]+"/.test(body)) {
|
||||
scripts.push("/__wrnexus/schemas.js", "/__wrnexus/validate.js");
|
||||
}
|
||||
if (/\bdata-wire-lang-set\b/.test(body) || /\bselect[^>]*\bdata-wire-lang\b/.test(body)) {
|
||||
if (/\bdata-wrn-lang-set\b/.test(body) || /\bselect[^>]*\bdata-wrn-lang\b/.test(body)) {
|
||||
scripts.push(I18N_JS_HREF);
|
||||
}
|
||||
if (/\bdata-room=/.test(body)) scripts.push("/__wrnexus/realtime.js");
|
||||
|
||||
Reference in New Issue
Block a user