Sha256: 5fdde414aee5045b8ae71c048b84aad80e6e95d17b07d79d7c09a150c2e9badb

Contents?: true

Size: 1.95 KB

Versions: 3

Compression:

Stored size: 1.95 KB

Contents

{% if page.url != '/' and page.lang == "en" %}
{% if jekyll.environment == 'production' and site.monumetricId %}
<script>
    const autoLoadDuration = 5; //In Seconds
    const eventList = ["keydown", "mousemove", "wheel", "touchmove", "touchstart", "touchend"];

    const autoLoadTimeout = setTimeout(runScripts, autoLoadDuration * 1000);

    eventList.forEach(function (event) {
        window.addEventListener(event, triggerScripts, { passive: true })
    });

    function triggerScripts() {
        runScripts();
        clearTimeout(autoLoadTimeout);
        eventList.forEach(function (event) {
            window.removeEventListener(event, triggerScripts, { passive: true });
        });
    }

    function runScripts() {
        document.querySelectorAll("script[delay]").forEach(function (scriptTag) {
            scriptTag.setAttribute("src", scriptTag.getAttribute("delay"));
        });
    }
</script>
<script type="text/javascript" defer delay="{{site.monumetricId}}" data-cfasync="false"></script>
{% endif %}

{% if jekyll.environment == 'development' and site.monumetricId %}
<script>
    const autoLoadDuration = 5; //In Seconds
    const eventList = ["keydown", "mousemove", "wheel", "touchmove", "touchstart", "touchend"];

    const autoLoadTimeout = setTimeout(runScripts, autoLoadDuration * 1000);

    eventList.forEach(function (event) {
        window.addEventListener(event, triggerScripts, { passive: true })
    });

    function triggerScripts() {
        runScripts();
        clearTimeout(autoLoadTimeout);
        eventList.forEach(function (event) {
            window.removeEventListener(event, triggerScripts, { passive: true });
        });
    }

    function runScripts() {
        document.querySelectorAll("script[delay]").forEach(function (scriptTag) {
            scriptTag.setAttribute("src", scriptTag.getAttribute("delay"));
        });
    }
</script>
<script type="text/javascript" delay="{{site.monumetricId}}"></script>
{% endif %}
{% endif %}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
appscms-tools-theme-2.0.3 _includes/monumetric/monumetric.html
appscms-tools-theme-2.0.2 _includes/monumetric/monumetric.html
appscms-tools-theme-2.0.1 _includes/monumetric/monumetric.html