PageSourceSearch

https://dion-olympos.gr/wp-content/themes/govity-child/js/auto-alt.js?ver=7.1.2

js dion-olympos.gr collected 2026-10-02 10:13:29 UTC 3,891 bytes, 129 lines download raw bytes

1jQuery(document).ready(function( $ ){
2   setTimeout(function() {
3      $('img').each(function() {
4        if (!$(this).attr('alt') || $(this).attr('alt').trim() === '') {
5          $(this).attr('alt', 'Δήμος Δίου-Ολύμπου');
6        }
7      });
8    }, 2000);
9
10
11});
12
13jQuery(document).ready(function($){
14    var skipLink = $('a.skip-link.screen-reader-text');
15
16    if(skipLink.length){
17        skipLink.css({
18            'color': '#212121',        // νέο χρώμα κειμένου
19            'background-color': '#ffffff', // νέο background
20            'opacity': '1'             // για να είναι ορατό αν χρειαστεί
21        });
22    }
23});
24
25jQuery(document).ready(function($) {
26    setTimeout(function() {
27        // Subtitle
28        $('.portfolio-three__sub-title').each(function() {
29            $(this).css({
30                'background-color': 'rgba(30, 90, 122, 1)', // #1e5a7a
31                'padding': '2px 6px',
32                'border-radius': '3px'
33            });
34        });
35
36        // Title
37        $('.portfolio-three__title a').each(function() {
38            $(this).css({
39                'background-color': 'rgba(30, 90, 122, 1)', // #1e5a7a
40                'padding': '2px 6px',
41                'border-radius': '3px'
42            });
43        });
44    }, 500); // μικρό delay για να φορτωθεί η σελίδα
45});
46
47
48
49
50document.addEventListener('DOMContentLoaded', function() {
51  const links = document.querySelectorAll('a');
52
53  links.forEach(link => {
54    const text = link.textContent.trim();
55    const hasImage = link.querySelector('img');
56
57    if (text === '' && (!hasImage || !hasImage.alt)) {
58      const hiddenText = document.createElement('span');
59      hiddenText.textContent = 'Link';
60      // Ορίζει inline στυλ ώστε το Wave να το “διαβάσει” σωστά
61      hiddenText.setAttribute('style', `
62        position: absolute;
63        left: -9999px;
64        top: auto;
65        width: 1px;
66        height: 1px;
67        overflow: hidden;
68        color: rgb(0, 0, 0);
69        background-color: rgb(255, 255, 255);
70        opacity: 1;
71      `);
72      link.appendChild(hiddenText);
73    }
74  });
75});
76
77
78
79
80
81
82jQuery(document).ready(function($){
83    // Βρίσκουμε όλα τα κουμπιά με role="presentation" που δεν έχουν text
84    $('button[role="presentation"]').each(function() {
85        if ($(this).text().trim() === '') {
86            // Αν είναι owl-prev ή owl-next, βάζουμε κατάλληλο κείμενο
87            var text = '';
88            if ($(this).hasClass('owl-prev')) {
89                text = 'Previous slide';
90            } else if ($(this).hasClass('owl-next')) {
91                text = 'Next slide';
92            } else {
93                text = 'Button';
94            }
95
96            // Προσθέτουμε span με κλάση sr-only (κρυφό από το μάτι)
97            $(this).append('<span class="sr-only">' + text + '</span>');
98        }
99    });
100});
101
102
103
104
105jQuery(document).ready(function($){
106    // Για όλα τα κουμπιά με role="presentation"
107    $('.owl-prev, .owl-next').each(function(){
108        // Αν δεν έχει ήδη κείμενο
109        if($(this).text().trim() === ''){
110            if($(this).hasClass('owl-prev')){
111                $(this).append('<span class="sr-only">Previous slide</span>');
112            }
113            if($(this).hasClass('owl-next')){
114                $(this).append('<span class="sr-only">Next slide</span>');
115            }
116        }
117    });
118});
119
120jQuery(document).ready(function($){
121    $('.owl-carousel').on('initialized.owl.carousel', function(){
122        // Προσθήκη aria-label ώστε να μην είναι "empty"
123        $('.owl-prev').attr('aria-label', 'Previous slide');
124        $('.owl-next').attr('aria-label', 'Next slide');
125
126    });
127});
128
129

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.