Sha256: 4810a4b0846743d395396e0469732ae5b1aa4bd55573ece64db7159c50cdecef

Contents?: true

Size: 1.52 KB

Versions: 17

Compression:

Stored size: 1.52 KB

Contents

{% comment %}
<!--
Example code for the CloudFlare mail protection script.
CloudFlare will inject this on every page, but due to Hydejack's push state approach to page loading,
it will only run on the initial page.
The snippet below will run the code on every `hy-push-state-load` event instead.
-->
<script>
  document.getElementById('_pushState').addEventListener('hy-push-state-load', function (e) {
    function e(e){
      (console.error?console.error:console.log).call(console,e)
    }

    function t(e){
      return l.innerHTML='<a href="'+e.replace(/"/g,"&quot;")+'"></a>',l.childNodes[0].getAttribute("href")
    }

    function r(e,t){
      var r=e.substr(t,2);return parseInt(r,16)
    }

    function n(e,n){
      for(var o="",c=r(e,n),a=n+2;a<e.length;a+=2){
        var l=r(e,a)^c;
        o+=String.fromCharCode(l)
      }
      return t(o)
    }

    var o="/cdn-cgi/l/email-protection#",
        c=".__cf_email__",
        a="data-cfemail",
        l=document.createElement("div");

    !function(){
      for(var t=document.getElementsByTagName("a"),r=0;r<t.length;r++)
        try{
          var c=t[r],a=c.href.indexOf(o);
          a>-1&&(c.href="mailto:"+n(c.href,a+o.length))
        }catch(t){
          e(t)
        }
    }(),
    function(){
      for(var t=document.querySelectorAll(c),r=0;r<t.length;r++)
        try{
          var o=t[r],l=n(o.getAttribute(a),0),i=document.createTextNode(l);
          o.parentNode.replaceChild(i,o)
        }catch(t){
          e(t)
        }
    }()
  });
</script>
{% endcomment %}

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
jekyll-theme-hydejack-9.2.1 _includes/my-scripts.html
jekyll-theme-hydejack-9.2.0 _includes/my-scripts.html
jekyll-theme-hydejack-9.1.9 _includes/my-scripts.html
jekyll-theme-hydejack-9.1.8 _includes/my-scripts.html
jekyll-theme-hydejack-9.1.7 _includes/my-scripts.html
jekyll-theme-hydejack-9.1.6 _includes/my-scripts.html
jekyll-theme-hydejack-9.1.5 _includes/my-scripts.html
jekyll-theme-hydejack-9.1.4 _includes/my-scripts.html
jekyll-theme-hydejack-9.1.3 _includes/my-scripts.html
jekyll-theme-hydejack-9.1.2 _includes/my-scripts.html
jekyll-theme-hydejack-9.1.1 _includes/my-scripts.html
jekyll-theme-hydejack-9.1.0 _includes/my-scripts.html
jekyll-theme-hydejack-9.0.4 _includes/my-scripts.html
jekyll-theme-hydejack-9.0.3 _includes/my-scripts.html
jekyll-theme-hydejack-9.0.2 _includes/my-scripts.html
jekyll-theme-hydejack-9.0.1 _includes/my-scripts.html
jekyll-theme-hydejack-9.0.0 _includes/my-scripts.html