this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

wip

+79
+79
index.html
··· 1925 1925 } 1926 1926 } 1927 1927 1928 + // Academic paper detection - PDF files and academic domains 1929 + else if ( 1930 + link.url.toLowerCase().endsWith('.pdf') || 1931 + url.hostname.includes('arxiv.org') || 1932 + url.hostname.includes('nature.com') || 1933 + url.hostname.includes('science.org') || 1934 + url.hostname.includes('mdpi.com') 1935 + ) { 1936 + // Set display text based on source 1937 + if (url.hostname.includes('arxiv.org')) { 1938 + // Try to extract arXiv ID 1939 + const arxivIdMatch = url.pathname.match(/\d+\.\d+/); 1940 + if (arxivIdMatch) { 1941 + displayText = `<img src="free-icons/svgs/regular-file-pdf.svg" width="14" height="14" style="vertical-align: middle; margin-right: 4px;"> ${arxivIdMatch[0]}`; 1942 + } else { 1943 + displayText = `<img src="free-icons/svgs/regular-file-pdf.svg" width="14" height="14" style="vertical-align: middle; margin-right: 4px;"> Paper`; 1944 + } 1945 + } else if (url.hostname.includes('nature.com')) { 1946 + displayText = `<img src="free-icons/svgs/regular-file-pdf.svg" width="14" height="14" style="vertical-align: middle; margin-right: 4px;"> Paper`; 1947 + } else if (url.hostname.includes('science.org')) { 1948 + displayText = `<img src="free-icons/svgs/regular-file-pdf.svg" width="14" height="14" style="vertical-align: middle; margin-right: 4px;"> Paper`; 1949 + } else if (url.hostname.includes('mdpi.com')) { 1950 + displayText = `<img src="free-icons/svgs/regular-file-pdf.svg" width="14" height="14" style="vertical-align: middle; margin-right: 4px;"> Paper`; 1951 + } else if (link.url.toLowerCase().endsWith('.pdf')) { 1952 + // For direct PDF links, try to get a meaningful filename 1953 + const pathParts = url.pathname.split('/'); 1954 + const filename = pathParts[pathParts.length - 1]; 1955 + if (filename) { 1956 + displayText = `<img src="free-icons/svgs/regular-file-pdf.svg" width="14" height="14" style="vertical-align: middle; margin-right: 4px;"> ${decodeURIComponent(filename)}`; 1957 + } else { 1958 + displayText = `<img src="free-icons/svgs/regular-file-pdf.svg" width="14" height="14" style="vertical-align: middle; margin-right: 4px;"> Document`; 1959 + } 1960 + } 1961 + } 1962 + 1928 1963 // Determine link type for styling and future reference 1929 1964 let linkType = ''; 1930 1965 if (url.hostname.includes('github')) linkType = 'github'; ··· 1939 1974 else if (url.hostname.includes('news.ycombinator.com')) linkType = 'hackernews'; 1940 1975 else if (url.hostname === 'bsky.app' || url.hostname === 'bsky.social') linkType = 'bluesky'; 1941 1976 else if (url.hostname === 'ocaml.org' && url.pathname.startsWith('/p/')) linkType = 'ocaml'; 1977 + else if ( 1978 + link.url.toLowerCase().endsWith('.pdf') || 1979 + url.hostname.includes('arxiv.org') || 1980 + url.hostname.includes('nature.com') || 1981 + url.hostname.includes('science.org') || 1982 + url.hostname.includes('mdpi.com') 1983 + ) linkType = 'academic'; 1942 1984 1943 1985 return `<a href="${link.url}" target="_blank" class="external-link-item" title="${link.url}" data-link-type="${linkType}">${displayText}</a>`; 1944 1986 }).join(' ')} ··· 2290 2332 displayText = 'Post'; 2291 2333 } else { 2292 2334 displayText = `@${parts[0]}`; 2335 + } 2336 + } 2337 + } 2338 + 2339 + // Academic paper detection - PDF files and academic domains 2340 + else if ( 2341 + link.url.toLowerCase().endsWith('.pdf') || 2342 + url.hostname.includes('arxiv.org') || 2343 + url.hostname.includes('nature.com') || 2344 + url.hostname.includes('science.org') || 2345 + url.hostname.includes('mdpi.com') 2346 + ) { 2347 + iconPath = 'free-icons/svgs/regular-file-pdf.svg'; 2348 + 2349 + // Set display text based on source 2350 + if (url.hostname.includes('arxiv.org')) { 2351 + // Try to extract arXiv ID 2352 + const arxivIdMatch = url.pathname.match(/\d+\.\d+/); 2353 + if (arxivIdMatch) { 2354 + displayText = arxivIdMatch[0]; 2355 + } else { 2356 + displayText = 'Paper'; 2357 + } 2358 + } else if (url.hostname.includes('nature.com')) { 2359 + displayText = 'Paper'; 2360 + } else if (url.hostname.includes('science.org')) { 2361 + displayText = 'Paper'; 2362 + } else if (url.hostname.includes('mdpi.com')) { 2363 + displayText = 'Paper'; 2364 + } else if (link.url.toLowerCase().endsWith('.pdf')) { 2365 + // For direct PDF links, try to get a meaningful filename 2366 + const pathParts = url.pathname.split('/'); 2367 + const filename = pathParts[pathParts.length - 1]; 2368 + if (filename) { 2369 + displayText = decodeURIComponent(filename); 2370 + } else { 2371 + displayText = 'Document'; 2293 2372 } 2294 2373 } 2295 2374 }