From f9a31fcafc5cd9df13c0c4ffd1ccf265055d9d79 Mon Sep 17 00:00:00 2001 From: Ryan McGeary Date: Thu, 24 Jan 2013 14:42:01 -0500 Subject: [PATCH] Realigned AMD wrapper --- jquery.timeago.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/jquery.timeago.js b/jquery.timeago.js index c05e9f2..5161345 100644 --- a/jquery.timeago.js +++ b/jquery.timeago.js @@ -13,16 +13,16 @@ * * Copyright (c) 2008-2013, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org) */ - - (function(factory) { - // Add jQuery via AMD registration or browser globals - if (typeof define === 'function' && define.amd) { - define([ 'jquery' ], factory); - } - else { - factory(jQuery); - } -}(function($) { + +(function (factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['jquery'], factory); + } else { + // Browser globals + factory(jQuery); + } +}(function ($) { $.timeago = function(timestamp) { if (timestamp instanceof Date) { return inWords(timestamp);