Defer the loading of personalize.js, and ensure that personalize is called
even if the DOM was loaded before this script runs.
This commit is contained in:
parent
4aa9087271
commit
d4c4fa9818
@ -25,7 +25,7 @@
|
|||||||
title="{atom:title}" type="{atom:link[@rel='self']/@type}" />
|
title="{atom:title}" type="{atom:link[@rel='self']/@type}" />
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<link rel="shortcut icon" href="/favicon.ico" />
|
<link rel="shortcut icon" href="/favicon.ico" />
|
||||||
<script type="text/javascript" src="personalize.js">
|
<script defer="defer" src="personalize.js">
|
||||||
<xsl:comment><!--HTML Compatibility--></xsl:comment>
|
<xsl:comment><!--HTML Compatibility--></xsl:comment>
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
@ -294,4 +294,8 @@ function personalize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// hook event
|
// hook event
|
||||||
document.addEventListener("DOMContentLoaded", personalize, false);
|
if (document.getElementById('footer')) {
|
||||||
|
personalize();
|
||||||
|
} else {
|
||||||
|
document.addEventListener("DOMContentLoaded", personalize, false);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user