MouseWheel Smooth Scroll - Version 2.0

Version Description

  • completely new scrolling script
  • lightweight settings
  • optimization
Download this release

Release Info

Developer kubiq
Plugin Icon 128x128 MouseWheel Smooth Scroll
Version 2.0
Comparing to
See all releases

Code changes from version 1.4 to 2.0

js/jQuery.scrollSpeed.js DELETED
@@ -1,100 +0,0 @@
1
- // Custom scrolling speed with jQuery
2
- // Source: github.com/ByNathan/jQuery.scrollSpeed
3
- // Version: 1.0.2
4
-
5
- (function($) {
6
-
7
- jQuery.scrollSpeed = function(step, speed, easing) {
8
-
9
- var $document = $(document),
10
- $window = $(window),
11
- $body = $('html, body'),
12
- option = easing || 'default',
13
- root = 0,
14
- scroll = false,
15
- scrollY,
16
- scrollX,
17
- view;
18
-
19
- if (window.navigator.msPointerEnabled)
20
-
21
- return false;
22
-
23
- $window.on('mousewheel DOMMouseScroll', function(e) {
24
-
25
- if( ! e.ctrlKey ){
26
- var deltaY = e.originalEvent.wheelDeltaY,
27
- detail = e.originalEvent.detail;
28
- scrollY = $document.height() > $window.height();
29
- scrollX = $document.width() > $window.width();
30
- scroll = true;
31
-
32
- if (scrollY) {
33
-
34
- view = $window.height();
35
-
36
- if (deltaY < 0 || detail > 0)
37
-
38
- root = (root + view) >= $document.height() ? root : root += step;
39
-
40
- if (deltaY > 0 || detail < 0)
41
-
42
- root = root <= 0 ? 0 : root -= step;
43
-
44
- $body.stop().animate({
45
-
46
- scrollTop: root
47
-
48
- }, speed, option, function() {
49
-
50
- scroll = false;
51
-
52
- });
53
- }
54
-
55
- if (scrollX) {
56
-
57
- view = $window.width();
58
-
59
- if (deltaY < 0 || detail > 0)
60
-
61
- root = (root + view) >= $document.width() ? root : root += step;
62
-
63
- if (deltaY > 0 || detail < 0)
64
-
65
- root = root <= 0 ? 0 : root -= step;
66
-
67
- $body.stop().animate({
68
-
69
- scrollLeft: root
70
-
71
- }, speed, option, function() {
72
-
73
- scroll = false;
74
-
75
- });
76
- }
77
-
78
- return false;
79
- }
80
-
81
-
82
- }).on('scroll', function() {
83
-
84
- if (scrollY && !scroll) root = $window.scrollTop();
85
- if (scrollX && !scroll) root = $window.scrollLeft();
86
-
87
- }).on('resize', function() {
88
-
89
- if (scrollY && !scroll) view = $window.height();
90
- if (scrollX && !scroll) view = $window.width();
91
-
92
- });
93
- };
94
-
95
- jQuery.easing.default = function (x,t,b,c,d) {
96
-
97
- return -c * ((t=t/d-1)*t*t*t - 1) + b;
98
- };
99
-
100
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jquery.easing.min.js DELETED
@@ -1,14 +0,0 @@
1
- /*
2
- * jQuery Easing v1.3.2 - http://gsgd.co.uk/sandbox/jquery/easing/
3
- * Open source under the BSD License.
4
- * Copyright © 2008 George McGinley Smith
5
- * All rights reserved.
6
- * https://raw.github.com/gdsmith/jquery-easing/master/LICENSE
7
- */
8
- (function(h){h.easing.jswing=h.easing.swing;h.extend(h.easing,{def:"easeOutQuad",swing:function(e,a,c,b,d){return h.easing[h.easing.def](e,a,c,b,d)},easeInQuad:function(e,a,c,b,d){return b*(a/=d)*a+c},easeOutQuad:function(e,a,c,b,d){return-b*(a/=d)*(a-2)+c},easeInOutQuad:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a+c:-b/2*(--a*(a-2)-1)+c},easeInCubic:function(e,a,c,b,d){return b*(a/=d)*a*a+c},easeOutCubic:function(e,a,c,b,d){return b*((a=a/d-1)*a*a+1)+c},easeInOutCubic:function(e,a,c,b,d){return 1>
9
- (a/=d/2)?b/2*a*a*a+c:b/2*((a-=2)*a*a+2)+c},easeInQuart:function(e,a,c,b,d){return b*(a/=d)*a*a*a+c},easeOutQuart:function(e,a,c,b,d){return-b*((a=a/d-1)*a*a*a-1)+c},easeInOutQuart:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a*a*a+c:-b/2*((a-=2)*a*a*a-2)+c},easeInQuint:function(e,a,c,b,d){return b*(a/=d)*a*a*a*a+c},easeOutQuint:function(e,a,c,b,d){return b*((a=a/d-1)*a*a*a*a+1)+c},easeInOutQuint:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a*a*a*a+c:b/2*((a-=2)*a*a*a*a+2)+c},easeInSine:function(e,a,
10
- c,b,d){return-b*Math.cos(a/d*(Math.PI/2))+b+c},easeOutSine:function(e,a,c,b,d){return b*Math.sin(a/d*(Math.PI/2))+c},easeInOutSine:function(e,a,c,b,d){return-b/2*(Math.cos(Math.PI*a/d)-1)+c},easeInExpo:function(e,a,c,b,d){return 0==a?c:b*Math.pow(2,10*(a/d-1))+c},easeOutExpo:function(e,a,c,b,d){return a==d?c+b:b*(-Math.pow(2,-10*a/d)+1)+c},easeInOutExpo:function(e,a,c,b,d){return 0==a?c:a==d?c+b:1>(a/=d/2)?b/2*Math.pow(2,10*(a-1))+c:b/2*(-Math.pow(2,-10*--a)+2)+c},easeInCirc:function(e,a,c,b,d){return-b*
11
- (Math.sqrt(1-(a/=d)*a)-1)+c},easeOutCirc:function(e,a,c,b,d){return b*Math.sqrt(1-(a=a/d-1)*a)+c},easeInOutCirc:function(e,a,c,b,d){return 1>(a/=d/2)?-b/2*(Math.sqrt(1-a*a)-1)+c:b/2*(Math.sqrt(1-(a-=2)*a)+1)+c},easeInElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(0==a)return c;if(1==(a/=d))return c+b;f||(f=.3*d);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return-(g*Math.pow(2,10*--a)*Math.sin(2*(a*d-e)*Math.PI/f))+c},easeOutElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(0==
12
- a)return c;if(1==(a/=d))return c+b;f||(f=.3*d);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return g*Math.pow(2,-10*a)*Math.sin(2*(a*d-e)*Math.PI/f)+b+c},easeInOutElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(0==a)return c;if(2==(a/=d/2))return c+b;f||(f=.3*d*1.5);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return 1>a?-.5*g*Math.pow(2,10*--a)*Math.sin(2*(a*d-e)*Math.PI/f)+c:g*Math.pow(2,-10*--a)*Math.sin(2*(a*d-e)*Math.PI/f)*.5+b+c},easeInBack:function(e,a,c,b,d,f){void 0==
13
- f&&(f=1.70158);return b*(a/=d)*a*((f+1)*a-f)+c},easeOutBack:function(e,a,c,b,d,f){void 0==f&&(f=1.70158);return b*((a=a/d-1)*a*((f+1)*a+f)+1)+c},easeInOutBack:function(e,a,c,b,d,f){void 0==f&&(f=1.70158);return 1>(a/=d/2)?b/2*a*a*(((f*=1.525)+1)*a-f)+c:b/2*((a-=2)*a*(((f*=1.525)+1)*a+f)+2)+c},easeInBounce:function(e,a,c,b,d){return b-h.easing.easeOutBounce(e,d-a,0,b,d)+c},easeOutBounce:function(e,a,c,b,d){return(a/=d)<1/2.75?7.5625*b*a*a+c:a<2/2.75?b*(7.5625*(a-=1.5/2.75)*a+.75)+c:a<2.5/2.75?b*(7.5625*
14
- (a-=2.25/2.75)*a+.9375)+c:b*(7.5625*(a-=2.625/2.75)*a+.984375)+c},easeInOutBounce:function(e,a,c,b,d){return a<d/2?.5*h.easing.easeInBounce(e,2*a,0,b,d)+c:.5*h.easing.easeOutBounce(e,2*a-d,0,b,d)+.5*b+c}})})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/wpmss.php CHANGED
@@ -1,27 +1 @@
1
- <?php header("content-type: application/x-javascript"); ?>
2
-
3
- <?php if ( $_GET['dequeueEasing'] == 0 ): ?>
4
- //jQuery Easing v1.3.2
5
- (function(h){h.easing.jswing=h.easing.swing;h.extend(h.easing,{def:"easeOutQuad",swing:function(e,a,c,b,d){return h.easing[h.easing.def](e,a,c,b,d)},easeInQuad:function(e,a,c,b,d){return b*(a/=d)*a+c},easeOutQuad:function(e,a,c,b,d){return-b*(a/=d)*(a-2)+c},easeInOutQuad:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a+c:-b/2*(--a*(a-2)-1)+c},easeInCubic:function(e,a,c,b,d){return b*(a/=d)*a*a+c},easeOutCubic:function(e,a,c,b,d){return b*((a=a/d-1)*a*a+1)+c},easeInOutCubic:function(e,a,c,b,d){return 1>
6
- (a/=d/2)?b/2*a*a*a+c:b/2*((a-=2)*a*a+2)+c},easeInQuart:function(e,a,c,b,d){return b*(a/=d)*a*a*a+c},easeOutQuart:function(e,a,c,b,d){return-b*((a=a/d-1)*a*a*a-1)+c},easeInOutQuart:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a*a*a+c:-b/2*((a-=2)*a*a*a-2)+c},easeInQuint:function(e,a,c,b,d){return b*(a/=d)*a*a*a*a+c},easeOutQuint:function(e,a,c,b,d){return b*((a=a/d-1)*a*a*a*a+1)+c},easeInOutQuint:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a*a*a*a+c:b/2*((a-=2)*a*a*a*a+2)+c},easeInSine:function(e,a,
7
- c,b,d){return-b*Math.cos(a/d*(Math.PI/2))+b+c},easeOutSine:function(e,a,c,b,d){return b*Math.sin(a/d*(Math.PI/2))+c},easeInOutSine:function(e,a,c,b,d){return-b/2*(Math.cos(Math.PI*a/d)-1)+c},easeInExpo:function(e,a,c,b,d){return 0==a?c:b*Math.pow(2,10*(a/d-1))+c},easeOutExpo:function(e,a,c,b,d){return a==d?c+b:b*(-Math.pow(2,-10*a/d)+1)+c},easeInOutExpo:function(e,a,c,b,d){return 0==a?c:a==d?c+b:1>(a/=d/2)?b/2*Math.pow(2,10*(a-1))+c:b/2*(-Math.pow(2,-10*--a)+2)+c},easeInCirc:function(e,a,c,b,d){return-b*
8
- (Math.sqrt(1-(a/=d)*a)-1)+c},easeOutCirc:function(e,a,c,b,d){return b*Math.sqrt(1-(a=a/d-1)*a)+c},easeInOutCirc:function(e,a,c,b,d){return 1>(a/=d/2)?-b/2*(Math.sqrt(1-a*a)-1)+c:b/2*(Math.sqrt(1-(a-=2)*a)+1)+c},easeInElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(0==a)return c;if(1==(a/=d))return c+b;f||(f=.3*d);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return-(g*Math.pow(2,10*--a)*Math.sin(2*(a*d-e)*Math.PI/f))+c},easeOutElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(0==
9
- a)return c;if(1==(a/=d))return c+b;f||(f=.3*d);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return g*Math.pow(2,-10*a)*Math.sin(2*(a*d-e)*Math.PI/f)+b+c},easeInOutElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(0==a)return c;if(2==(a/=d/2))return c+b;f||(f=.3*d*1.5);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return 1>a?-.5*g*Math.pow(2,10*--a)*Math.sin(2*(a*d-e)*Math.PI/f)+c:g*Math.pow(2,-10*--a)*Math.sin(2*(a*d-e)*Math.PI/f)*.5+b+c},easeInBack:function(e,a,c,b,d,f){void 0==
10
- f&&(f=1.70158);return b*(a/=d)*a*((f+1)*a-f)+c},easeOutBack:function(e,a,c,b,d,f){void 0==f&&(f=1.70158);return b*((a=a/d-1)*a*((f+1)*a+f)+1)+c},easeInOutBack:function(e,a,c,b,d,f){void 0==f&&(f=1.70158);return 1>(a/=d/2)?b/2*a*a*(((f*=1.525)+1)*a-f)+c:b/2*((a-=2)*a*(((f*=1.525)+1)*a+f)+2)+c},easeInBounce:function(e,a,c,b,d){return b-h.easing.easeOutBounce(e,d-a,0,b,d)+c},easeOutBounce:function(e,a,c,b,d){return(a/=d)<1/2.75?7.5625*b*a*a+c:a<2/2.75?b*(7.5625*(a-=1.5/2.75)*a+.75)+c:a<2.5/2.75?b*(7.5625*
11
- (a-=2.25/2.75)*a+.9375)+c:b*(7.5625*(a-=2.625/2.75)*a+.984375)+c},easeInOutBounce:function(e,a,c,b,d){return a<d/2?.5*h.easing.easeInBounce(e,2*a,0,b,d)+c:.5*h.easing.easeOutBounce(e,2*a-d,0,b,d)+.5*b+c}})})(jQuery);
12
- <?php endif ?>
13
-
14
- // jQuery.scrollSpeed 1.0.2
15
- !function(a){jQuery.scrollSpeed=function(b,c,d){var k,l,m,e=a(document),f=a(window),g=a("html, body"),h=d||"default",i=a(window).scrollTop(),j=!1;return window.navigator.msPointerEnabled?!1:void f.on("mousewheel DOMMouseScroll",function(a){if(!a.ctrlKey){var d=a.originalEvent.wheelDeltaY,n=a.originalEvent.detail;return k=e.height()>f.height(),l=e.width()>f.width(),j=!0,k&&(m=f.height(),(0>d||n>0)&&(i=i+m>=e.height()?i:i+=b),(d>0||0>n)&&(i=0>=i?0:i-=b),g.stop().animate({scrollTop:i},c,h,function(){j=!1})),l&&(m=f.width(),(0>d||n>0)&&(i=i+m>=e.width()?i:i+=b),(d>0||0>n)&&(i=0>=i?0:i-=b),g.stop().animate({scrollLeft:i},c,h,function(){j=!1})),!1}}).on("scroll",function(){k&&!j&&(i=f.scrollTop()),l&&!j&&(i=f.scrollLeft())}).on("resize",function(){k&&!j&&(m=f.height()),l&&!j&&(m=f.width())})},jQuery.easing["default"]=function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c}}(jQuery);
16
-
17
- jQuery(document).ready(function($) {
18
- MouseSmoothScroll();
19
- });
20
-
21
- function MouseSmoothScroll(){
22
- <?php if ( $_GET['enableAll'] == 0 ): ?>
23
- isMac = /(mac)/.exec( window.navigator.userAgent.toLowerCase() );
24
- if( isMac != null && isMac.length ) return false;
25
- <?php endif ?>
26
- jQuery.scrollSpeed(<?php echo $_GET['step'] ?>, <?php echo $_GET['speed'] ?>, '<?php echo $_GET['ease'] ?>');
27
- }
1
+ <?php header("content-type: application/x-javascript"); ?>!function(){function e(){z.keyboardSupport&&f("keydown",a)}function t(){if(!A&&document.body){A=!0;var t=document.body,o=document.documentElement,n=window.innerHeight,r=t.scrollHeight;if(B=document.compatMode.indexOf("CSS")>=0?o:t,D=t,e(),top!=self)X=!0;else if(r>n&&(t.offsetHeight<=n||o.offsetHeight<=n)){var a=document.createElement("div");a.style.cssText="position:absolute; z-index:-10000; top:0; left:0; right:0; height:"+B.scrollHeight+"px",document.body.appendChild(a);var i;T=function(){i||(i=setTimeout(function(){L||(a.style.height="0",a.style.height=B.scrollHeight+"px",i=null)},500))},setTimeout(T,10),f("resize",T);var l={attributes:!0,childList:!0,characterData:!1};if(M=new V(T),M.observe(t,l),B.offsetHeight<=n){var c=document.createElement("div");c.style.clear="both",t.appendChild(c)}}z.fixedBackground||L||(t.style.backgroundAttachment="scroll",o.style.backgroundAttachment="scroll")}}function o(){M&&M.disconnect(),h(I,r),h("mousedown",i),h("keydown",a),h("resize",T),h("load",t)}function n(e,t,o){if(p(t,o),1!=z.accelerationMax){var n=Date.now(),r=n-R;if(r<z.accelerationDelta){var a=(1+50/r)/2;a>1&&(a=Math.min(a,z.accelerationMax),t*=a,o*=a)}R=Date.now()}if(q.push({x:t,y:o,lastX:0>t?.99:-.99,lastY:0>o?.99:-.99,start:Date.now()}),!P){var i=e===document.body,l=function(){for(var n=Date.now(),r=0,a=0,c=0;c<q.length;c++){var u=q[c],d=n-u.start,s=d>=z.animationTime,m=s?1:d/z.animationTime;z.pulseAlgorithm&&(m=x(m));var f=u.x*m-u.lastX>>0,h=u.y*m-u.lastY>>0;r+=f,a+=h,u.lastX+=f,u.lastY+=h,s&&(q.splice(c,1),c--)}i?window.scrollBy(r,a):(r&&(e.scrollLeft+=r),a&&(e.scrollTop+=a)),t||o||(q=[]),q.length?_(l,e,1e3/z.frameRate+1):P=!1};_(l,e,0),P=!0}}function r(e){A||t();var o=e.target,r=u(o);if(!r||e.defaultPrevented||e.ctrlKey)return!0;if(w(D,"embed")||w(o,"embed")&&/\.pdf/i.test(o.src)||w(D,"object"))return!0;var a=-e.wheelDeltaX||e.deltaX||0,i=-e.wheelDeltaY||e.deltaY||0;return K&&(e.wheelDeltaX&&b(e.wheelDeltaX,120)&&(a=-120*(e.wheelDeltaX/Math.abs(e.wheelDeltaX))),e.wheelDeltaY&&b(e.wheelDeltaY,120)&&(i=-120*(e.wheelDeltaY/Math.abs(e.wheelDeltaY)))),a||i||(i=-e.wheelDelta||0),1===e.deltaMode&&(a*=40,i*=40),!z.touchpadSupport&&v(i)?!0:(Math.abs(a)>1.2&&(a*=z.stepSize/120),Math.abs(i)>1.2&&(i*=z.stepSize/120),n(r,a,i),e.preventDefault(),void l())}function a(e){var t=e.target,o=e.ctrlKey||e.altKey||e.metaKey||e.shiftKey&&e.keyCode!==N.spacebar;document.contains(D)||(D=document.activeElement);var r=/^(textarea|select|embed|object)$/i,a=/^(button|submit|radio|checkbox|file|color|image)$/i;if(r.test(t.nodeName)||w(t,"input")&&!a.test(t.type)||w(D,"video")||y(e)||t.isContentEditable||e.defaultPrevented||o)return!0;if((w(t,"button")||w(t,"input")&&a.test(t.type))&&e.keyCode===N.spacebar)return!0;var i,c=0,d=0,s=u(D),m=s.clientHeight;switch(s==document.body&&(m=window.innerHeight),e.keyCode){case N.up:d=-z.arrowScroll;break;case N.down:d=z.arrowScroll;break;case N.spacebar:i=e.shiftKey?1:-1,d=-i*m*.9;break;case N.pageup:d=.9*-m;break;case N.pagedown:d=.9*m;break;case N.home:d=-s.scrollTop;break;case N.end:var f=s.scrollHeight-s.scrollTop-m;d=f>0?f+10:0;break;case N.left:c=-z.arrowScroll;break;case N.right:c=z.arrowScroll;break;default:return!0}n(s,c,d),e.preventDefault(),l()}function i(e){D=e.target}function l(){clearTimeout(E),E=setInterval(function(){F={}},1e3)}function c(e,t){for(var o=e.length;o--;)F[j(e[o])]=t;return t}function u(e){var t=[],o=document.body,n=B.scrollHeight;do{var r=F[j(e)];if(r)return c(t,r);if(t.push(e),n===e.scrollHeight){var a=s(B)&&s(o),i=a||m(B);if(X&&d(B)||!X&&i)return c(t,$())}else if(d(e)&&m(e))return c(t,e)}while(e=e.parentElement)}function d(e){return e.clientHeight+10<e.scrollHeight}function s(e){var t=getComputedStyle(e,"").getPropertyValue("overflow-y");return"hidden"!==t}function m(e){var t=getComputedStyle(e,"").getPropertyValue("overflow-y");return"scroll"===t||"auto"===t}function f(e,t){window.addEventListener(e,t,!1)}function h(e,t){window.removeEventListener(e,t,!1)}function w(e,t){return(e.nodeName||"").toLowerCase()===t.toLowerCase()}function p(e,t){e=e>0?1:-1,t=t>0?1:-1,(Y.x!==e||Y.y!==t)&&(Y.x=e,Y.y=t,q=[],R=0)}function v(e){return e?(O.length||(O=[e,e,e]),e=Math.abs(e),O.push(e),O.shift(),clearTimeout(H),H=setTimeout(function(){window.localStorage&&(localStorage.SS_deltaBuffer=O.join(","))},1e3),!g(120)&&!g(100)):void 0}function b(e,t){return Math.floor(e/t)==e/t}function g(e){return b(O[0],e)&&b(O[1],e)&&b(O[2],e)}function y(e){var t=e.target,o=!1;if(-1!=document.URL.indexOf("www.youtube.com/watch"))do if(o=t.classList&&t.classList.contains("html5-video-controls"))break;while(t=t.parentNode);return o}function S(e){var t,o,n;return e*=z.pulseScale,1>e?t=e-(1-Math.exp(-e)):(o=Math.exp(-1),e-=1,n=1-Math.exp(-e),t=o+n*(1-o)),t*z.pulseNormalize}function x(e){return e>=1?1:0>=e?0:(1==z.pulseNormalize&&(z.pulseNormalize/=S(1)),S(e))}function k(e){for(var t in e)C.hasOwnProperty(t)&&(z[t]=e[t])}var D,M,T,E,H,C={frameRate:150,animationTime:<?php echo $_GET['speed'] ?>,stepSize:<?php echo $_GET['step'] ?>,pulseAlgorithm:!0,pulseScale:4,pulseNormalize:1,accelerationDelta:50,accelerationMax:3,keyboardSupport:!0,arrowScroll:50,touchpadSupport:!1,fixedBackground:!0,excluded:""},z=C,L=!1,X=!1,Y={x:0,y:0},A=!1,B=document.documentElement,O=[],K=/^Mac/.test(navigator.platform),N={left:37,up:38,right:39,down:40,spacebar:32,pageup:33,pagedown:34,end:35,home:36},q=[],P=!1,R=Date.now(),j=function(){var e=0;return function(t){return t.uniqueID||(t.uniqueID=e++)}}(),F={};window.localStorage&&localStorage.SS_deltaBuffer&&(O=localStorage.SS_deltaBuffer.split(","));var I,_=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e,t,o){window.setTimeout(e,o||1e3/60)}}(),V=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,$=function(){var e;return function(){if(!e){var t=document.createElement("div");t.style.cssText="height:10000px;width:1px;",document.body.appendChild(t);{var o=document.body.scrollTop;document.documentElement.scrollTop}window.scrollBy(0,1),e=document.body.scrollTop!=o?document.body:document.documentElement,window.scrollBy(0,-1),document.body.removeChild(t)}return e}}(),U=window.navigator.userAgent,W=/Edge/.test(U),G=/chrome/i.test(U)&&!W,J=/safari/i.test(U)&&!W,Q=/mobile/i.test(U),Z=(G||J)&&!Q;"onwheel"in document.createElement("div")?I="wheel":"onmousewheel"in document.createElement("div")&&(I="mousewheel"),I&&Z&&(f(I,r),f("mousedown",i),f("load",t)),k.destroy=o,window.SmoothScrollOptions&&k(window.SmoothScrollOptions),"object"==typeof exports?module.exports=k:window.SmoothScroll=k}();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/wpmss-sk_SK.mo CHANGED
Binary file
languages/wpmss-sk_SK.po CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: woocommerce-heureka\n"
4
- "POT-Creation-Date: 2015-11-20 10:51+0100\n"
5
- "PO-Revision-Date: 2015-11-20 10:52+0100\n"
6
  "Last-Translator: Ing. Jakub Novák <info@kubiq.sk>\n"
