1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 08:34:42 -05:00

add referer remover :3

This commit is contained in:
Ashley 2023-03-04 16:30:57 +00:00
parent eef471c9a2
commit da3bffcbf5

View file

@ -201,7 +201,7 @@ module.exports = function (app, config, renderTemplate) {
return text.replace(urlRegex, (url) => {
// wrap the URL in an <a> tag with the URL as the href attribute
return `<a href="${url.replace("https://youtube.com", "").replace("https://youtu.be", "")}" target="_blank">${url}</a>`;
return `<a href="/api/redirect?u=${btoa(url.replace(/twitter\.com/g, "nitter.net").replace(/reddit\.com/g, "teddit.net").replace("https://youtube.com", "").replace("https://youtu.be", ""))}" target="_blank">${url}</a>`;
});
}