js/local-time.js: Make jQuery optional

This commit is contained in:
Michael Foster 2013-07-31 04:37:07 -04:00
parent 46ebcbf51d
commit 0a97cf7215

View File

@ -6,7 +6,7 @@
* Copyright (c) 2012 Michael Save <savetheinternet@tinyboard.org>
*
* Usage:
* $config['additional_javascript'][] = 'js/jquery.min.js';
* // $config['additional_javascript'][] = 'js/jquery.min.js';
* $config['additional_javascript'][] = 'js/local-time.js';
*
*/
@ -45,9 +45,11 @@ onready(function(){
do_localtime(document);
// allow to work with auto-reload.js, etc.
$(document).bind('new_post', function(e, post) {
do_localtime(post);
});
if (window.jQuery) {
// allow to work with auto-reload.js, etc.
$(document).bind('new_post', function(e, post) {
do_localtime(post);
});
}
});