mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-21 21:57:56 +01:00
Lazy loading.
This commit is contained in:
parent
0c2c6c0b6e
commit
befb252850
@ -25,8 +25,20 @@
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
<c:if test="${requestScope['google.analytics.enabled']}">
|
<c:if test="${requestScope['google.analytics.enabled']}">
|
||||||
<!-- Google Ads Sense Config-->
|
<!-- Google Ads Sense Config. Lazy loading optimization -->
|
||||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4996113942657337" crossorigin="anonymous"></script>
|
<script type="text/javascript">
|
||||||
|
function downloadJsAtOnload() {
|
||||||
|
setTimeout(function downloadJs() {
|
||||||
|
var element = document.createElement("script");
|
||||||
|
element.setAttribute("data-ad-client", "ca-pub-4996113942657337");
|
||||||
|
element.async = true;
|
||||||
|
element.src = "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";
|
||||||
|
document.body.appendChild(element);
|
||||||
|
}, 2000);
|
||||||
|
};
|
||||||
|
|
||||||
|
window.addEventListener("load", downloadJsAtOnload, false);
|
||||||
|
</script>
|
||||||
</c:if>
|
</c:if>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user