1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-28 01:10:51 +01:00

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';
*
*/
@ -44,10 +44,12 @@ 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);
});
}
});