Skip to content

Latest commit

 

History

History
225 lines (202 loc) · 8.78 KB

index.md

File metadata and controls

225 lines (202 loc) · 8.78 KB
layout title
default
Home

Hi! This is just a personal log of my stuff.

Don't expect too much, please...

Mini Gamez Collections

Python Vulnerability Scanner

eMail Analyst Tools

View on GitHub

Who am I?

Be Red, feel Blue, and yet behave Purple.

YouTube Channel

<iframe width="560" height="315" src="https://www.youtube.com/embed/Dc5sQPeqo5w" frameborder="0" allowfullscreen></iframe>
Visit on YouTube

LatePost

Ensuring Application Security in the Workplace

Just Script Your own Vulnerability Scanner Tools

. . .

<script> document.addEventListener('DOMContentLoaded', function () { const sections = document.querySelectorAll('section'); sections.forEach(section => section.style.display = 'none'); function showSection(selectedId) { sections.forEach(section => { if (section.id === selectedId) { section.style.display = 'block'; } else { section.style.display = 'none'; } }); } showSection('home'); document.querySelectorAll('nav a').forEach(link => { link.addEventListener('click', function (e) { e.preventDefault(); const targetId = this.getAttribute('href').substring(1); showSection(targetId); }); }); let allItems = []; let currentPage = 1; const itemsPerPage = 5; async function fetchRSSFeeds() { const feeds = [ { url: 'https://medium.com/feed/@bibib', source: 'Medium' }, { url: 'https://nbsc7.wordpress.com/feed', source: 'WordPress' }, { url: 'https://kumelsnote.blogspot.com/feeds/posts/default?alt=rss', source: 'Blogspot' } ]; for (const feed of feeds) { const rssToJsonUrl = `https://api.rss2json.com/v1/api.json?rss_url=${encodeURIComponent(feed.url)}`; try { const response = await fetch(rssToJsonUrl); if (!response.ok) { throw new Error(`Failed to fetch feed from ${feed.source}`); } const data = await response.json(); const items = data.items.map(item => ({ title: item.title, link: item.link, pubDate: new Date(item.pubDate), source: feed.source })); allItems = allItems.concat(items); } catch (error) { console.error(`Error fetching ${feed.source} feed:`, error); const feedContainer = document.getElementById('rss-feed'); if (feedContainer) { feedContainer.innerHTML += `

Failed to load ${feed.source} feed.

`; } } } // Sort by date allItems.sort((a, b) => b.pubDate - a.pubDate); // Display the first page displayPage(currentPage); } function displayPage(page) { const feedContainer = document.getElementById('rss-feed'); feedContainer.innerHTML = ''; // Clear current content // Calculate the items to display on the current page const start = (page - 1) * itemsPerPage; const end = page * itemsPerPage; const itemsToShow = allItems.slice(start, end); if (itemsToShow.length) { itemsToShow.forEach(item => { const feedItem = document.createElement('div'); feedItem.innerHTML = `

${item.pubDate.toLocaleDateString()} - ${item.source} | ${item.title}

`; feedContainer.appendChild(feedItem); }); } else { feedContainer.innerHTML = 'No feed items available.'; } // Update pagination controls updatePaginationControls(page); } function updatePaginationControls(page) { const paginationContainer = document.getElementById('pagination'); paginationContainer.innerHTML = ''; // Clear existing controls const totalPages = Math.ceil(allItems.length / itemsPerPage); if (totalPages > 1) { if (page > 1) { const prevButton = document.createElement('button'); prevButton.textContent = '<<'; prevButton.onclick = () => { currentPage--; displayPage(currentPage); }; paginationContainer.appendChild(prevButton); } if (page < totalPages) { const nextButton = document.createElement('button'); nextButton.textContent = '>>'; nextButton.onclick = () => { currentPage++; displayPage(currentPage); }; paginationContainer.appendChild(nextButton); } } } fetchRSSFeeds(); }); </script>