PageSourceSearch

https://cyberseekus.herokuapp.com/components/roles-skills.js

js cyberseekus.herokuapp.com collected 2026-10-03 14:47:52 UTC 1,319 bytes, 35 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function() {
2    const rolesSkillsElement = document.querySelector('#roles-skills');
3    
4    if (!rolesSkillsElement) {
5        console.warn('No element with id "roles-skills" found');
6        return;
7    }
8
9    fetch('/src/components/roles-skills.html')
10        .then(response => {
11            if (!response.ok) {
12                throw new Error(`HTTP error! status: ${response.status}`);
13            }
14            return response.text();
15        })
16        .then(data => {
17            rolesSkillsElement.innerHTML = data;
18            
19            // Get current page filename from URL
20            const currentPage = window.location.pathname.split('/').pop() || 'index.html';
21            
22            // Get the tab ID by removing .html from the current page
23            const currentTabId = currentPage.replace('.html', '');
24            
25            // Find and activate the corresponding tab
26            const activeTab = rolesSkillsElement.querySelector(`#${currentTabId}`);
27            if (activeTab) {
28                activeTab.classList.add('active');
29            }
30        })
31        .catch(error => {
32            console.error('Error loading roles-skills component:', error);
33            rolesSkillsElement.innerHTML = 'Error loading component';
34        });
35}); 

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.