Anonymous 10/15/2019 (Tue) 03:53:17 No.17738 del
JS: RELABEL BROKEN POST REFERENCES

BO is reposting content (danks fren) but there's going to be broken post references.

the javascript below will rewrite broken quoted posts in the form >>##### /pb, this should help prevent anons from clicking broken links and being taken offbread.


VERIFY ANY JAVASCRIPT BEFORE RUNNING IT


var links = Array.from(document.querySelectorAll('a.quoteLink'));

var quotedPost = (link) => /^>>[0-9]+$/.test(link.innerText);
var pbQuotedPost = (link) => link.pathname != document.location.pathname;
var relabelQuotedPost = (link) => link.innerText = link.innerText + ' /pb';
var relabelQuotedPosts = () => links.filter(quotedPost).filter(pbQuotedPost).forEach(relabelQuotedPost);

Message too long. Click here to view full text.