7
  "Language-Team: KubiQ <info@kubiq.sk>\n"
8
  "Language: sk_SK\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.8.6\n"
13
  "X-Poedit-Basepath: .\n"
14
  "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
@@ -22,57 +22,52 @@ msgid "Settings"
22
  msgstr "Nastavenia"
23
 
24
  #: ../mousewheel-smooth-scroll.php:36 ../mousewheel-smooth-scroll.php:37
25
- #: ../mousewheel-smooth-scroll.php:76
26
  msgid "MouseWheel Smooth Scroll"
27
  msgstr "MouseWheel Smooth Scroll"
28
 
29
- #: ../mousewheel-smooth-scroll.php:62
30
  msgid "General"
31
  msgstr "Všeobecné"
32
 
33
- #: ../mousewheel-smooth-scroll.php:62
34
  msgid "Help"
35
  msgstr "Pomoc"
36
 
37
- #: ../mousewheel-smooth-scroll.php:77
38
  msgid "Settings saved."
39
  msgstr "Nastavenia boli uložené."
40
 
41
- #: ../mousewheel-smooth-scroll.php:97
42
  msgid "Step:"
43
  msgstr "Krok:"
44
 
45
- #: ../mousewheel-smooth-scroll.php:105
46
  msgid "Speed:"
