[Pkg-javascript-commits] [rainloop] 30/38: Removed unused bundled libraries for jquery-scrollstop and matchmedia-polyfill.

Daniel Ring techwolf-guest at moszumanska.debian.org
Fri Dec 15 06:04:02 UTC 2017


This is an automated email from the git hooks/post-receive script.

techwolf-guest pushed a commit to branch master
in repository rainloop.

commit 9849caf8adb26df6460fa3d575d50c552ed6fdc2
Author: Techwolf <dring at g33kworld.net>
Date:   Sun Oct 8 13:20:26 2017 -0700

    Removed unused bundled libraries for jquery-scrollstop and matchmedia-polyfill.
---
 debian/Makefile                                    |  3 -
 debian/lib/jquery-scrollstop/jquery.scrollstop.js  | 91 ----------------------
 .../matchmedia-polyfill/matchMedia.addListener.js  | 75 ------------------
 debian/lib/matchmedia-polyfill/matchMedia.js       | 46 -----------
 4 files changed, 215 deletions(-)

diff --git a/debian/Makefile b/debian/Makefile
index 3a2a51c..840c113 100644
--- a/debian/Makefile
+++ b/debian/Makefile
@@ -99,7 +99,6 @@ header = "/* RainLoop Webmail (c) RainLoop Team | Licensed under AGPL v3 */"
 jsLibs = \
 	debian/lib/jquery/jquery.js \
 	/usr/share/javascript/jquery-mousewheel/jquery.mousewheel.js \
-	debian/lib/jquery-scrollstop/jquery.scrollstop.js \
 	/usr/share/javascript/jquery-lazyload/jquery.lazyload.js \
 	debian/lib/jquery-backstretch/jquery.backstretch.js \
 	vendors/jquery-ui/js/jquery-ui-1.10.3.custom.js \
@@ -119,8 +118,6 @@ jsLibs = \
 	debian/lib/knockout/knockout-latest.js \
 	debian/lib/knockout-projections/knockout-projections.js \
 	debian/lib/knockout-sortable/knockout-sortable.js \
-	debian/lib/matchmedia-polyfill/matchMedia.js \
-	debian/lib/matchmedia-polyfill/matchMedia.addListener.js \
 	debian/lib/simplestatemanager/ssm.js \
 	debian/lib/autolinker/Autolinker.js \
 	debian/lib/opentip/opentip.js \
