mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-17 11:28:41 +01:00
Show backlinks on OP's as well, and disable the script on Ukko boards (it's broken there anyway)
This commit is contained in:
parent
a989435253
commit
e672cf9ba1
@ -14,8 +14,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
onready(function(){
|
onready(function(){
|
||||||
|
if($('body').hasClass('active-ukko')) return;
|
||||||
var showBackLinks = function() {
|
var showBackLinks = function() {
|
||||||
var reply_id = $(this).attr('id').replace(/^reply_/, '');
|
var reply_id = $(this).attr('id').replace(/(^reply_)|(^op_)/, '');
|
||||||
|
|
||||||
$(this).find('div.body a:not([rel="nofollow"])').each(function() {
|
$(this).find('div.body a:not([rel="nofollow"])').each(function() {
|
||||||
var id, post, $mentioned;
|
var id, post, $mentioned;
|
||||||
@ -26,8 +27,11 @@ onready(function(){
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
$post = $('#reply_' + id);
|
$post = $('#reply_' + id);
|
||||||
if($post.length == 0)
|
if($post.length == 0){
|
||||||
return;
|
$post = $('#op_' + id);
|
||||||
|
if($post.length == 0)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$mentioned = $post.find('p.intro span.mentioned');
|
$mentioned = $post.find('p.intro span.mentioned');
|
||||||
if($mentioned.length == 0)
|
if($mentioned.length == 0)
|
||||||
@ -47,14 +51,12 @@ onready(function(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
$('div.post.reply').each(showBackLinks);
|
$('div.post.reply').each(showBackLinks);
|
||||||
|
$('div.post.op').each(showBackLinks);
|
||||||
|
|
||||||
$(document).on('new_post', function(e, post) {
|
$(document).on('new_post', function(e, post) {
|
||||||
if ($(post).hasClass("reply")) {
|
showBackLinks.call(post);
|
||||||
showBackLinks.call(post);
|
if ($(post).hasClass("op")) {
|
||||||
}
|
|
||||||
else {
|
|
||||||
$(post).find('div.post.reply').each(showBackLinks);
|
$(post).find('div.post.reply').each(showBackLinks);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user