dist/ZeroClipboard.js
function(eventType, listener) {
    var i, len, foundIndex, events, perEventHandlers;
    if (arguments.length === 0) {
      events = _keys(_handlers);
    } else if (typeof eventType === "string" && eventType) {
      events = eventType.toLowerCase().split(/\s+/);
    } else if (typeof eventType === "object" && eventType && !("length" in eventType) && typeof listener === "undefined") {
      _keys(eventType).forEach(function(key) {
        var listener = eventType[key];
        if (typeof listener === "function") {
          ZeroClipboard.off(key, listener);
        }
      });
    }
    if (events && events.length) {
      for (i = 0, len = events.length; i < len; i++) {
        eventType = events[i].replace(/^on/, "");
        perEventHandlers = _handlers[eventType];
        if (perEventHandlers && perEventHandlers.length) {
          if (listener) {
            foundIndex = perEventHandlers.indexOf(listener);
            while (foundIndex !== -1) {
              perEventHandlers.splice(foundIndex, 1);
              foundIndex = perEventHandlers.indexOf(listener, foundIndex);
            }
          } else {
            perEventHandlers.length = 0;
          }
        }
      }
    }
    return ZeroClipboard;
  }
function(eventType, listener) {
    var i, len, foundIndex, events, perEventHandlers;
    if (arguments.length === 0) {
      events = _keys(_handlers);
    } else if (typeof eventType === "string" && eventType) {
      events = eventType.toLowerCase().split(/\s+/);
    } else if (typeof eventType === "object" && eventType && !("length" in eventType) && typeof listener === "undefined") {
      _keys(eventType).forEach(function(key) {
        var listener = eventType[key];
        if (typeof listener === "function") {
          ZeroClipboard.off(key, listener);
        }
      });
    }
    if (events && events.length) {
      for (i = 0, len = events.length; i < len; i++) {
        eventType = events[i].replace(/^on/, "");
        perEventHandlers = _handlers[eventType];
        if (perEventHandlers && perEventHandlers.length) {
          if (listener) {
            foundIndex = perEventHandlers.indexOf(listener);
            while (foundIndex !== -1) {
              perEventHandlers.splice(foundIndex, 1);
              foundIndex = perEventHandlers.indexOf(listener, foundIndex);
            }
          } else {
            perEventHandlers.length = 0;
          }
        }
      }
    }
    return ZeroClipboard;
  }
function ( eventType , listener ) { var i , len , foundIndex , events , perEventHandlers ; if ( arguments . length === 0 ) { events = _keys ( _handlers ) ; } else if ( typeof eventType === "string" && eventType ) { events = eventType . toLowerCase ( ) . split ( / \s+ / ) ; } else if ( typeof eventType === "object" && eventType && ! ( "length" in eventType ) && typeof listener === "undefined" ) { _keys ( eventType ) . forEach ( function ( key ) { var listener = eventType [ key ] ; if ( typeof listener === "function" ) { ZeroClipboard . off ( key , listener ) ; } } ) ; } if ( events && events . length ) { for ( i = 0 , len = events . length ; i < len ; i ++ ) { eventType = events [ i ] . replace ( / ^on / , "" ) ; perEventHandlers = _handlers [ eventType ] ; if ( perEventHandlers && perEventHandlers . length ) { if ( listener ) { foundIndex = perEventHandlers . indexOf ( listener ) ; while ( foundIndex !== - 1 ) { perEventHandlers . splice ( foundIndex , 1 ) ; foundIndex = perEventHandlers . indexOf ( listener , foundIndex ) ; } } else { perEventHandlers . length = 0 ; } } } } return ZeroClipboard ; }
The underlying implementation of `ZeroClipboard.off`.
@private
The underlying implementation of ZeroClipboard . off .