// Livestamp.js / v1.1.2 / (c) 2014 Matt Bradley / MIT License
(function (plugin) {
  if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
    define(['jquery', 'moment'], plugin);
  } else {
    // Browser globals
    plugin(jQuery, moment);
  }
}(function($, moment) {
  var updateInterval = 1e3,
      useNativeTimestamps = false,
      formatters = {},
      paused = false,
      updateID = null,
      $livestamps = $([]),

  init = function() {
    livestampGlobal.resume();
  },

  prep = function($el, timestamp, format) {
    var oldData = $el.data('livestampdata');
    if ((typeof timestamp === 'number') && !useNativeTimestamps)
      timestamp *= 1e3;

    $el.removeAttr('data-livestamp')
      .removeData('livestamp')
      .removeAttr('data-livestamp-format')
      .removeData('livestamp-format');

    timestamp = moment(timestamp);
    if (moment.isMoment(timestamp) && !isNaN(+timestamp)) {
      var newData = $.extend({ }, {'original': $el.contents() }, oldData);
      newData.moment = moment(timestamp);
      newData.format = format;

      $el.data('livestampdata', newData).empty();
      $livestamps.push($el[0]);
    }
  },

  run = function() {
    if (paused) return;
    livestampGlobal.update();
  },

  livestampGlobal = {
    update: function() {
      // Clear any timeout in case we're called before it fires.
      clearTimeout(updateID);
      // Schedule the next update if appropriate.
      if (!paused) {
        updateID = setTimeout(run, updateInterval);
      }

      $('[data-livestamp]').each(function() {
        var $this = $(this);
        prep($this, $this.data('livestamp'), $this.data('livestamp-format'));
      });

      var toRemove = [];
      $livestamps.each(function() {
        var $this = $(this),
            data = $this.data('livestampdata');

        if (data === undefined)
          toRemove.push(this);
        else if (moment.isMoment(data.moment)) {
          var formatter = formatters[data.format];
          var from = $this.html(),
              to = formatter ? formatter(data.moment) : data.moment.fromNow();

          if (from != to) {
            var e = $.Event('change.livestamp');
            $this.trigger(e, [from, to]);
            if (!e.isDefaultPrevented())
              $this.html(to);
          }
        }
      });

      $livestamps = $livestamps.not(toRemove);
      delete $livestamps.prevObject
    },

    pause: function() {
      paused = true;
    },

    resume: function() {
      paused = false;
      run();
    },

    interval: function(interval) {
      if (interval === undefined)
        return updateInterval;
      updateInterval = interval;
    },

    nativeTimestamps: function(nativeTimestamps) {
      if (nativeTimestamps === undefined) {
        return useNativeTimestamps;
      }
      useNativeTimestamps = nativeTimestamps;
    },

    registerFormatter: function(name, fn) {
      formatters[name] = fn;
    }
  },

  livestampLocal = {
    add: function($el, timestamp, format) {
      if ((typeof timestamp === 'number') && !useNativeTimestamps)
        timestamp *= 1e3;
      timestamp = moment(timestamp);

      if (moment.isMoment(timestamp) && !isNaN(+timestamp)) {
        $el.each(function() {
          prep($(this), timestamp, format);
        });
        livestampGlobal.update();
      }

      return $el;
    },

    destroy: function($el) {
      $livestamps = $livestamps.not($el);
      $el.each(function() {
        var $this = $(this),
            data = $this.data('livestampdata');

        if (data === undefined)
          return $el;

        $this
          .html(data.original ? data.original : '')
          .removeData('livestampdata');
      });

      return $el;
    },

    isLivestamp: function($el) {
      return $el.data('livestampdata') !== undefined;
    }
  };

  $.livestamp = livestampGlobal;
  $(init);
  $.fn.livestamp = function(method, options) {
    if (!livestampLocal[method]) {
      options = method;
      method = 'add';
    }

    return livestampLocal[method](this, options);
  };
}));

@@ -3952,18 +3952,95 @@
 od, 
-options) %7B
+arg1 /* arg2, ... */) %7B%0A    var args = %5B%5D.slice.call(arguments);%0A    method = args%5B0%5D;%0A
 %0A   
@@ -4044,17 +4044,16 @@
     if (
-!
 livestam
@@ -4080,53 +4080,239 @@
     
-options = method;%0A      method = 'add';%0A    %7D
+// Pop the method off.%0A      args.shift();%0A    %7D else %7B%0A      // The method was not specified. Default to 'add'.%0A      method = 'add';%0A    %7D%0A%0A    // Pass the %60$el%60 as the first argument to all local methods.%0A    args.unshift(this);
 %0A%0A  
@@ -4346,21 +4346,24 @@
 hod%5D
-(this, option
+.apply(null, arg
 s);%0A

Fix passing a custom moment formatter to livestamp directly