Compare commits

...

2 Commits

Author SHA1 Message Date
towards-a-new-leftypol 419a57f2d9 add backlinks to OP 2024-12-30 20:14:27 -05:00
towards-a-new-leftypol 40d77692a2 Fix commit 1c13ec98ba
- Unintentionally disabled that piece of code instead of removing adding
  the additional br tag that made double spaces between posts.
- add the postcontainers instead of post.reply (which is inside this
  container) to preserve the arrows
2024-12-26 02:38:32 -05:00
3 changed files with 7 additions and 9 deletions

View File

@ -28,17 +28,15 @@ $(document).ready(function(){
context: document.body,
success: function(data) {
var last_expanded = false;
$(data).find('div.post.reply').each(function() {
$(data).find('div.postcontainer').each(function() {
thread.find('div.hidden').remove();
var post_in_doc = thread.find('#' + $(this).attr('id'));
if(post_in_doc.length == 0) {
/*
if(last_expanded) {
$(this).addClass('expanded').insertAfter(last_expanded).before('<br class="expanded">');
$(this).addClass('expanded').insertAfter(last_expanded);
} else {
$(this).addClass('expanded').insertAfter(thread.find('div.post:first')).after('<br class="expanded">');
$(this).addClass('expanded').insertAfter(thread.find('div.post:first'));
}
*/
last_expanded = $(this);
$(document).trigger('new_post', this);
} else {

View File

@ -25,7 +25,7 @@ $(document).ready(function(){
else
return;
$post = $('#reply_' + id);
$post = $('#reply_' + id + ', #op_' + id);
if($post.length == 0)
return;
@ -46,9 +46,9 @@ $(document).ready(function(){
});
};
$('div.post.reply').each(showBackLinks);
$('div.post').each(showBackLinks);
$(document).on('new_post', function(e, post) {
$(document).on('new_post', function(e, post) {
if ($(post).hasClass("reply")) {
showBackLinks.call(post);
}

View File

@ -152,7 +152,7 @@ $(document).ready(function(){
$('.boardlist').append('<span>[ <a class="watchlist-toggle" href="#">'+_('watchlist')+'</a> ]</span>');
$('.compact-boardlist').append('<span>[ <a class="watchlist-toggle" href="#">'+_('watchlist')+'</a> ]</span>');
//Append a watch thread button after every OP.
$('.op>.intro').append('<a class="watchThread" href="#">['+_('Watch Thread')+']</a>');
$('.op>.intro>a:last').after('<a class="watchThread" href="#">['+_('Watch Thread')+']</a>');
//Draw the watchlist, hidden.
watchlist.render();