47
  msgstr "Rýchlosť:"
48
 
49
- #: ../mousewheel-smooth-scroll.php:113
50
- msgid "Ease:"
51
- msgstr "Animácia:"
52
 
53
- #: ../mousewheel-smooth-scroll.php:154
54
- msgid "try easings"
55
- msgstr "pozrieť animácie"
56
 
57
- #: ../mousewheel-smooth-scroll.php:159
58
- msgid "Enable for MAC and non-WebKit browsers (experimental)"
59
- msgstr "Povoliť pre Mac a prehliadače, ktoré nemajú WebKit (experiment)"
60
 
61
- #: ../mousewheel-smooth-scroll.php:167
62
- msgid "Don't load (dequeue) jQuery Easing library"
63
- msgstr "Nenačítavať (odpojiť) jQuery Easing knižnicu"
64
 
65
- #: ../mousewheel-smooth-scroll.php:168
66
- msgid "if you don't need it, or it's already loaded by another plugin"
67
- msgstr "ak ju nepotrebujete, alebo je už načítaná iným modulom"
68
 
69
- #: ../mousewheel-smooth-scroll.php:175
70
- msgid "Save"
71
- msgstr "Uložiť"
72
 
73
- #: ../mousewheel-smooth-scroll.php:179
74
- msgid "Any ideas, problems, issues?"
75
- msgstr "Objavili ste chybu, máte nejaký problém alebo otázky k tomuto pluginu?"
76
 
