Permalink
Browse files

* Commit minified script file.

  • Loading branch information...
1 parent dce1ceb commit 5674e5f02db73acc435324aaeebcbf13db1e628b @dannyakakong committed Jan 6, 2015
Showing with 2 additions and 0 deletions.
  1. +2 −0 static/js/min/all.js
@@ -0,0 +1,2 @@
+// enzyme-project.org 2015-01-06 00:35:41
+"use strict";window.enzymeproject={},window.enzymeproject.ui={currentYPosition:function(){return document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop?document.body.scrollTop:0},elementYPosition:function(e){for(var t=e.offsetTop;e.offsetParent&&e.offsetParent!==document.body;)e=e.offsetParent,t+=e.offsetTop;return t},smoothScroll:function(e){var t=window.enzymeproject.ui.currentYPosition(),o=window.enzymeproject.ui.elementYPosition(e)-20,n=o>t?o-t:t-o;if(100>n)return void window.scrollTo(0,o);var r=Math.round(n/100);r>=20&&(r=20);var i=Math.round(n/25),c=o>t?t+i:t-i,d=0;if(t>=o)for(var s=t;s>o;s-=i)window.setTimeout("window.scrollTo(0, "+c+")",d*r),c-=i,++d;else for(var s=t;o>s;s+=i)window.setTimeout("window.scrollTo(0, "+c+")",d*r),c+=i,++d}},document.addEventListener("DOMContentLoaded",function(){for(var e=document.querySelectorAll('a[href^="#"]'),t=e.length,o=0;t>o;o++)e[o].addEventListener("click",function(e){return e.preventDefault(),window.enzymeproject.ui.smoothScroll(document.querySelector('[name="'+e.target.getAttribute("href").substring(1)+'"]')),!1});for(var n=document.querySelectorAll("article.l-screenshots section a"),r=n.length,i=0;r>i;i++){var c=window.devicePixelRatio?window.devicePixelRatio:1;if(c>=2){var d=n[i].querySelector("img");d.setAttribute("src",d.getAttribute("data-src2x"))}n[i].addEventListener("click",function(e){if(e.preventDefault(),null===document.getElementById("shadowbox_js")){var t=document.createElement("script");t.id="shadowbox_js",t.src="/static/js/min/shadowbox.js",t.onload=function(){if(Shadowbox.init({skipSetup:!0,handleOversize:"resize"}),Shadowbox.setup("article.l-screenshots section a"),e.target.dispatchEvent){var t=document.createEvent("MouseEvents");t.initEvent("click",!0,!0),e.target.dispatchEvent(t)}else e.target.fireEvent&&e.target.fireEvent("on"+e.eventType,e)}}try{document.head.appendChild(t)}catch(o){}return!1})}});

0 comments on commit 5674e5f

Please sign in to comment.