Skip to content
Browse files

Removed stray console.log()

  • Loading branch information...
1 parent 9ff1663 commit f37d83bc2e3113a1da4740d180de58eacaf8eeea @jnicol committed Apr 29, 2014
Showing with 1 addition and 2 deletions.
  1. +0 −1 jquery.trackpad-scroll-emulator.js
  2. +1 −1 jquery.trackpad-scroll-emulator.min.js
View
1 jquery.trackpad-scroll-emulator.js
@@ -261,7 +261,6 @@
if (width === widthMinusScrollbars && navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
return 17;
}
- console.log(width - widthMinusScrollbars);
return (width - widthMinusScrollbars);
}
View
2 jquery.trackpad-scroll-emulator.min.js
@@ -1 +1 @@
-!function(t){function e(e,n){function i(){x.hasClass("horizontal")&&(j="horiz",M="scrollLeft",X="width",Y="left"),x.prepend('<div class="tse-scrollbar"><div class="drag-handle"></div></div>'),z=x.find(".tse-scrollbar"),D=x.find(".drag-handle"),n.wrapContent&&_.wrap('<div class="tse-scroll-content" />'),C=x.find(".tse-scroll-content"),p(),n.autoHide&&x.on("mouseenter",f),D.on("mousedown",r),z.on("mousedown",u),C.on("scroll",l),d(),t(window).on("resize",function(){g()}),n.autoHide||c()}function r(e){e.preventDefault();var o=e.pageY;"horiz"===j&&(o=e.pageX),T=o-D.offset()[Y],t(document).on("mousemove",a),t(document).on("mouseup",s)}function a(t){t.preventDefault();var e=t.pageY;"horiz"===j&&(e=t.pageX);var o=e-z.offset()[Y]-T,n=o/z[X](),i=n*_[X]();C[M](i)}function s(){t(document).off("mousemove",a),t(document).off("mouseup",s)}function u(t){if(t.target!==D[0]){var e=H*C[X](),o="vert"===j?t.originalEvent.layerY:t.originalEvent.layerX,n=D.position()[Y],i=n>o?C[M]()-e:C[M]()+e;C[M](i)}}function l(t){f()}function d(){var t=_[X](),e=C[M](),o=z[X](),n=o/t,i=Math.round(n*e)+2,r=Math.floor(n*(o-2))-2;t>o?(D.css("vert"===j?{top:i,height:r}:{left:i,width:r}),z.show()):z.hide()}function f(){d(),c()}function c(){D.addClass("visible"),n.autoHide&&("number"==typeof E&&window.clearTimeout(E),E=window.setTimeout(function(){h()},1e3))}function h(){D.removeClass("visible"),"number"==typeof E&&window.clearTimeout(E)}function p(){"vert"===j?(C.width(x.width()+v()),C.height(x.height())):(C.width(x.width()),C.height(x.height()+v()),_.height(x.height()))}function v(){var e=t('<div class="scrollbar-width-tester" style="width:50px;height:50px;overflow-y:scroll;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div>');t("body").append(e);var o=t(e).innerWidth(),n=t("div",e).innerWidth();return e.remove(),o===n&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1?17:(console.log(o-n),o-n)}function g(){p(),d()}function w(t,e){return e?void(n[t]=e):n[t]}function m(){_.insertBefore(z),z.remove(),C.remove(),_.css({height:x.height()+"px","overflow-y":"scroll"}),y("onDestroy"),x.removeData("plugin_"+o)}function y(t){void 0!==n[t]&&n[t].call(b)}var b=e,x=t(e),C,_=x.find(".tse-content"),z,D,T,E,H=7/8,j="vert",M="scrollTop",X="height",Y="top";return n=t.extend({},t.fn[o].defaults,n),i(),{option:w,destroy:m,recalculate:g}}var o="TrackpadScrollEmulator";t.fn[o]=function(n){if("string"==typeof arguments[0]){var i=arguments[0],r=Array.prototype.slice.call(arguments,1),a;return this.each(function(){if(!t.data(this,"plugin_"+o)||"function"!=typeof t.data(this,"plugin_"+o)[i])throw new Error("Method "+i+" does not exist on jQuery."+o);a=t.data(this,"plugin_"+o)[i].apply(this,r)}),void 0!==a?a:this}return"object"!=typeof n&&n?void 0:this.each(function(){t.data(this,"plugin_"+o)||t.data(this,"plugin_"+o,new e(this,n))})},t.fn[o].defaults={onInit:function(){},onDestroy:function(){},wrapContent:!0,autoHide:!0}}(jQuery);
+!function(t){function e(e,n){function i(){x.hasClass("horizontal")&&(j="horiz",M="scrollLeft",X="width",Y="left"),x.prepend('<div class="tse-scrollbar"><div class="drag-handle"></div></div>'),z=x.find(".tse-scrollbar"),D=x.find(".drag-handle"),n.wrapContent&&_.wrap('<div class="tse-scroll-content" />'),C=x.find(".tse-scroll-content"),p(),n.autoHide&&x.on("mouseenter",f),D.on("mousedown",r),z.on("mousedown",u),C.on("scroll",l),d(),t(window).on("resize",function(){g()}),n.autoHide||c()}function r(e){e.preventDefault();var o=e.pageY;"horiz"===j&&(o=e.pageX),T=o-D.offset()[Y],t(document).on("mousemove",a),t(document).on("mouseup",s)}function a(t){t.preventDefault();var e=t.pageY;"horiz"===j&&(e=t.pageX);var o=e-z.offset()[Y]-T,n=o/z[X](),i=n*_[X]();C[M](i)}function s(){t(document).off("mousemove",a),t(document).off("mouseup",s)}function u(t){if(t.target!==D[0]){var e=H*C[X](),o="vert"===j?t.originalEvent.layerY:t.originalEvent.layerX,n=D.position()[Y],i=n>o?C[M]()-e:C[M]()+e;C[M](i)}}function l(t){f()}function d(){var t=_[X](),e=C[M](),o=z[X](),n=o/t,i=Math.round(n*e)+2,r=Math.floor(n*(o-2))-2;t>o?(D.css("vert"===j?{top:i,height:r}:{left:i,width:r}),z.show()):z.hide()}function f(){d(),c()}function c(){D.addClass("visible"),n.autoHide&&("number"==typeof E&&window.clearTimeout(E),E=window.setTimeout(function(){h()},1e3))}function h(){D.removeClass("visible"),"number"==typeof E&&window.clearTimeout(E)}function p(){"vert"===j?(C.width(x.width()+v()),C.height(x.height())):(C.width(x.width()),C.height(x.height()+v()),_.height(x.height()))}function v(){var e=t('<div class="scrollbar-width-tester" style="width:50px;height:50px;overflow-y:scroll;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div>');t("body").append(e);var o=t(e).innerWidth(),n=t("div",e).innerWidth();return e.remove(),o===n&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1?17:o-n}function g(){p(),d()}function w(t,e){return e?void(n[t]=e):n[t]}function m(){_.insertBefore(z),z.remove(),C.remove(),_.css({height:x.height()+"px","overflow-y":"scroll"}),y("onDestroy"),x.removeData("plugin_"+o)}function y(t){void 0!==n[t]&&n[t].call(b)}var b=e,x=t(e),C,_=x.find(".tse-content"),z,D,T,E,H=7/8,j="vert",M="scrollTop",X="height",Y="top";return n=t.extend({},t.fn[o].defaults,n),i(),{option:w,destroy:m,recalculate:g}}var o="TrackpadScrollEmulator";t.fn[o]=function(n){if("string"==typeof arguments[0]){var i=arguments[0],r=Array.prototype.slice.call(arguments,1),a;return this.each(function(){if(!t.data(this,"plugin_"+o)||"function"!=typeof t.data(this,"plugin_"+o)[i])throw new Error("Method "+i+" does not exist on jQuery."+o);a=t.data(this,"plugin_"+o)[i].apply(this,r)}),void 0!==a?a:this}return"object"!=typeof n&&n?void 0:this.each(function(){t.data(this,"plugin_"+o)||t.data(this,"plugin_"+o,new e(this,n))})},t.fn[o].defaults={onInit:function(){},onDestroy:function(){},wrapContent:!0,autoHide:!0}}(jQuery);

0 comments on commit f37d83b

Please sign in to comment.
Something went wrong with that request. Please try again.