js/local-time.js: Make jQuery optional
This commit is contained in:
parent
46ebcbf51d
commit
0a97cf7215
@ -6,7 +6,7 @@
|
|||||||
* Copyright (c) 2012 Michael Save <savetheinternet@tinyboard.org>
|
* Copyright (c) 2012 Michael Save <savetheinternet@tinyboard.org>
|
||||||
*
|
*
|
||||||
* Usage:
|
* Usage:
|
||||||
* $config['additional_javascript'][] = 'js/jquery.min.js';
|
* // $config['additional_javascript'][] = 'js/jquery.min.js';
|
||||||
* $config['additional_javascript'][] = 'js/local-time.js';
|
* $config['additional_javascript'][] = 'js/local-time.js';
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -44,10 +44,12 @@ onready(function(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
do_localtime(document);
|
do_localtime(document);
|
||||||
|
|
||||||
// allow to work with auto-reload.js, etc.
|
if (window.jQuery) {
|
||||||
$(document).bind('new_post', function(e, post) {
|
// allow to work with auto-reload.js, etc.
|
||||||
do_localtime(post);
|
$(document).bind('new_post', function(e, post) {
|
||||||
});
|
do_localtime(post);
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user