77
  #~ msgid "Enable mousewheel smooth scroll"
78
  #~ msgstr "Povoliť plugin"
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: woocommerce-heureka\n"
4
+ "POT-Creation-Date: 2016-03-09 10:43+0100\n"
5
+ "PO-Revision-Date: 2016-03-09 10:43+0100\n"
6
  "Last-Translator: Ing. Jakub Novák <info@kubiq.sk>\n"
7
  "Language-Team: KubiQ <info@kubiq.sk>\n"
8
  "Language: sk_SK\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.8.7\n"
13
  "X-Poedit-Basepath: .\n"
14
  "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
22
  msgstr "Nastavenia"
23
 
24
  #: ../mousewheel-smooth-scroll.php:36 ../mousewheel-smooth-scroll.php:37
25
+ #: ../mousewheel-smooth-scroll.php:73
26
  msgid "MouseWheel Smooth Scroll"
27
  msgstr "MouseWheel Smooth Scroll"
28
 
29
+ #: ../mousewheel-smooth-scroll.php:59
30
  msgid "General"
31
  msgstr "Všeobecné"
32
 
33
+ #: ../mousewheel-smooth-scroll.php:59
34
  msgid "Help"
35
  msgstr "Pomoc"
36
 
37
+ #: ../mousewheel-smooth-scroll.php:74
38
  msgid "Settings saved."
