Ind.ie is now Small Technology Foundation.
Commit a2fd0119 authored by Aral Balkan's avatar Aral Balkan

Now smoothly scrolling to added message in Public timeline.

parent f9bc80b1
/** smooth-scroll v7.0.2, by Chris Ferdinandi | http://github.com/cferdinandi/smooth-scroll | Licensed under MIT: http://gomakethings.com/mit/ */
!function(t,e){"function"==typeof define&&define.amd?define([],e(t)):"object"==typeof exports?module.exports=e(t):t.smoothScroll=e(t)}("undefined"!=typeof global?global:this.window||this.global,function(t){"use strict";var e,n,o,r,a={},u=!!t.document.querySelector&&!!t.addEventListener,c={speed:500,easing:"easeInOutCubic",offset:0,updateURL:!0,callback:function(){}},i=function(){var t={},e=!1,n=0,o=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],n++);for(var r=function(n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=e&&"[object Object]"===Object.prototype.toString.call(n[o])?i(!0,t[o],n[o]):n[o])};o>n;n++){var a=arguments[n];r(a)}return t},s=function(t){return Math.max(t.scrollHeight,t.offsetHeight,t.clientHeight)},l=function(t,e){var n,o,r=e.charAt(0),a="classList"in document.documentElement;for("["===r&&(e=e.substr(1,e.length-2),n=e.split("="),n.length>1&&(o=!0,n[1]=n[1].replace(/"/g,"").replace(/'/g,"")));t&&t!==document;t=t.parentNode){if("."===r)if(a){if(t.classList.contains(e.substr(1)))return t}else if(new RegExp("(^|\\s)"+e.substr(1)+"(\\s|$)").test(t.className))return t;if("#"===r&&t.id===e.substr(1))return t;if("["===r&&t.hasAttribute(n[0])){if(!o)return t;if(t.getAttribute(n[0])===n[1])return t}if(t.tagName.toLowerCase()===e)return t}return null},f=function(t){for(var e,n=String(t),o=n.length,r=-1,a="",u=n.charCodeAt(0);++r<o;){if(e=n.charCodeAt(r),0===e)throw new InvalidCharacterError("Invalid character: the input contains U+0000.");a+=e>=1&&31>=e||127==e||0===r&&e>=48&&57>=e||1===r&&e>=48&&57>=e&&45===u?"\\"+e.toString(16)+" ":e>=128||45===e||95===e||e>=48&&57>=e||e>=65&&90>=e||e>=97&&122>=e?n.charAt(r):"\\"+n.charAt(r)}return a},d=function(t,e){var n;return"easeInQuad"===t&&(n=e*e),"easeOutQuad"===t&&(n=e*(2-e)),"easeInOutQuad"===t&&(n=.5>e?2*e*e:-1+(4-2*e)*e),"easeInCubic"===t&&(n=e*e*e),"easeOutCubic"===t&&(n=--e*e*e+1),"easeInOutCubic"===t&&(n=.5>e?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1),"easeInQuart"===t&&(n=e*e*e*e),"easeOutQuart"===t&&(n=1- --e*e*e*e),"easeInOutQuart"===t&&(n=.5>e?8*e*e*e*e:1-8*--e*e*e*e),"easeInQuint"===t&&(n=e*e*e*e*e),"easeOutQuint"===t&&(n=1+--e*e*e*e*e),"easeInOutQuint"===t&&(n=.5>e?16*e*e*e*e*e:1+16*--e*e*e*e*e),n||e},h=function(t,e,n){var o=0;if(t.offsetParent)do o+=t.offsetTop,t=t.offsetParent;while(t);return o=o-e-n,o>=0?o:0},m=function(){return Math.max(t.document.body.scrollHeight,t.document.documentElement.scrollHeight,t.document.body.offsetHeight,t.document.documentElement.offsetHeight,t.document.body.clientHeight,t.document.documentElement.clientHeight)},p=function(t){return t&&"object"==typeof JSON&&"function"==typeof JSON.parse?JSON.parse(t):{}},g=function(e,n){t.history.pushState&&(n||"true"===n)&&t.history.pushState(null,null,[t.location.protocol,"//",t.location.host,t.location.pathname,t.location.search,e].join(""))},b=function(t){return null===t?0:s(t)+t.offsetTop};a.animateScroll=function(e,n,a){var u=p(e?e.getAttribute("data-options"):null),s=i(s||c,a||{},u);n="#"+f(n.substr(1));var l="#"===n?t.document.documentElement:t.document.querySelector(n),v=t.pageYOffset;o||(o=t.document.querySelector("[data-scroll-header]")),r||(r=b(o));var y,O,S,I=h(l,r,parseInt(s.offset,10)),E=I-v,L=m(),H=0;g(n,s.updateURL);var j=function(o,r,a){var u=t.pageYOffset;(o==r||u==r||t.innerHeight+u>=L)&&(clearInterval(a),l.focus(),s.callback(e,n))},w=function(){H+=16,O=H/parseInt(s.speed,10),O=O>1?1:O,S=v+E*d(s.easing,O),t.scrollTo(0,Math.floor(S)),j(S,I,y)},C=function(){y=setInterval(w,16)};0===t.pageYOffset&&t.scrollTo(0,0),C()};var v=function(t){var n=l(t.target,"[data-scroll]");n&&"a"===n.tagName.toLowerCase()&&(t.preventDefault(),a.animateScroll(n,n.hash,e))},y=function(t){n||(n=setTimeout(function(){n=null,r=b(o)},66))};return a.destroy=function(){e&&(t.document.removeEventListener("click",v,!1),t.removeEventListener("resize",y,!1),e=null,n=null,o=null,r=null)},a.init=function(n){u&&(a.destroy(),e=i(c,n||{}),o=t.document.querySelector("[data-scroll-header]"),r=b(o),t.document.addEventListener("click",v,!1),o&&t.addEventListener("resize",y,!1))},a});
\ No newline at end of file
!function(t,e){var n=function i(n,o,c){"use strict";o=o||999,c&&0===c||(c=9);var r,a=e.documentElement,l=function(){return n?n.scrollTop:t.scrollY||a.scrollTop},u=function(){return n?Math.min(n.offsetHeight,t.innerHeight):t.innerHeight||a.clientHeight},f=function(t){return t.offsetTop-(n||a).offsetTop},s=function M(){clearTimeout(r),r=0},h=function(e,i){s();var c=l(),f=Math.max(e,0)-c;i=i||Math.min(Math.abs(f),o);var h=(new Date).getTime();!function g(){r=setTimeout(function(){var e=Math.min(((new Date).getTime()-h)/i,1),o=Math.max(Math.floor(c+f*(.5>e?2*e*e:e*(4-2*e)-1)),0);n?n.scrollTop=o:t.scrollTo(0,o),1>e&&u()+o<(n||a).scrollHeight?g():setTimeout(s,99)},9)}()},g=function H(t,e){h(f(t)-c,e)},m=function k(t,e){var n=t.getBoundingClientRect().height+2*c,i=u(),o=f(t),r=o+n,a=l();c>o-a||n>i?g(t,e):c>a+i-r&&h(r-i,e)},v=function w(t,e,n){h(Math.max(f(t)-u()/2+(n||t.getBoundingClientRect().height/2),0),e)},d=function x(e){t.history.replaceState&&history.replaceState({},"",t.location.href.split("#")[0]+"#"+e)},p=function D(e){var n=e.target,i=n.getAttribute("href")||"";if("A"===n.tagName&&0===i.indexOf("#"))if("#"===i)e.preventDefault(),t.zenscroll.toY(0),d("");else{var o=n.hash.substring(1),c=document.getElementById(o);c&&(e.preventDefault(),t.zenscroll.to(c),d(o))}},T;"addEventListener"in t?(t.addEventListener("click",p,!1),T=function(){t.removeEventListener("click",p,!1)}):t.attachEvent&&(t.attachEvent("onclick",p),T=function(){t.detachEvent("onclick",p)});var E=function b(t,e,n){t&&(o=t),null!==e&&(c=e),n&&T&&(T(),T=null)};return{"new":i,setup:E,to:g,toY:h,intoView:m,center:v,stop:s,moving:function(){return!!r}}};t.zenscroll=n()}(this,document);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment