Skip to content

Commit e205323

Browse files
committed
define as AMD module
1 parent a9f7252 commit e205323

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

url.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,16 @@
182182
};
183183
})();
184184

185-
if(typeof window.jQuery !== 'undefined') {
186-
window.jQuery.extend({
187-
url: function(arg, url) { return window.url(arg, url); }
188-
});
189-
}
185+
if (typeof window.define === 'function' && window.define.amd) {
186+
window.define(url);
187+
} else {
188+
if(typeof window.jQuery !== 'undefined') {
189+
window.jQuery.extend({
190+
url: function(arg, url) { return window.url(arg, url); }
191+
});
192+
}
193+
194+
window.url = url;
195+
}
190196

191-
window.url = url;
192197
})();

0 commit comments

Comments
 (0)