39
  msgstr "Nastavenia boli uložené."
40
 
41
+ #: ../mousewheel-smooth-scroll.php:94
42
  msgid "Step:"
43
  msgstr "Krok:"
44
 
45
+ #: ../mousewheel-smooth-scroll.php:102
46
  msgid "Speed:"
47
  msgstr "Rýchlosť:"
48
 
49
+ #: ../mousewheel-smooth-scroll.php:109
50
+ msgid "Save"
51
+ msgstr "Uložiť"
52
 
53
+ #: ../mousewheel-smooth-scroll.php:113
54
+ msgid "Any ideas, problems, issues?"
55
+ msgstr "Objavili ste chybu, máte nejaký problém alebo otázky k tomuto pluginu?"
56
 
57
+ #~ msgid "Ease:"
58
+ #~ msgstr "Animácia:"
 
59
 
60
+ #~ msgid "try easings"
61
+ #~ msgstr "pozrieť animácie"
 
62
 
63
+ #~ msgid "Enable for MAC and non-WebKit browsers (experimental)"
64
+ #~ msgstr "Povoliť pre Mac a prehliadače, ktoré nemajú WebKit (experiment)"
 
65
 
66
+ #~ msgid "Don't load (dequeue) jQuery Easing library"
67
+ #~ msgstr "Nenačítavať (odpojiť) jQuery Easing knižnicu"
 
