diff options
| author | czaks <marcin@6irc.net> | 2013-07-31 14:54:20 -0400 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2013-07-31 14:54:20 -0400 |
| commit | 55c7146d884005f70d15e991a9e8ea31b7021361 (patch) | |
| tree | 57b6548601dfd1542febe05375efe49d439e1fb4 /js | |
| parent | ee23ec1e24bb2a0cec24af011012e95652ce85a9 (diff) | |
| parent | 8e4c493a4c5bbff07483fd4a11c44c687c99e441 (diff) | |
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Conflicts:
inc/config.php
inc/display.php
inc/functions.php
inc/image.php
js/expand.js
js/hide-threads.js
js/local-time.js
js/smartphone-spoiler.js
templates/header.html
templates/index.html
templates/main.js
templates/page.html
templates/post_reply.html
templates/post_thread.html
templates/thread.html
Diffstat (limited to 'js')
| -rw-r--r-- | js/expand.js | 2 | ||||
| -rw-r--r-- | js/inline-expanding.js | 5 | ||||
| -rw-r--r-- | js/local-time.js | 14 |
3 files changed, 11 insertions, 10 deletions
diff --git a/js/expand.js b/js/expand.js index c69979f9..b13d0bcf 100644 --- a/js/expand.js +++ b/js/expand.js @@ -14,7 +14,7 @@ $(document).ready(function(){ if($('div.banner').length != 0) return; // not index - + var do_expand = function() { $(this) .html($(this).text().replace(_("Click reply to view."), '<a href="javascript:void(0)">'+_("Click to expand")+'</a>.')) diff --git a/js/inline-expanding.js b/js/inline-expanding.js index 7edb2715..87bf0b11 100644 --- a/js/inline-expanding.js +++ b/js/inline-expanding.js @@ -14,7 +14,7 @@ onready(function(){ var inline_expand_post = function() { var link = this.getElementsByTagName('a'); - + for (var i = 0; i < link.length; i++) { if (typeof link[i] == "object" && link[i].childNodes && typeof link[i].childNodes[0] !== 'undefined' && link[i].childNodes[0].src && link[i].className != 'file') { link[i].childNodes[0].style.maxWidth = '95%'; @@ -54,7 +54,7 @@ onready(function(){ if (window.jQuery) { $('div[id^="thread_"]').each(inline_expand_post); - + // allow to work with auto-reload.js, etc. $(document).bind('new_post', function(e, post) { inline_expand_post.call(post); @@ -63,4 +63,3 @@ onready(function(){ inline_expand_post.call(document); } }); - diff --git a/js/local-time.js b/js/local-time.js index a4e2fb51..d581e304 100644 --- a/js/local-time.js +++ b/js/local-time.js @@ -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); + }); + } }); |
