Anonymous ID: 273dee April 15, 2023, 5:36 p.m. No.18701615   🗄️.is đź”—kun

>>18701570

>is this css?

yes

someanon posted anon's favorite "custom JS" few months back, it shows "(pb)" after any link that's not in the current bread (which ALSO means, thisanon NEVER gets scolded for missing the (pb) because it's always there, e.g., if anon copies a Notable line). Otheranon who posted this also had a "small" directive around the "(pb)" which turned it green like the "(you)"s appear, which caused some visual confusion so anon took it out. Here's the JS:

 

/ Enter your own Javascript code here… /

/ You can include JS files from remote servers, for example: /

/ load_js("http://example.com/script.js"); /

 

/ Auto PB /

$(document).ready(function () {

// Get a list of all the postID's in this bread

var posts = [];

var updatePosts = function () {

posts = [];

// Get the OP ID of this bread

var OP = parseInt($('div.post.op a.post_no:eq(1)').text());

posts.push(OP);

$('div.post.reply').find('a.post_no:eq(1)').each(function () {

var postID = parseInt($(this).text());

posts.push(postID);

});

};

// Iterate all posts and look for links to update

var showpbLinks = function () {

$(this).find('div.body a:not([rel="nofollow"])').each(function () {

var postID;

if (postID = $(this).text().match(/^>>(\d+)$/))

postID = parseInt(postID[1]);

else

return;

// Search the posts array for this post

var isInBread = $.inArray(postID, posts);

// MAGIC

if (isInBread === -1) {

$(this).after(' (pb)');

}

});

};

// Make it go

updatePosts();

$('div.post.reply').each(showpbLinks);

// allow to work with auto-reload.js, etc.

$(document).on('new_post', function (e, post) {

if ($(post).is('div.post.reply')) {

updatePosts();

$(post).each(showpbLinks);

}

else {

updatePosts();

$(post).find('div.post.reply').each(showpbLinks);

}

});

});