68
 
69
+ #~ msgid "if you don't need it, or it's already loaded by another plugin"
70
+ #~ msgstr "ak ju nepotrebujete, alebo je už načítaná iným modulom"
 
71
 
72
  #~ msgid "Enable mousewheel smooth scroll"
73
  #~ msgstr "Povoliť plugin"
mousewheel-smooth-scroll.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: MouseWheel Smooth Scroll
4
  Plugin URI: http://kubiq.sk
5
  Description: MouseWheel smooth scrolling for your WordPress website
6
- Version: 1.4
7
  Author: Jakub Novák
8
  Author URI: http://kubiq.sk
9
  */
@@ -49,11 +49,8 @@ if (!class_exists('wpmss')) {
49
 
50
  function plugin_scripts_load() {
51
  $options = array(
52
- 'step' => isset( $this->settings['general']['step'] ) && trim( $this->settings['general']['step'] ) != "" ? $this->settings['general']['step'] : 120,
53
- 'speed' => isset( $this->settings['general']['speed'] ) && trim( $this->settings['general']['step'] ) != "" ? $this->settings['general']['speed'] : 800,
54
- 'ease' => isset( $this->settings['general']['ease'] ) ? $this->settings['general']['ease'] : 'easeOutCubic',
55
- 'enableAll' => isset( $this->settings['general']['enable_mac'] ) ? 1 : 0,
56
- 'dequeueEasing' => isset( $this->settings['general']['dequeueEasing'] ) ? 1 : 0
57
  );
58
  wp_enqueue_script( 'wpmss_scroll_scripts', plugins_url( 'js/wpmss.php?'.http_build_query($options), __FILE__ ), array('jquery'));
59
  }
@@ -97,7 +94,7 @@ if (!class_exists('wpmss')) {
97
  <label for="q_field_1"><?php _e("Step:", $this->domain) ?></label> 
98
  </th>
99
  <td>
100
- <input type="text" name="step" placeholder="120" value="<?php echo $this->settings[ $this->tab ]["step"]; ?>" id="q_field_1">
101
  </td>
102
  </tr>
103
  <tr>
@@ -105,70 +102,7 @@ if (!class_exists('wpmss')) {
105
  <label for="q_field_2"><?php _e("Speed:", $this->domain) ?></label> 
106
  </th>
107
  <td>
108
- <input type="text" name="speed" placeholder="800" value="<?php echo $this->settings[ $this->tab ]["speed"]; ?>" id="q_field_2">
109
- </td>
110
- </tr>
111
- <tr>
112
- <th>
113
- <label for="q_field_3"><?php _e("Ease:", $this->domain) ?></label> 
114
- </th>
115
- <td><?php
116
- $this->q_select(array(
117
- "name" => "ease",
118
- "id" => "q_field_3",
119
- "value" => isset( $this->settings[ $this->tab ]["ease"] ) ? $this->settings[ $this->tab ]["ease"] : 'easeOutCubic',
120
- "options" => array(
121
- 'linear' => 'linear',
122
- 'swing' => 'swing',
123
- 'easeInQuad' => 'easeInQuad',
124
- 'easeOutQuad' => 'easeOutQuad',
125
- 'easeInOutQuad' => 'easeInOutQuad',
126
- 'easeInCubic' => 'easeInCubic',
127
- 'easeOutCubic' => 'easeOutCubic',
128
- 'easeInOutCubic' => 'easeInOutCubic',
129
- 'easeInQuart' => 'easeInQuart',
130
- 'easeOutQuart' => 'easeOutQuart',
131
- 'easeInOutQuart' => 'easeInOutQuart',
132
- 'easeInQuint' => 'easeInQuint',
133
- 'easeOutQuint' => 'easeOutQuint',
134
- 'easeInOutQuint' => 'easeInOutQuint',
135
- 'easeInExpo' => 'easeInExpo',
136
- 'easeOutExpo' => 'easeOutExpo',
137
- 'easeInOutExpo' => 'easeInOutExpo',
138
- 'easeInSine' => 'easeInSine',
139
- 'easeOutSine' => 'easeOutSine',
140
- 'easeInOutSine' => 'easeInOutSine',
141
- 'easeInCirc' => 'easeInCirc',
142
- 'easeOutCirc' => 'easeOutCirc',
143
- 'easeInOutCirc' => 'easeInOutCirc',
144
- 'easeInElastic' => 'easeInElastic',
145
- 'easeOutElastic' => 'easeOutElastic',
146
- 'easeInOutElastic' => 'easeInOutElastic',
147
- 'easeInBack' => 'easeInBack',
148
- 'easeOutBack' => 'easeOutBack',
149
- 'easeInOutBack' => 'easeInOutBack',
150
- 'easeInBounce' => 'easeInBounce',
151
- 'easeOutBounce' => 'easeOutBounce',
152
- 'easeInOutBounce' => 'easeInOutBounce'
153
- )
154
- )); ?>&emsp;<small><a href="http://easings.net/" target="_blank">(<?php _e("try easings", $this->domain) ?>)</a></small>
155
- </td>
156
- </tr>
157
- <tr>
158
- <th>
159
- <label for="q_field_4"><?php _e("Enable for MAC and non-WebKit browsers (experimental)", $this->domain) ?></label> 
160
- </th>
161
- <td>
162
- <input type="checkbox" name="enable_mac" value="checked" id="q_field_4" <?php echo isset( $this->settings[ $this->tab ]["enable_mac"] ) ? $this->settings[ $this->tab ]["enable_mac"] : "" ?>>
163
- </td>
164
- </tr>
165
- <tr>
166
- <th>
167
- <label for="q_field_4"><?php _e("Don't load (dequeue) jQuery Easing library", $this->domain) ?></label>
168
- <br><small><?php _e("if you don't need it, or it's already loaded by another plugin", $this->domain) ?></small>
169
- </th>
170
- <td>
171
- <input type="checkbox" name="dequeueEasing" value="checked" id="q_field_4" <?php echo isset( $this->settings[ $this->tab ]["dequeueEasing"] ) ? $this->settings[ $this->tab ]["dequeueEasing"] : "" ?>>
172
  </td>
173
  </tr>
174
  </table>
@@ -181,19 +115,6 @@ if (!class_exists('wpmss')) {
181
  <p><a href="mailto:info@kubiq.sk" target="_blank">info@kubiq.sk</a></p>
182
  <p><a href="http://kubiq.sk/" target="_blank">http://kubiq.sk</a></p><?php
183
  }
184
-
185
- function q_select( $field_data = array(), $print = 1 ){
186
- if(!is_object($field_data)) $field_data = (object)$field_data;
187
- $field_data->value = is_array($field_data->value) ? $field_data->value : array($field_data->value);
188
- $select = "<select name='{$field_data->name}' id='{$field_data->id}'".( isset($field_data->multiple) ? " multiple" : "").( isset($field_data->size) ? " size='{$field_data->size}'" : "").">";
189
- if( isset($field_data->placeholder) ) $select .= "<option value='' disabled>{$field_data->placeholder}</option>";
190
- foreach($field_data->options as $option => $value) $select .= "<option value='{$value}'".( in_array($value, $field_data->value) ? " selected" : "").">{$option}</option>";
191
- $select .= "</select>";
192
- if($print)
193
- echo $select;
194
- else
195
- return $select;
196
- }
197
  }
198
  }
199
 
3
  Plugin Name: MouseWheel Smooth Scroll
4
  Plugin URI: http://kubiq.sk
5
  Description: MouseWheel smooth scrolling for your WordPress website
6
+ Version: 2.0
7
  Author: Jakub Novák
8
  Author URI: http://kubiq.sk
9
  */
49
 
50
  function plugin_scripts_load() {
51
  $options = array(
52
+ 'step' => isset( $this->settings['general']['step'] ) && trim( $this->settings['general']['step'] ) != "" ? $this->settings['general']['step'] : 100,
53
+ 'speed' => isset( $this->settings['general']['speed'] ) && trim( $this->settings['general']['step'] ) != "" ? $this->settings['general']['speed'] : 400,
 
 
 
54
  );
55
  wp_enqueue_script( 'wpmss_scroll_scripts', plugins_url( 'js/wpmss.php?'.http_build_query($options), __FILE__ ), array('jquery'));
56
  }
94
  <label for="q_field_1"><?php _e("Step:", $this->domain) ?></label> 
95
  </th>
96
  <td>
97
+ <input type="number" name="step" placeholder="100" value="<?php echo $this->settings[ $this->tab ]["step"]; ?>" id="q_field_1">
98
  </td>
99
  </tr>
100
  <tr>
102
  <label for="q_field_2"><?php _e("Speed:", $this->domain) ?></label> 
103
  </th>
104
  <td>
105
+ <input type="number" name="speed" placeholder="400" value="<?php echo $this->settings[ $this->tab ]["speed"]; ?>" id="q_field_2">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  </td>
107
  </tr>
108
  </table>
115
  <p><a href="mailto:info@kubiq.sk" target="_blank">info@kubiq.sk</a></p>
116
  <p><a href="http://kubiq.sk/" target="_blank">http://kubiq.sk</a></p><?php
117
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  }
119
  }
