Atom feed for our EEG site

wip

Changed files
+79
+79
index.html
···
+
// Academic paper detection - PDF files and academic domains
+
else if (
+
link.url.toLowerCase().endsWith('.pdf') ||
+
url.hostname.includes('arxiv.org') ||
+
url.hostname.includes('nature.com') ||
+
url.hostname.includes('science.org') ||
+
url.hostname.includes('mdpi.com')
+
) {
+
// Set display text based on source
+
if (url.hostname.includes('arxiv.org')) {
+
// Try to extract arXiv ID
+
const arxivIdMatch = url.pathname.match(/\d+\.\d+/);
+
if (arxivIdMatch) {
+
displayText = `<img src="free-icons/svgs/regular-file-pdf.svg" width="14" height="14" style="vertical-align: middle; margin-right: 4px;"> ${arxivIdMatch[0]}`;
+
} else {
+
displayText = `<img src="free-icons/svgs/regular-file-pdf.svg" width="14" height="14" style="vertical-align: middle; margin-right: 4px;"> Paper`;
+
}
+
} else if (url.hostname.includes('nature.com')) {
+
displayText = `<img src="free-icons/svgs/regular-file-pdf.svg" width="14" height="14" style="vertical-align: middle; margin-right: 4px;"> Paper`;
+
} else if (url.hostname.includes('science.org')) {
+
displayText = `<img src="free-icons/svgs/regular-file-pdf.svg" width="14" height="14" style="vertical-align: middle; margin-right: 4px;"> Paper`;
+
} else if (url.hostname.includes('mdpi.com')) {
+
displayText = `<img src="free-icons/svgs/regular-file-pdf.svg" width="14" height="14" style="vertical-align: middle; margin-right: 4px;"> Paper`;
+
} else if (link.url.toLowerCase().endsWith('.pdf')) {
+
// For direct PDF links, try to get a meaningful filename
+
const pathParts = url.pathname.split('/');
+
const filename = pathParts[pathParts.length - 1];
+
if (filename) {
+
displayText = `<img src="free-icons/svgs/regular-file-pdf.svg" width="14" height="14" style="vertical-align: middle; margin-right: 4px;"> ${decodeURIComponent(filename)}`;
+
} else {
+
displayText = `<img src="free-icons/svgs/regular-file-pdf.svg" width="14" height="14" style="vertical-align: middle; margin-right: 4px;"> Document`;
+
}
+
}
+
}
+
// Determine link type for styling and future reference
let linkType = '';
if (url.hostname.includes('github')) linkType = 'github';
···
else if (url.hostname.includes('news.ycombinator.com')) linkType = 'hackernews';
else if (url.hostname === 'bsky.app' || url.hostname === 'bsky.social') linkType = 'bluesky';
else if (url.hostname === 'ocaml.org' && url.pathname.startsWith('/p/')) linkType = 'ocaml';
+
else if (
+
link.url.toLowerCase().endsWith('.pdf') ||
+
url.hostname.includes('arxiv.org') ||
+
url.hostname.includes('nature.com') ||
+
url.hostname.includes('science.org') ||
+
url.hostname.includes('mdpi.com')
+
) linkType = 'academic';
return `<a href="${link.url}" target="_blank" class="external-link-item" title="${link.url}" data-link-type="${linkType}">${displayText}</a>`;
}).join(' ')}
···
displayText = 'Post';
} else {
displayText = `@${parts[0]}`;
+
}
+
}
+
}
+
+
// Academic paper detection - PDF files and academic domains
+
else if (
+
link.url.toLowerCase().endsWith('.pdf') ||
+
url.hostname.includes('arxiv.org') ||
+
url.hostname.includes('nature.com') ||
+
url.hostname.includes('science.org') ||
+
url.hostname.includes('mdpi.com')
+
) {
+
iconPath = 'free-icons/svgs/regular-file-pdf.svg';
+
+
// Set display text based on source
+
if (url.hostname.includes('arxiv.org')) {
+
// Try to extract arXiv ID
+
const arxivIdMatch = url.pathname.match(/\d+\.\d+/);
+
if (arxivIdMatch) {
+
displayText = arxivIdMatch[0];
+
} else {
+
displayText = 'Paper';
+
}
+
} else if (url.hostname.includes('nature.com')) {
+
displayText = 'Paper';
+
} else if (url.hostname.includes('science.org')) {
+
displayText = 'Paper';
+
} else if (url.hostname.includes('mdpi.com')) {
+
displayText = 'Paper';
+
} else if (link.url.toLowerCase().endsWith('.pdf')) {
+
// For direct PDF links, try to get a meaningful filename
+
const pathParts = url.pathname.split('/');
+
const filename = pathParts[pathParts.length - 1];
+
if (filename) {
+
displayText = decodeURIComponent(filename);
+
} else {
+
displayText = 'Document';