diff --git a/debian/lib/jquery-scrollstop/jquery.scrollstop.js b/debian/lib/jquery-scrollstop/jquery.scrollstop.js
deleted file mode 100644
index 33ac8e6..0000000
--- a/debian/lib/jquery-scrollstop/jquery.scrollstop.js
+++ /dev/null
@@ -1,91 +0,0 @@
-// jQuery Scrollstop Plugin v1.2.0
-// https://github.com/ssorallen/jquery-scrollstop
-
-(function (factory) {
-  // UMD[2] wrapper for jQuery plugins to work in AMD or in CommonJS.
-  //
-  // [2] https://github.com/umdjs/umd
-
-  if (typeof define === 'function' && define.amd) {
-    // AMD. Register as an anonymous module.
-    define(['jquery'], factory);
-  } else if (typeof exports === 'object') {
-    // Node/CommonJS
-    module.exports = factory(require('jquery'));
-  } else {
-    // Browser globals
-    factory(jQuery);
-  }
-}(function ($) {
-  // $.event.dispatch was undocumented and was deprecated in jQuery 1.7[1]. It
-  // was replaced by $.event.handle in jQuery 1.9.
-  //
-  // Use the first of the available functions to support jQuery <1.8.
-  //
-  // [1] https://github.com/jquery/jquery-migrate/blob/master/src/event.js#L25
-  var dispatch = $.event.dispatch || $.event.handle;
-
-  var special = $.event.special,
-      uid1 = 'D' + (+new Date()),
-      uid2 = 'D' + (+new Date() + 1);
-
-  special.scrollstart = {
-    setup: function(data) {
-      var _data = $.extend({
-        latency: special.scrollstop.latency
-      }, data);
-
-      var timer,
-          handler = function(evt) {
-            var _self = this,
-                _args = arguments;
-
-            if (timer) {
-              clearTimeout(timer);
-            } else {
-              evt.type = 'scrollstart';
-              dispatch.apply(_self, _args);
-            }
-
-            timer = setTimeout(function() {
-              timer = null;
-            }, _data.latency);
-          };
-
-      $(this).bind('scroll', handler).data(uid1, handler);
-    },
-    teardown: function() {
-      $(this).unbind('scroll', $(this).data(uid1));
-    }
-  };
-
-  special.scrollstop = {
-    latency: 250,
-    setup: function(data) {
-      var _data = $.extend({
-        latency: special.scrollstop.latency
-      }, data);
-
-      var timer,
-          handler = function(evt) {
-            var _self = this,
-                _args = arguments;
-
-            if (timer) {
-              clearTimeout(timer);
-            }
-
-            timer = setTimeout(function() {
-              timer = null;
-              evt.type = 'scrollstop';
-              dispatch.apply(_self, _args);
-            }, _data.latency);
-          };
-
-      $(this).bind('scroll', handler).data(uid2, handler);
-    },
-    teardown: function() {
-      $(this).unbind('scroll', $(this).data(uid2));
-    }
-  };
-}));
diff --git a/debian/lib/matchmedia-polyfill/matchMedia.addListener.js b/debian/lib/matchmedia-polyfill/matchMedia.addListener.js
deleted file mode 100644
index 764232d..0000000
--- a/debian/lib/matchmedia-polyfill/matchMedia.addListener.js
+++ /dev/null
@@ -1,75 +0,0 @@
-/*! matchMedia() polyfill addListener/removeListener extension. Author & copyright (c) 2012: Scott Jehl. Dual MIT/BSD license */
-(function(){
-    // Bail out for browsers that have addListener support
-    if (window.matchMedia && window.matchMedia('all').addListener) {
-        return false;
-    }
-
-    var localMatchMedia = window.matchMedia,
-        hasMediaQueries = localMatchMedia('only all').matches,
-        isListening     = false,
-        timeoutID       = 0,    // setTimeout for debouncing 'handleChange'
-        queries         = [],   // Contains each 'mql' and associated 'listeners' if 'addListener' is used
-        handleChange    = function(evt) {
-            // Debounce
-            clearTimeout(timeoutID);
-
-            timeoutID = setTimeout(function() {
-                for (var i = 0, il = queries.length; i < il; i++) {
-                    var mql         = queries[i].mql,
-                        listeners   = queries[i].listeners || [],
-                        matches     = localMatchMedia(mql.media).matches;
-
-                    // Update mql.matches value and call listeners
-                    // Fire listeners only if transitioning to or from matched state
-                    if (matches !== mql.matches) {
-                        mql.matches = matches;
-
-                        for (var j = 0, jl = listeners.length; j < jl; j++) {
-                            listeners[j].call(window, mql);
-                        }
-                    }
-                }
-            }, 30);
-        };
-
-    window.matchMedia = function(media) {
-        var mql         = localMatchMedia(media),
-            listeners   = [],
-            index       = 0;
-
-        mql.addListener = function(listener) {
-            // Changes would not occur to css media type so return now (Affects IE <= 8)
-            if (!hasMediaQueries) {
-                return;
-            }
-
-            // Set up 'resize' listener for browsers that support CSS3 media queries (Not for IE <= 8)
-            // There should only ever be 1 resize listener running for performance
-            if (!isListening) {
-                isListening = true;
-                window.addEventListener('resize', handleChange, true);
-            }
-
-            // Push object only if it has not been pushed already
-            if (index === 0) {
-                index = queries.push({
-                    mql         : mql,
-                    listeners   : listeners
-                });
-            }
-
-            listeners.push(listener);
-        };
-
-        mql.removeListener = function(listener) {
-            for (var i = 0, il = listeners.length; i < il; i++){
-                if (listeners[i] === listener){
-                    listeners.splice(i, 1);
-                }
-            }
-        };
-
-        return mql;
-    };
-}());
diff --git a/debian/lib/matchmedia-polyfill/matchMedia.js b/debian/lib/matchmedia-polyfill/matchMedia.js
deleted file mode 100644
index 0bfca11..0000000
--- a/debian/lib/matchmedia-polyfill/matchMedia.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
-
-window.matchMedia || (window.matchMedia = function() {
-    "use strict";
-
-    // For browsers that support matchMedium api such as IE 9 and webkit
-    var styleMedia = (window.styleMedia || window.media);
-
-    // For those that don't support matchMedium
-    if (!styleMedia) {
-        var style       = document.createElement('style'),
-            script      = document.getElementsByTagName('script')[0],
-            info        = null;
-
-        style.type  = 'text/css';
-        style.id    = 'matchmediajs-test';
-
-        script.parentNode.insertBefore(style, script);
-
-        // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers
-        info = ('getComputedStyle' in window) && window.getComputedStyle(style, null) || style.currentStyle;
-
-        styleMedia = {
-            matchMedium: function(media) {
-                var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';
-
-                // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers
-                if (style.styleSheet) {
-                    style.styleSheet.cssText = text;
-                } else {
-                    style.textContent = text;
-                }
-
-                // Test if media query is true or false
-                return info.width === '1px';
-            }
-        };
-    }
-
-    return function(media) {
-        return {
-            matches: styleMedia.matchMedium(media || 'all'),
-            media: media || 'all'
-        };
-    };
-}());

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/rainloop.git



More information about the Pkg-javascript-commits mailing list