From da0f26485ae449ca036fade98c2062428707ecc5 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Mon, 5 Aug 2024 18:34:55 +0200 Subject: [PATCH] show-backlinks.js: trim --- js/show-backlinks.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/js/show-backlinks.js b/js/show-backlinks.js index fc3125db..13c0d354 100644 --- a/js/show-backlinks.js +++ b/js/show-backlinks.js @@ -4,7 +4,7 @@ * * Released under the MIT license * Copyright (c) 2012 Michael Save - * Copyright (c) 2013-2014 Marcin Łabanowski + * Copyright (c) 2013-2014 Marcin Łabanowski * * Usage: * $config['additional_javascript'][] = 'js/jquery.min.js'; @@ -16,39 +16,39 @@ onready(function(){ var showBackLinks = function() { var reply_id = $(this).attr('id').replace(/(^reply_)|(^op_)/, ''); - + $(this).find('div.body a:not([rel="nofollow"])').each(function() { var id, post, $mentioned; - + if(id = $(this).text().match(/^>>(\d+)$/)) id = id[1]; else return; - + $post = $('#reply_' + id); if($post.length == 0){ $post = $('#op_' + id); if($post.length == 0) return; } - + $mentioned = $post.find('p.intro span.mentioned'); if($mentioned.length == 0) $mentioned = $('').appendTo($post.find('p.intro')); - + if ($mentioned.find('a.mentioned-' + reply_id).length != 0) return; - + var $link = $('>>' + reply_id + ''); $link.appendTo($mentioned) - + if (window.init_hover) { $link.each(init_hover); } }); }; - + $('div.post.reply').each(showBackLinks); $('div.post.op').each(showBackLinks);