Sha256: 5a5dc411eda5a83e07927e13df75bfed83764abfab1585f67dec13db80cdac49

Contents?: true

Size: 1.93 KB

Versions: 196

Compression:

Stored size: 1.93 KB

Contents

{% if page.url != '/' %}
{% if jekyll.environment == 'production' and site.adsId %}
<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="/assets/js/ads.js" crossorigin="anonymous"></script>
{% endif %}

{% if jekyll.environment == 'development' and site.adsId %}
<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="/assets/js/ads.js" crossorigin="anonymous"></script>

{% endif %}
{% endif %}

Version data entries

196 entries across 196 versions & 1 rubygems

Version Path
appscms-tools-theme-4.9.4 _includes/monumetric/ads.html
appscms-tools-theme-4.9.3 _includes/monumetric/ads.html
appscms-tools-theme-4.9.2 _includes/monumetric/ads.html
appscms-tools-theme-4.9.1 _includes/monumetric/ads.html
appscms-tools-theme-4.9.0 _includes/monumetric/ads.html
appscms-tools-theme-4.8.9 _includes/monumetric/ads.html
appscms-tools-theme-4.8.8 _includes/monumetric/ads.html
appscms-tools-theme-4.8.7 _includes/monumetric/ads.html
appscms-tools-theme-4.8.6 _includes/monumetric/ads.html
appscms-tools-theme-4.8.5 _includes/monumetric/ads.html
appscms-tools-theme-4.8.4 _includes/monumetric/ads.html
appscms-tools-theme-4.8.3 _includes/monumetric/ads.html
appscms-tools-theme-4.8.2 _includes/monumetric/ads.html
appscms-tools-theme-4.8.1 _includes/monumetric/ads.html
appscms-tools-theme-4.8.0 _includes/monumetric/ads.html
appscms-tools-theme-4.7.9 _includes/monumetric/ads.html
appscms-tools-theme-4.7.8 _includes/monumetric/ads.html
appscms-tools-theme-4.7.7 _includes/monumetric/ads.html
appscms-tools-theme-4.7.6 _includes/monumetric/ads.html
appscms-tools-theme-4.7.5 _includes/monumetric/ads.html