mirror of
https://github.com/scratchfoundation/jquery-timeago.git
synced 2024-12-17 19:12:42 -05:00
Realigned AMD wrapper
This commit is contained in:
parent
8425e598c3
commit
f9a31fcafc
1 changed files with 10 additions and 10 deletions
|
@ -14,15 +14,15 @@
|
|||
* Copyright (c) 2008-2013, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
|
||||
*/
|
||||
|
||||
(function(factory) {
|
||||
// Add jQuery via AMD registration or browser globals
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define([ 'jquery' ], factory);
|
||||
}
|
||||
else {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($) {
|
||||
}(function ($) {
|
||||
$.timeago = function(timestamp) {
|
||||
if (timestamp instanceof Date) {
|
||||
return inWords(timestamp);
|
||||
|
|
Loading…
Reference in a new issue