120
 
readme.txt CHANGED
@@ -3,22 +3,20 @@ Contributors: kubiq
3
  Donate link: http://kubiq.sk
4
  Tags: smooth scroll, mousewheel scroll, scrolling
5
  Requires at least: 3.0.1
6
- Tested up to: 4.4
7
- Stable tag: 1.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Smooth scrolling experience, with mousewheel or touchpad
12
 
13
  == Description ==
14
 
15
- Replace basic scrolling "effect" on Windows, Linux and some browsers with nice smooth scroll
16
 
17
  <ul>
18
  <li>set speed</li>
19
  <li>set step</li>
20
- <li>set ease</li>
21
- <li>enable / disable on Mac (which already has smooth scroll)</li>
22
  </ul>
23
 
24
  == Installation ==
@@ -62,4 +60,9 @@ Replace basic scrolling "effect" on Windows, Linux and some browsers with nice s
62
  * Scroll library improvements
63
 
64
  = 1.4 =
65
- * minify JS scripts and combine them into one file
 
 
 
 
 
3
  Donate link: http://kubiq.sk
4
  Tags: smooth scroll, mousewheel scroll, scrolling
5
  Requires at least: 3.0.1
6
+ Tested up to: 4.4.2
7
+ Stable tag: 2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Smooth scrolling experience, with mousewheel, touchpad or keyboard
12
 
13
  == Description ==
14
 
15
+ Replace basic scrolling "effect" with nice smooth scroll
16
 
17
  <ul>
18
  <li>set speed</li>
19
  <li>set step</li>
 
 
20
  </ul>
21
 
22
  == Installation ==
60
  * Scroll library improvements
61
 
62
  = 1.4 =
63
+ * minify JS scripts and combine them into one file
64
+
65
+ = 2.0 =
66
+ * completely new scrolling script
67
+ * lightweight settings
68
+ * optimization