summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-06-15 01:39:39 -0400
committerMichael Foster <savetheinternet@tinyboard.org>2013-07-31 04:47:50 -0400
commit2868dd7886082cfb11fcbe8f8bee1108a48c81a3 (patch)
tree3d7c4183dc0949e734ca01c02d91b14084a09c61 /js
parente648121e4ad07aadec7579d62a56190ca19d3fe5 (diff)
javascripts: fixed interactions (BEWARE, inline-expanding.js now requires jquery! fix your configs)
Conflicts: js/expand.js js/inline-expanding.js
Diffstat (limited to 'js')
-rw-r--r--js/expand.js4
-rw-r--r--js/inline-expanding.js5
-rw-r--r--js/show-backlinks.js4
3 files changed, 8 insertions, 5 deletions
diff --git a/js/expand.js b/js/expand.js
index d5706643..f2cfdc5e 100644
--- a/js/expand.js
+++ b/js/expand.js
@@ -14,7 +14,7 @@
$(document).ready(function(){
if($('div.banner').length != 0)
return; // not index
-
+
$('div.post.op span.omitted').each(function() {
$(this)
.html($(this).text().replace(_("Click reply to view."), '<a href="javascript:void(0)">'+_("Click to expand")+'</a>.'))
@@ -51,4 +51,4 @@ $(document).ready(function(){
});
});
});
-});
+}); \ No newline at end of file
diff --git a/js/inline-expanding.js b/js/inline-expanding.js
index 20383f04..e529a395 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);
@@ -64,4 +64,3 @@ onready(function(){
}
});
-
diff --git a/js/show-backlinks.js b/js/show-backlinks.js
index e6e17e4f..4ead494b 100644
--- a/js/show-backlinks.js
+++ b/js/show-backlinks.js
@@ -46,5 +46,9 @@ onready(function(){
};
$('div.post.reply').each(showBackLinks);
+
+ $(document).bind('new_post', function(e, post) {
+ showBackLinks.call(post);
+ });
});