tunnel: intiation de la com officielle

major_edits: mail dans liens + graff overlay + simple click dans panneau 
'à propos'
This commit is contained in:
2026-04-04 02:04:40 +02:00
parent a5c9c73d51
commit 7c6e33d624
36 changed files with 716 additions and 94 deletions
+31 -4
View File
@@ -14,14 +14,18 @@ function titleAndContent(str){
let content = "";
let src = [];
for(let line of contentData){
if(line.includes('http')){
let linkData = line.split("@");
if(line.includes('http')||line.includes('@')){
let linkData = line.split("# ");
console.log(linkData);
let linkNoFormat = linkData[1].split("\"");
let url = "";
for(let el of linkNoFormat){
if(el.includes('http')){
url = el;
break
} else if(el.includes('@')){
url = 'mailto:' + el;
break
} else {
continue
}
@@ -36,21 +40,38 @@ function titleAndContent(str){
}
return {
title: title,
content: content,
content: content.split('/333/')[0],
links: src,
}
}
function exceptionKey(user, content){
let data = content.split('/333/');
let key = "";
if (data.length > 1) key = data[1].split('<br>')[0];
//console.log(key);
if (key === "bm90X3dlYnNpdGVfY29udGVudA==" && user !=="Drags and Nerds /") return true;
if (user === "Drags and Nerds /"){
if(key != "c2VuZF9tZXNzYWdlX3RvX3dlYnNpdGU="){
return true;
}
}
return false;
}
export async function loadPeopleData() {
const usernamesRes = await fetch('./DATA/peopleData.json');
const pData = await usernamesRes.json();
//console.log("USERS :", pData);
const res = await fetch("https://pouet.drags-nerds.net/api/v1/timelines/public?local=true&limit=40");
if (!res.ok)
throw new Error(`Server responded with ${res.status} ${res.statusText}`);
const pouets = await res.json();
//console.log("POUETS :" , pouets);
const filtered = pouets.filter(p => pData.some(user => p.account.display_name === user.name));
//console.log("FILTERED :" , filtered);
const files = {};
for (const user of pData) {
files[user.name] = [];
@@ -73,10 +94,16 @@ export async function loadPeopleData() {
!pouet.media_attachments[0].type.includes('image')) {
continue;
}
//ignorer réponses
if (pouet.in_reply_to_account_id) {
continue;
}
//ignorer exceptions
let exception = exceptionKey(username, pouet.content);
//console.log(exception)
if(exception){
continue;
}
if (pouet.content.includes('http')) {
let textInfos = titleAndContent(pouet.content);