PageSourceSearch

https://cursoseadgratis.com/wp-content/plugins/portal-do-aluno/assets/js/script.js?ver=1790509135

js cursoseadgratis.com collected 2026-09-27 11:39:08 UTC 2,784 bytes, 79 lines download raw bytes

1document.addEventListener('DOMContentLoaded', () => {
2    // 1. Dynamic Date (Month)
3    const monthNames = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
4    const d = new Date();
5    const currentMonthSpan = document.getElementById('current-month');
6    if (currentMonthSpan) {
7        currentMonthSpan.textContent = monthNames[d.getMonth()];
8    }
9
10    // 2. Tab Filtering Logic
11    const filterBtns = document.querySelectorAll('.filter-btn');
12    const courseCards = document.querySelectorAll('.course-card');
13
14    if (filterBtns.length > 0) {
15        filterBtns.forEach(btn => {
16            btn.addEventListener('click', () => {
17                // Remove active class from all
18                filterBtns.forEach(b => b.classList.remove('active'));
19                // Add active to clicked
20                btn.classList.add('active');
21
22                const filterValue = btn.getAttribute('data-filter');
23
24                courseCards.forEach(card => {
25                    const categories = card.getAttribute('data-category').split(' '); // Handle multiple classes if needed
26
27                    if (filterValue === 'all') {
28                        card.style.display = 'flex';
29                    } else {
30                        if (categories.includes(filterValue)) {
31                            card.style.display = 'flex';
32                        } else {
33                            card.style.display = 'none';
34                        }
35                    }
36                });
37            });
38        });
39    }
40
41    // 3. Simple Header Scroll Effect
42    const header = document.querySelector('.site-header');
43    if (header) {
44        window.addEventListener('scroll', () => {
45            if (window.scrollY > 10) {
46                header.style.boxShadow = "0 1px 2px rgba(0,0,0,0.05)";
47            } else {
48                header.style.boxShadow = "none";
49            }
50        });
51    }
52
53    console.log('Portal do Aluno loaded - WP Plugin Logic Active');
54});
55
56// Global Share Function
57window.handleShare = async function (event) {
58    if (event) {
59        event.preventDefault();
60        event.stopPropagation();
61    }
62
63    const shareData = {
64        title: document.title,
65        text: 'Confira este curso gratuito no Portal do Aluno!',
66        url: window.location.href
67    };
68
69    try {
70        if (navigator.share) {
71            await navigator.share(shareData);
72        } else {
73            await navigator.clipboard.writeText(window.location.href);
74            alert('Link copiado para a área de transferência!');
75        }
76    } catch (err) {
77        console.error('Share failed:', err);
78    }
79};

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.