parent
a5e3ecb38b
commit
9a97d86ff9
@ -85,6 +85,19 @@ attributes_to_attributesByName: {
|
||||
});
|
||||
}
|
||||
window.kcContext = kcContext;
|
||||
|
||||
<#if xKeycloakify.themeType == "login" >
|
||||
const script = document.createElement("script");
|
||||
script.type = "importmap";
|
||||
script.textContent = JSON.stringify({
|
||||
imports: {
|
||||
"rfc4648": kcContext.url.resourcesCommonPath + "/node_modules/rfc4648/lib/rfc4648.js"
|
||||
}
|
||||
}, null, 2);
|
||||
|
||||
document.head.appendChild(script);
|
||||
</#if>
|
||||
|
||||
function decodeHtmlEntities(htmlStr){
|
||||
var element = decodeHtmlEntities.element;
|
||||
if (!element) {
|
||||
|
@ -55,14 +55,7 @@ export function useStylesAndScripts(params: {
|
||||
const { insertScriptTags } = useInsertScriptTags({
|
||||
componentOrHookName: "Template",
|
||||
scriptTags: [
|
||||
{
|
||||
type: "importmap",
|
||||
textContent: JSON.stringify({
|
||||
imports: {
|
||||
rfc4648: `${url.resourcesCommonPath}/node_modules/rfc4648/lib/rfc4648.js`
|
||||
}
|
||||
})
|
||||
},
|
||||
// NOTE: The importmap is added in by the FTL script because it's too late to add it here.
|
||||
{
|
||||
type: "module",
|
||||
src: `${url.resourcesPath}/js/menu-button-links.js`
|
||||
|
@ -6,7 +6,7 @@ export type ScriptTag = ScriptTag.TextContent | ScriptTag.Src;
|
||||
|
||||
export namespace ScriptTag {
|
||||
type Common = {
|
||||
type: "text/javascript" | "module" | "importmap";
|
||||
type: "text/javascript" | "module";
|
||||
};
|
||||
|
||||
export type TextContent = Common & {
|
||||
|
Loading…
x
Reference in New Issue
Block a user