-
Notifications
You must be signed in to change notification settings - Fork 0
/
dime.min.js
6 lines (6 loc) · 1.34 KB
/
dime.min.js
1
2
3
4
5
6
/*!
* dime 3.0.0+201311180050
* https://github.com/ryanve/dime
* MIT License 2013 Ryan Van Etten
*/
!function(a,b,c){"undefined"!=typeof module&&module.exports?module.exports=c():a[b]=c()}(this,"dime",function(){function a(c,d,e){return null==e?b(c,a,d):(e[c]=this[d],void 0)}function b(a,b,c){for(var d=0,e=a.length;e>d;)b.call(c,a[d],d++,a);return a}function c(a,b){return a.document.documentElement[o+n[b]]}function d(a,b){var c="scroll",d=a.documentElement,e=a.body;return c+=b=n[b],Math.max(d[p+b],d[c],e?e[c]:0)}function e(a,b){return f(a,o+n[b])}function f(a,c){var d,e,f,g=a.offsetWidth||a.offsetHeight;return g?i(a,c):(f={},e=a[q],b(m,function(a){f[a]=e[a]||"",e[a]=m[a]}),d=i(a,c),b(m,function(a){e[a]===m[a]&&(e[a]=f[a])}),d)}function g(a,c,d){return b(a,function(a){a[q][c]=d})}function h(a,b,c){return c="number"==typeof c?""+c+"px":c,g(a,b,c)}function i(a,b){return"function"==typeof("function"==typeof b?b:b=a[b])?b.call(a):b}function j(a,b){var f,g=a[0];if(null!=g)return f=g==g.window?c:1===g.nodeType?e:9===g.nodeType?d:i,+f(g,b)||0}var k={},l={fn:k},m=a(["position","visibility","display"],["absolute","hidden","block"]),n=a(["width","height"],["Width","Height"]),o="client",p="offset",q="style";return b(n,function(a){k[a]=function(b){return(void 0===b?j:h)(this,a,b)},l[a]=function(b,c,d){return void 0===c||d?j([b],a):(h([b],a,c),void 0)}}),l});