Load scripts async

This commit is contained in:
metonym 2024-08-07 08:43:53 -07:00
commit 13c6631e80

View file

@ -11,7 +11,10 @@
if (["white", "g10", "g80", "g90", "g100"].includes(theme)) {
document.documentElement.setAttribute("theme", theme);
document.documentElement.style.setProperty("color-scheme", ["white", "g10"].includes(theme) ? "light" : "dark");
document.documentElement.style.setProperty(
"color-scheme",
["white", "g10"].includes(theme) ? "light" : "dark"
);
}
} catch (e) {}
</script>
@ -20,32 +23,35 @@
<script type="text/javascript">
window._ibmAnalytics = {
settings: {
name: 'CarbonSvelte',
name: "CarbonSvelte",
isSpa: true,
tealiumProfileName: 'ibm-web-app',
tealiumProfileName: "ibm-web-app",
},
onLoad: [['ibmStats.pageview', []]],
onLoad: [["ibmStats.pageview", []]],
};
digitalData = {
page: {
pageInfo: {
ibm: {
siteId: 'IBM_' + _ibmAnalytics.settings.name,
siteId: "IBM_" + _ibmAnalytics.settings.name,
},
},
category: {
primaryCategory: 'PC100',
primaryCategory: "PC100",
},
},
};
</script>
<script
type="module"
src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/footer.min.js"></script>
async
src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/footer.min.js"
></script>
<script
src="//1.www.s81c.com/common/stats/ibm-common.js"
type="text/javascript"
async="async"></script>
async
></script>
</head>
<body>
<script type="module" src="/src/index.js"></script>