Ugrás a tartalomhoz

„MediaWiki:Common.js” változatai közötti eltérés

Innen: MKOE wiki
Nincs szerkesztési összefoglaló
Címke: Visszaállítva
Visszavontam Dr. Gyúró Zoltán (vita) szerkesztését (oldid: 11457)
Címke: Visszavonás
1. sor: 1. sor:
@charset "UTF-8";
/**
/*
* ============================================================================
cd /home/drgyz/Dokumentumok/wiki.kaktuszgyujtok.hu/wiki_lua_html_css_js
* LIGHTGALLERY GLOBÁLIS INTEGRÁCIÓ (Régi dynamic és új vegyes galéria)
sass --watch --style=expanded gyz.scss:gyz.css
* ============================================================================
*/
*/
/* Legújabb DataTables CSS betöltése */
(function() {
@import url("https://cdn.datatables.net/2.1.8/css/dataTables.dataTables.min.css");
    // 1. LÉPÉS: Ellenőrizzük, hogy BÁRMELYIK galéria típus létezik-e az oldalon. Ha egyik sincs, csak akkor állunk le.
/* MediaWiki specifikus finomhangolás */
    if ($('.wiki-dynamic-gallery').length === 0 && $('.egyedi-galeria-container').length === 0) return;
table.datatable-hook {
 
  width: 100% !important;
    // Erőforrások betöltése mw.loader-rel (Csak egyszer fut le az oldalon)
  margin: 1em 0 !important;
    mw.loader.addStyleTag('@import "https://cdn.jsdelivr.net/npm/lightgallery@2.4.0/css/lightgallery-bundle.min.css";');
  border: 1px solid #a2a9b1 !important;
 
  font-size: 0.9em;
    // LightGallery mag betöltése
    $.getScript('https://cdn.jsdelivr.net/npm/lightgallery@2.4.0/lightgallery.umd.min.js')
        .done(function() {
            console.log('LightGallery 2.4.0 sikeresen betöltve.');
 
            // Ha a régi típusú galéria van az oldalon, elindítjuk
            if ($('.wiki-dynamic-gallery').length > 0) {
                initWikiDynamicGallery();
            }
 
            // Ha az új típusú vegyes galéria van az oldalon, elindítjuk
            if ($('.egyedi-galeria-container').length > 0) {
                initMindenGaleriaElem();
            }
        });
 
    // --- RÉGI WIKI DYNAMIC GALLERY LOGIKA ---
    function initWikiDynamicGallery() {
        $('.wiki-dynamic-gallery').each(function() {
            var $container = $(this);
            if ($container.data('initialized')) return;
            $container.data('initialized', true);
 
            var searchTerm = $container.data('search');
            var limit = $container.data('limit') || 3;
            var targetHeight = 200;
 
            var apiUrl = "https://commons.wikimedia.org/w/api.php?action=query&format=json&generator=search&gsrsearch=File:" +
                        encodeURIComponent(searchTerm) + "&gsrlimit=" + limit +
                        "&prop=imageinfo&iiprop=url|size&iiurlheight=" + targetHeight + "&origin=*";
 
            $.getJSON(apiUrl, function(data) {
                if (data && data.query && data.query.pages) {
                    var pages = data.query.pages;
                    var galleryHtml = '';
 
                    for (var id in pages) {
                        if (!pages[id].imageinfo) continue;
                        var img = pages[id].imageinfo[0];
                        var title = pages[id].title.replace('File:', '');
 
                        galleryHtml += '<a href="' + img.url + '" class="lg-item" data-src="' + img.url + '" data-sub-html="<h4>' + title + '</h4>">';
                        galleryHtml += '  <img src="' + img.thumburl + '" style="height:' + targetHeight + 'px; width:auto; margin:5px; border-radius:6px; cursor:pointer;" alt="' + title + '" />';
                        galleryHtml += '</a>';
                    }
                    $container.html(galleryHtml);
 
                    if (window.lightGallery) {
                        lightGallery($container[0], {
                            selector: '.lg-item',
                            licenseKey: '0000-0000-000-0000'
                        });
                    }
                }
            });
        });
    }
 
// --- ÚJ VEGYES GALÉRIA LOGIKA ---
    function initMindenGaleriaElem() {
        $('.egyedi-galeria-container').each(function() {
            var $container = $(this);
            if ($container.data('vegyes-initialized')) return;
            $container.data('vegyes-initialized', true);
 
            // 1. Külső URL és Commons képek feliratának kezelése
            $container.find('.kulso-url-doboz').each(function() {
                var $doboz = $(this);
                var imgUrl = $doboz.attr('data-src');
 
                // Megkeressük a feliratot, ha üres, megpróbálunk a URL végéből valami értelmeset kivágni
                var $feliratElem = $doboz.find('.galeria-felirat');
                var felirat = $feliratElem.text().trim();
                if (!felirat) {
                    // Ha nincs felirat, a fájlnévből csinálunk egyet (pl. IMG_20240828_150500)
                    var fileTitle = imgUrl.substring(imgUrl.lastIndexOf('/') + 1).split('.')[0];
                    felirat = decodeURIComponent(fileTitle).replace(/_/g, ' ');
                    $feliratElem.text(felirat); // Beírjuk a HTML-be is, hogy látsszon a kép alatt!
                }
 
                var $lgItem = $('<a>', {
                    'href': imgUrl,
                    'class': 'lg-vegyes-item',
                    'data-src': imgUrl,
                    'data-sub-html': '<h4>' + felirat + '</h4>'
                });
 
                $('<img>', {
                    'src': imgUrl,
                    'class': 'galeria-kep url-kep',
                    'alt': felirat
                }).appendTo($lgItem);
 
                $doboz.prepend($lgItem);
                $doboz.find('.url-link-szoveg').remove();
            });
 
            // 2. Belső MediaWiki <figure> képek feliratának kényszerítése
            $container.find('figure').each(function() {
                var $figure = $(this);
                var $a = $figure.find('a.mw-file-description');
                var $img = $figure.find('img.mw-file-element');
 
                if ($a.length > 0 && $img.length > 0) {
                    var imgSrc = $img.attr('src');
                    var origSrc = imgSrc;
 
                    if (imgSrc.indexOf('/thumb/') !== -1) {
                        origSrc = imgSrc.replace('/thumb/', '/').substring(0, imgSrc.replace('/thumb/', '/').lastIndexOf('/'));
                    }
 
                    // Felirat kinyerése
                    var $figcaption = $figure.find('figcaption');
                    var felirat = $figcaption.text().trim();
 
                    // HA ÜRES A FIGCAPTION: Kivágjuk a Fájl: nevet a linkből dekorációnak
                    if (!felirat) {
                        var hrefAttr = $a.attr('href') || ''; // pl. /wiki/Fájl:Lithops_dinterii_1.jpg
                        var rawTitle = hrefAttr.substring(hrefAttr.lastIndexOf(':') + 1).split('.')[0];
                        felirat = decodeURIComponent(rawTitle).replace(/_/g, ' ');
                        $figcaption.text(felirat); // Kényszerítve beírjuk a kép alá!
                    }
 
                    var captionHtml = '<h4>' + felirat + '</h4>';
 
                    $a.addClass('lg-vegyes-item')
                      .attr('href', origSrc)
                      .attr('data-src', origSrc)
                      .attr('data-sub-html', captionHtml)
                      .on('click', function(e) {
                          e.preventDefault();
                      });
                }
            });
 
            // 3. Inicializálás
            lightGallery($container[0], {
                selector: '.lg-vegyes-item',
                licenseKey: '0000-0000-000-0000',
                thumbnail: true,
                animateThumb: true,
                showThumbByDefault: true
            });
        });
    }
})();
 
/**
* ============================================================================
* KIEGÉSZÍTŐIKONOK ÉS STÍLUSLAPOK BETÖLTÉSE
* ============================================================================
*/
var link = document.createElement("link");
link.rel = "stylesheet";
link.href = "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css";
document.head.appendChild(link);
 
/**
* ============================================================================
* JOGOSULTSÁGKEZELÉS (Fülek elrejtése anonim felhasználóknak)
* ============================================================================
*/
if (mw.config.get('wgUserName') === null) {
    var hideTabs = function () {
        var el1 = document.querySelector('#ca-history');
        var el2 = document.querySelector('#ca-viewsource');
        if (el1) el1.style.display = 'none';
        if (el2) el2.style.display = 'none';
 
        if (el1 || el2) clearInterval(observer);
    };
    var observer = setInterval(hideTabs, 100);
}
}


/* A MediaWiki saját rendező nyilainak elrejtése, ha ütközne */
/**
table.datatable-hook th.headerSort {
* ============================================================================
  background-image: none !important;
* KÜLSŐ LINK VISLEKEDÉS (Új lapon nyíló külső hivatkozások)
}
* ============================================================================
*/
$(function () {
    $('a.external').attr('target', '_blank');
});
 
/**
* ============================================================================
* NAVIGÁCIÓS GOMBOK (Tetejére és Vissza gomb logikája)
* ============================================================================
*/
$(function() {
    // Tetejére gomb létrehozása
    var $btn = $('<button/>', {
        html: '<i class="bi bi-arrow-up-square"></i> Tetejére',
        id: 'backToTopBtn',
        title: 'Az oldal tetejére',
        css: {
            position: 'fixed',
            bottom: '20px',
            right: '20px',
            padding: '10px 15px',
            'font-size': '14px',
            'background-color': '#888446ff',
            color: 'white',
            border: 'none',
            'border-radius': '10px',
            cursor: 'pointer',
            display: 'none',
            width: '100px',
            'z-index': 1000
        },
        click: function() {
            window.scrollTo({top: 0, behavior: 'smooth'});
        }
    });
 
    // Vissza gomb létrehozása
    var $backBtn = $('<button/>', {
        html: '<i class="bi bi-arrow-left-square"></i> Vissza',
        id: 'backBtn',
        title: 'Előző oldal',
        css: {
            position: 'fixed',
            bottom: '60px',
            right: '20px',
            padding: '10px 15px',
            'font-size': '14px',
            'background-color': '#547454ff',
            color: 'white',
            border: 'none',
            'border-radius': '10px',
            cursor: 'pointer',
            display: 'none',
            width: '100px',
            'z-index': 1000
        },
        click: function() {
            window.history.back();
        }
    });
 
    $('body').append($btn).append($backBtn);
 
    // Gombok láthatóságának kezelése görgetéskor
    $(window).scroll(function() {
        if ($(window).scrollTop() > 100) {
            $btn.fadeIn();
            $backBtn.fadeIn();
        } else {
            $btn.fadeOut();
            $backBtn.fadeOut();
        }
    });
});
 
/**
* ============================================================================
* TAXOBOX ÉS RENDSZERTANI LINKEK KEZELÉSE
* ============================================================================
*/
$(document).ready(function() {
    $('.taxobox-icons a').attr('target', '_blank');
});
 
/**
* ============================================================================
* DATATABLES INTEGRÁCIÓ (Javított táblázatkezelés)
* ============================================================================
*/
mw.loader.using( ['jquery', 'mediawiki.util'] ).done( function () {
    if ( $( '.datatable-hook' ).length > 0 ) {
        $.getScript( 'https://cdn.datatables.net/2.1.8/js/dataTables.min.js' )
            .done( function() {
                $( '.datatable-hook' ).each( function() {
                    var $table = $(this);
                    var $headerRow = $table.find( 'tr:has(th)' ).first();
 
                    if ( $headerRow.length > 0 ) {
                        var $thead = $( '<thead></thead>' );
                        $headerRow.detach().appendTo( $thead );
                        $table.prepend( $thead );
                    }
 
                    $table.DataTable({
                        language: {
                            url: '//cdn.datatables.net/plug-ins/2.1.8/i18n/hu.json'
                        },
                        layout: {
                            topStart: 'pageLength',
                            topEnd: 'search',
                            bottomStart: 'info',
                            bottomEnd: 'paging'
                        },
                        pageLength: 10,
                        columnDefs: [ { targets: '_all', defaultContent: '' } ]
                    });
                });
            })
            .fail( function() {
                console.error( 'Hiba: Nem sikerült betölteni a DataTables szkriptet.' );
            });
    }
});
 
/**
* ============================================================================
* SZUKKULENS NÖVÉNYHATÁROZÓ KULCSOK LOGIKÁJA
* ============================================================================
*/
mw.hook('wikipage.content').add(function () {
    const aktualisKategoriak = mw.config.get('wgCategories') || [];
    if (!aktualisKategoriak.includes('Szukkulens növényhatározó kulcsok')) {
        return;
    }
 
    const regexKoztespont = /^Szukkulens határozó:/;
    const bodyContent = document.getElementById('bodyContent');
    if (!bodyContent) return;
 
    // Köztes határozó oldalak linkjei
    bodyContent.querySelectorAll('a').forEach(a => {
        const teljesNev = a.getAttribute('title') || '';
 
        if (regexKoztespont.test(teljesNev)) {
            let tisztaGombSzöveg = teljesNev.replace(/\s*\(a lap nem létezik\)$/, '');
            a.innerHTML = '';
 
            const arrowSpan = document.createElement('span');
            arrowSpan.className = 'arrow-prefix';
            arrowSpan.textContent = '→';
 
            const spaceNode = document.createTextNode(' ');
            const textNode = document.createTextNode(tisztaGombSzöveg);
 
            a.appendChild(arrowSpan);
            a.appendChild(spaceNode);
            a.appendChild(textNode);
 
            a.className = "new hatarozo-koztespont-btn";
 
            let previousNode = a.previousSibling;
            if (previousNode && previousNode.nodeType === Node.TEXT_NODE) {
                previousNode.textContent = previousNode.textContent.replace(/[→\s\xA0&rarr;]+$/, '');
            }
        }
    });
 
    // Határozó kulcs valódi végpontjai
    bodyContent.querySelectorAll('li').forEach(li => {
        const bendoLinkek = li.querySelectorAll('a[href*="/wiki/"]:not(.external)');
 
        bendoLinkek.forEach(link => {
            const title = link.getAttribute('title') || '';
 
            if (regexKoztespont.test(title) || link.classList.contains('hatarozo-koztespont-btn')) {
                return;
            }
 
            let vizsgaltNode = link.previousSibling;
            if (link.parentElement.tagName.toLowerCase() === 'i') {
                vizsgaltNode = link.parentElement.previousSibling;
            }


/* Keresőmező stílusának igazítása a MediaWiki beviteli mezőihez */
            let elotteLevoSzo = "";
.dt-search input {
            if (vizsgaltNode && vizsgaltNode.nodeType === Node.TEXT_NODE) {
  border: 1px solid #a2a9b1 !important;
                elotteLevoSzo = vizsgaltNode.textContent;
  border-radius: 2px;
            }
  padding: 4px;
}


/* Közös CSS az összes felületnek */
            if (!elotteLevoSzo.includes('Pl.') && !elotteLevoSzo.includes('(')) {
/* Anonim felhasználóknál rejtsük el a felesleges füleket */
                if (!link.classList.contains('hatarozo-vegpont-btn')) {
body.anonymous #ca-history,
                    const tisztaFajnev = link.textContent.replace(/^[→\s\xA0]+/, '').replace(/[→\s\xA0]+$/, '').trim() || title;
body.anonymous #ca-viewsource {
  display: none !important;
}


/* Csak a kategóriaoldalak elsődleges címe (namespace + kettőspont) elrejtése */
                    link.innerHTML = `<span class="arrow-prefix">→ </span><span class="botanical-name">${tisztaFajnev}</span>`;
.mw-page-title-namespace,
                    link.classList.add("hatarozo-vegpont-btn");
.mw-page-title-separator {
  display: none;
}


@media screen {
                    if (link.parentElement.tagName.toLowerCase() === 'i') {
  .mw-body header h1.firstHeading {
                        link.parentElement.style.fontStyle = "normal";
    padding-bottom: 3px;
                    }
  }
                }
  .mw-body header h1.firstHeading span {
    background-color: beige;
    border-top-right-radius: 6px;
    border-top-left-radius: 6px;
    color: #436d38;
    padding: 0px 10px 0 10px;
  }
  .mw-body header .vector-page-titlebar::after {
    height: 3px;
    background-color: #436d38;
  }
  .mw-body .mw-body-content div.tn li {
    line-height: 1.8em;
    margin-bottom: 10px;
  }
  .mw-body .mw-body-content div.tn li span.tnb b {
    border-radius: 10px;
    color: black;
    font-size: 110%;
    padding: 2px 5px;
  }
  .mw-body .mw-body-content div.tn li span.tnb-acc b {
    background: #ccffcc;
  }
  .mw-body .mw-body-content div.tn li span.tnb-syn b {
    background: #ffebcc;
  }
  .mw-body .mw-body-content div.tn li span.tnb-unres b {
    background: #ffcccc;
  }
  .mw-body .mw-body-content div.tn li span.tnb-hyb b {
    background: #f2e6d9;
  }
  .mw-body .mw-body-content div.tn li span.tns {
    border-radius: 10px;
    color: white;
    font-size: 90%;
    font-weight: bold;
    padding: 2px 5px;
  }
  .mw-body .mw-body-content div.tn li span.tns-acc {
    background: green;
  }
  .mw-body .mw-body-content div.tn li span.tns-syn {
    background: orange;
  }
  .mw-body .mw-body-content div.tn li span.tns-unres {
    background: red;
  }
  .mw-body .mw-body-content div.tn li span.tns-hyb {
    background: brown;
  }
  .mw-body .mw-body-content div.tn li span.sec {
    background: #ccf5ff;
    color: black;
    padding: 0 3px;
  }
  .mw-body .mw-body-content .mw-heading h1, .mw-body .mw-body-content .mw-heading h2, .mw-body .mw-body-content .mw-heading h3, .mw-body .mw-body-content .mw-heading h4, .mw-body .mw-body-content .mw-heading h5, .mw-body .mw-body-content .mw-heading h6 {
    color: #274f1c;
  }
  .mw-body .mw-body-content .mw-heading h3, .mw-body .mw-body-content .mw-heading h4 {
    text-decoration-line: underline;
  }
  .mw-body .mw-body-content .mw-heading2 h2 {
    background-color: rgb(250, 250, 239);
    padding: 0px 5px;
  }
  .mw-body .mw-body-content .mw-heading2 {
    border-bottom: 1px solid #436d38;
  }
  .mw-body .mw-body-content ul span.syn {
    background: beige;
    border-radius: 10px;
    padding-left: 5px;
    padding-right: 5px;
  }
  .mw-body .mw-body-content ul span.syn a {
    color: #436d38; /* A fejlécben is használt zölded */
    text-decoration: none;
  }
  .mw-body .mw-body-content ul span.syn a:hover {
    text-decoration: underline;
  }
  .mw-body .mw-body-content img {
    vertical-align: middle;
    float: left;
    padding-right: 10px;
    padding-bottom: 10px;
  }
  .mw-body .mw-body-content .hatarozo-koztespont-btn {
    display: inline-block;
    background-color: #e7e7c9 !important;
    color: #274f1c !important;
    font-weight: bold !important;
    padding: 3px 6px;
    margin: 2px;
    text-decoration: none !important;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  }
  .mw-body .mw-body-content {
    /* JAVÍTVA: Kényszerített stílusok a hover állapothoz */
  }
  .mw-body .mw-body-content .hatarozo-koztespont-btn:hover {
    background-color: #c0c078 !important;
    color: #1b3813 !important; /* Kicsit sötétebb szöveg hoverkor */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    text-decoration: none !important;
  }
  .mw-body .mw-body-content .hatarozo-vegpont-btn {
    display: inline-block;
    background-color: #d7e7c9 !important;
    color: #274f1c !important;
    font-weight: bold !important;
    padding: 3px 6px;
    margin: 2px;
    text-decoration: none !important;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  }
  .mw-body .mw-body-content {
    /* JAVÍTVA: Kényszerített stílusok a hover állapothoz */
  }
  .mw-body .mw-body-content .hatarozo-vegpont-btn:hover {
    background-color: #9ab385 !important;
    color: #1b3813 !important; /* Kicsit sötétebb szöveg hoverkor */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    text-decoration: none !important;
  }
  .mw-body .mw-body-content {
    /* Biztosítjuk, hogy a gombban lévő nyíl egyenes maradjon */
  }
  .mw-body .mw-body-content .hatarozo-vegpont-btn .arrow-prefix {
    font-style: normal !important;
    margin-right: 5px;
  }
  .mw-body .mw-body-content {
    /* Csak a fajnév lesz dőlt a gombon belül */
  }
  .mw-body .mw-body-content .hatarozo-vegpont-btn .botanical-name {
    font-style: italic !important;
  }
  .mw-body .mw-body-content {
    /* Első szint: Sima számok */
  }
  .mw-body .mw-body-content ol {
    list-style-type: decimal;
  }
  .mw-body .mw-body-content ol > li::marker {
    font-weight: bold;
    color: #009933; /* Sötétzöld szín */
  }
  .mw-body .mw-body-content {
    /* Második szint: nagybetűs ábécé */
  }
  .mw-body .mw-body-content ol li > ol {
    list-style-type: upper-alpha;
  }
  .mw-body .mw-body-content ol li > ol > li::marker {
    font-weight: bold;
    color: #99cc00; /* szín az alpontoknak */
  }
  .mw-body .mw-body-content {
    /* Harmadik szint: kis római számok */
  }
  .mw-body .mw-body-content ol li > ol li > ol {
    list-style-type: upper-roman;
  }
  .mw-body .mw-body-content ol li > ol li > ol > li::marker {
    font-weight: bold;
    color: #009999; /* szín a harmadik szintnek */
  }
  .mw-body .mw-body-content {
    /* Negyedik szint: kisbetű */
  }
  .mw-body .mw-body-content ol li > ol li > ol li > ol {
    list-style-type: lower-alpha;
  }
  .mw-body .mw-body-content ol li > ol li > ol li > ol > li::marker {
    font-weight: bold;
    color: #cc9900; /* szín a 4. szintnek */
  }
  .mw-body .mw-body-content {
    /* 5 szint */
  }
  .mw-body .mw-body-content ol li > ol li > ol li > ol li > ol {
    list-style-type: lower-roman;
  }
  .mw-body .mw-body-content ol li > ol li > ol li > ol li > ol > li::marker {
    font-weight: bold;
    color: #b1551f; /* szín a 5. szintnek */
  }
  .mw-body .mw-body-content {
    /* 6 szint */
  }
  .mw-body .mw-body-content ol li > ol li > ol li > ol li > ol li > ol {
    list-style-type: decimal;
  }
  .mw-body .mw-body-content ol li > ol li > ol li > ol li > ol li > ol > li::marker {
    font-weight: bold;
    color: #1f7bb1; /* szín a 6. szintnek */
  }
  .mw-body .mw-body-content {
    /* 7 szint */
  }
  .mw-body .mw-body-content ol li > ol li > ol li > ol li > ol li > ol li > ol {
    list-style-type: upper-alpha;
  }
  .mw-body .mw-body-content ol li > ol li > ol li > ol li > ol li > ol li > ol > li::marker {
    font-weight: bold;
    color: #831fb1; /* szín a 7. szintnek */
  }
  .mw-body .mw-body-content {
    /* 8 szint */
  }
  .mw-body .mw-body-content ol li > ol li > ol li > ol li > ol li > ol li > ol li > ol {
    list-style-type: upper-roman;
  }
  .mw-body .mw-body-content ol li > ol li > ol li > ol li > ol li > ol li > ol li > ol > li::marker {
    font-weight: bold;
    color: #7a9c3a; /* szín a 8. szintnek */
  }
  .mw-body .mw-body-content {
    /* 9 szint */
  }
  .mw-body .mw-body-content ol li > ol li > ol li > ol li > ol li > ol li > ol li > ol li > ol {
    list-style-type: upper-greek;
  }
  .mw-body .mw-body-content ol li > ol li > ol li > ol li > ol li > ol li > ol li > ol li > ol > li::marker {
    font-weight: bold;
    color: #9c3a3a; /* szín a 9. szintnek */
  }
  .mw-body .mw-body-content {
    /* 10 szint */
  }
  .mw-body .mw-body-content ol li > ol li > ol li > ol li > ol li > ol li > ol li > ol li > ol li > ol {
    list-style-type: lower-greek;
  }
  .mw-body .mw-body-content ol li > ol li > ol li > ol li > ol li > ol li > ol li > ol li > ol li > ol > li::marker {
    font-weight: bold;
    color: #104ac7; /* szín a 10. szintnek */
  }
  .mw-body .mw-body-content .wiki-dynamic-gallery {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end; /* Így az aljuk lesz egy vonalban */
    gap: 10px;
    margin: 15px 0;
  }
  .mw-body .mw-body-content .wiki-dynamic-gallery a {
    display: block;
    height: 210px; /* Fix magasság */
    background: #f0f0f0; /* Betöltődés alatti szín */
    border-radius: 8px;
  }
  .mw-body .mw-body-content .wiki-dynamic-gallery a img {
    height: 200px;
    display: block;
    object-fit: contain;
    padding: 0;
    width: auto; /* A szélesség alkalmazkodik az arányokhoz */
  }
  .mw-body .mw-body-content .egyedi-galeria-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin: 20px 0;
    width: 100%;
  }
  .mw-body .mw-body-content .egyedi-galeria-container .galeria-elem {
    background: #f8f9fa !important;
    border: 1px solid #c8ccd1 !important;
    border-radius: 6px !important;
    padding: 10px !important;
    margin: 0 !important;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.08) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    float: none !important;
    min-height: 220px !important;
  }
  .mw-body .mw-body-content .egyedi-galeria-container .galeria-elem:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
  }
  .mw-body .mw-body-content .egyedi-galeria-container .galeria-elem figure[typeof*="mw:File/Thumb"],
  .mw-body .mw-body-content .egyedi-galeria-container .galeria-elem figure {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    float: none !important;
    overflow: visible !important;
  }
  .mw-body .mw-body-content .egyedi-galeria-container .galeria-elem figure[typeof*="mw:File/Thumb"] a.mw-file-description,
  .mw-body .mw-body-content .egyedi-galeria-container .galeria-elem figure a.mw-file-description {
    display: block !important;
    width: auto !important;
    height: 160px !important;
    cursor: pointer !important;
    margin-bottom: 8px !important;
  }
  .mw-body .mw-body-content .egyedi-galeria-container .galeria-elem figure[typeof*="mw:File/Thumb"] img.mw-file-element,
  .mw-body .mw-body-content .egyedi-galeria-container .galeria-elem figure img.mw-file-element {
    width: auto !important;
    max-width: 100% !important;
    height: 160px !important;
    max-height: 160px !important;
    object-fit: contain !important;
    border-radius: 4px !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
  }
  .mw-body .mw-body-content .egyedi-galeria-container .galeria-elem figure[typeof*="mw:File/Thumb"] figcaption,
  .mw-body .mw-body-content .egyedi-galeria-container .galeria-elem figure figcaption {
    display: block !important;
    border: none !important;
    font-size: 0.85em !important;
    color: #202122 !important;
    text-align: center !important;
    line-height: 1.3 !important;
    padding: 5px 0 0 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  .mw-body .mw-body-content .egyedi-galeria-container .galeria-elem .kulso-url-doboz {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .mw-body .mw-body-content .egyedi-galeria-container .galeria-elem .kulso-url-doboz .lg-vegyes-item {
    display: block;
    width: auto;
    height: 160px;
    cursor: pointer;
    margin-bottom: 8px;
  }
  .mw-body .mw-body-content .egyedi-galeria-container .galeria-elem .kulso-url-doboz .url-kep {
    max-width: 100%;
    height: 160px;
    max-height: 160px;
    width: auto;
    display: block;
    object-fit: contain;
    border-radius: 4px;
    padding: 0;
    margin: 0;
    float: none;
  }
  .mw-body .mw-body-content .egyedi-galeria-container .galeria-elem .galeria-felirat {
    display: block !important;
    font-size: 0.85em;
    color: #202122;
    text-align: center;
    line-height: 1.3;
    padding-top: 5px;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
  }
  .mw-body .mw-body-content .egyedi-galeria-container .galeria-elem .url-link-szoveg {
    font-size: 0.8em;
    color: #72777d;
    padding: 40px 10px;
    text-align: center;
    font-style: italic;
  }
  .mw-body table.datatable-hook {
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #ebebe0 !important;
    border-radius: 6px;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
    color: grey;
  }
  .mw-body table.dataTable > thead > tr th {
    background-color: #eaeadd;
    border-width: 0px;
  }
  .mw-body table.dataTable > thead > tr th:first-child {
    border-top-left-radius: 6px;
  }
  .mw-body table.dataTable > thead > tr th:last-child {
    border-top-right-radius: 6px;
  }
  .mw-body .wikitable {
    background-color: #fffff9;
  }
  .mw-body .wikitable tr.accepted {
    background-color: #dcecd7;
  }
  .mw-body .wikitable > * > tr > td {
    border-color: beige;
    border-width: 1px;
  }
  .mw-body div.dt-container.dt-empty-footer tbody > tr:last-child > * {
    border-bottom-width: 0px;
  }
  .mw-body table.infobox.biota {
    background-color: #f8f9fa;
    border: 1px solid #ebebe0;
    border-radius: 6px;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
    clear: right;
    color: black;
    float: right;
    margin: 0.5em 0 0.5em 1.4em;
    padding: 10px 2px;
    text-align: center;
    width: 22em;
  }
  .mw-body table.infobox.biota.acc th {
    background-color: #e6ffee;
  }
  .mw-body table.infobox.biota.acc th.taxonnev {
    background-color: green;
    color: white;
  }
  .mw-body table.infobox.biota.syn th {
    background-color: #fff5e6;
  }
  .mw-body table.infobox.biota.syn th.taxonnev {
    background-color: orange;
    color: black;
  }
  .mw-body table.infobox.biota.unres th {
    background-color: #ffe6e6;
  }
  .mw-body table.infobox.biota.unres th.taxonnev {
    background-color: red;
    color: white;
  }
  .mw-body table.infobox.biota.hyb th {
    background-color: #f9f2ec;
  }
  .mw-body table.infobox.biota.hyb th.taxonnev {
    background-color: brown;
    color: white;
  }
  .mw-body table.infobox.biota th.taxonnev {
    font-size: 110%;
  }
  .mw-body table.infobox.biota th.suha-svg {
    padding: 10px 0 !important;
  }
  .mw-body table.infobox.biota th.taxobox-icons {
    /* Csak a taxobox keresőikonjaira vonatkozó stílus eleje */
    /* Eltávolítjuk az alapértelmezett belső margókat a celláról */
    background-color: #ebebe0;
    padding: 10px 0 !important;
  }
  .mw-body table.infobox.biota th.taxobox-icons a {
    /* Minden linkre (a-tag), ami a taxobox-icons cellában van */
    margin: 0 5px !important;
    display: inline-block;
    vertical-align: middle;
    text-decoration: none !important; /* Eltünteti az esetleges aláhúzást */
  }
  .mw-body table.infobox.biota th.taxobox-icons .external {
    /* Opcionális: a külső link ikon elrejtése, ha zavarja a logót */
    background-image: none !important;
    padding-right: 0 !important;
  }
  .mw-body table.infobox.biota th.taxobox-icons img {
    /* Biztosítjuk, hogy a kép ne lógjon ki */
    display: block;
    float: none;
    opacity: 0.7;
  }
  .mw-body table.infobox.biota th.taxobox-icons img:hover {
    /* Ha szeretnél egy kis hover effektet (elhalkul/erősödik ha rámutatsz) */
    opacity: 1;
    transition: opacity 0.2s;
  }
  .mw-body table.infobox.biota th.taxobox-icons {
    /* Csak a taxobox keresőikonjaira vonatkozó stílus vége */
  }
  .mw-body table.infobox.biota th img {
    float: none;
  }
  .mw-body table.infobox.biota.ember th img {
    width: 340px;
  }
  .mw-body table.infobox.biota td {
    padding: 4px 2px;
  }
  .mw-body table.infobox.biota td.left {
    background-color: lightgray;
    font-size: 90%;
    line-height: 95%;
    padding-right: 4px;
    text-align: right;
    width: 105px;
  }
  .mw-body table.infobox.biota td.right {
    font-size: 95%;
    line-height: 95%;
    text-align: left;
  }
  .mw-body table.infobox.biota caption {
    background-color: #afe1af;
    text-align: center;
  }
  .mw-body .catlinks {
    background-color: #f8f9fa;
    border: 1px solid #ebebe0;
    border-radius: 6px;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
    color: grey;
    display: block !important;
    overflow: hidden;
  }
  .vector-column-start .vector-main-menu-container,
  .vector-column-start .vector-sticky-pinned-container {
    margin-bottom: 10px;
    margin-left: 0;
  }
  .vector-column-start .vector-main-menu-container nav#mw-panel .vector-pinned-container,
  .vector-column-start .vector-sticky-pinned-container nav#mw-panel .vector-pinned-container {
    background-image: url(https://wiki.kaktuszgyujtok.hu/images/d/d5/Epicactus.png);
    background-repeat: no-repeat;
    background-position-x: right;
  }
  .vector-column-start .vector-main-menu-container nav#mw-panel,
  .vector-column-start .vector-main-menu-container nav#mw-panel-toc,
  .vector-column-start .vector-sticky-pinned-container nav#mw-panel,
  .vector-column-start .vector-sticky-pinned-container nav#mw-panel-toc {
    border: 1px solid #ebebe0;
    border-radius: 6px;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
    color: grey;
    display: block !important;
    overflow: hidden;
  }
  .vector-column-start .vector-main-menu-container nav#mw-panel .vector-pinned-container,
  .vector-column-start .vector-main-menu-container nav#mw-panel-toc .vector-pinned-container,
  .vector-column-start .vector-sticky-pinned-container nav#mw-panel .vector-pinned-container,
  .vector-column-start .vector-sticky-pinned-container nav#mw-panel-toc .vector-pinned-container {
    background-color: #fffff9;
    margin-bottom: 0;
    padding-bottom: 5px;
  }
  html, body {
    font-family: sans-serif;
    height: 100%;
  }
  body {
    background-color: var(--background-color-neutral-subtle, #f8f9fa);
    color: var(--color-base, #202122);
    margin: 0;
  }
  html.vector-feature-custom-font-size-clientpref--excluded,
  .vector-feature-custom-font-size-clientpref--excluded,
  html.vector-feature-custom-font-size-clientpref-0,
  .no-font-mode-scale,
  .mw-body-content .cdx-message {
    --font-size-medium: 1rem;
    --line-height-medium: 1.5714285;
    --line-height-content: 1.5714285;
  }
  .vector-feature-custom-font-size-clientpref--excluded,
  .vector-feature-custom-font-size-clientpref-0,
  .mw-body-content .cdx-message {
    --font-size-medium: 1rem;
    --line-height-medium: 1.6;
  }
  .mw-content-ltr figure[typeof~="mw:File/Thumb"],
  .mw-content-ltr figure[typeof~="mw:File/Frame"],
  .mw-content-ltr figure[typeof~="mw:File"].mw-halign-right {
    background-color: #f8f9fa;
    border: 1px solid #ebebe0;
    border-radius: 6px;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
    color: grey;
    display: block !important;
    margin: 0.5em 0 0.5em 1.4em;
    overflow: hidden;
  }
  .mw-content-ltr figure[typeof~="mw:File/Thumb"] > figcaption,
  .mw-content-ltr figure[typeof~="mw:File/Frame"] > figcaption {
    border: 0px solid #a2a9b1;
    display: block !important;
    font-size: 85%;
    max-width: 334px;
    text-align: center;
  }
  body.skin--responsive .mw-parser-output figure img.mw-file-element {
    width: 340px;
    height: auto;
    max-width: 100%;
  }
}


/*# sourceMappingURL=gyz.css.map */
                if (vizsgaltNode && vizsgaltNode.nodeType === Node.TEXT_NODE) {
                    vizsgaltNode.textContent = vizsgaltNode.textContent.replace(/[→\s\xA0&rarr;]+$/, '');
                }
            }
        });
    });
});

A lap 2026. június 14., 23:58-kori változata

/**
 * ============================================================================
 * LIGHTGALLERY GLOBÁLIS INTEGRÁCIÓ (Régi dynamic és új vegyes galéria)
 * ============================================================================
 */
(function() {
    // 1. LÉPÉS: Ellenőrizzük, hogy BÁRMELYIK galéria típus létezik-e az oldalon. Ha egyik sincs, csak akkor állunk le.
    if ($('.wiki-dynamic-gallery').length === 0 && $('.egyedi-galeria-container').length === 0) return;

    // Erőforrások betöltése mw.loader-rel (Csak egyszer fut le az oldalon)
    mw.loader.addStyleTag('@import "https://cdn.jsdelivr.net/npm/lightgallery@2.4.0/css/lightgallery-bundle.min.css";');

    // LightGallery mag betöltése
    $.getScript('https://cdn.jsdelivr.net/npm/lightgallery@2.4.0/lightgallery.umd.min.js')
        .done(function() {
            console.log('LightGallery 2.4.0 sikeresen betöltve.');

            // Ha a régi típusú galéria van az oldalon, elindítjuk
            if ($('.wiki-dynamic-gallery').length > 0) {
                initWikiDynamicGallery();
            }

            // Ha az új típusú vegyes galéria van az oldalon, elindítjuk
            if ($('.egyedi-galeria-container').length > 0) {
                initMindenGaleriaElem();
            }
        });

    // --- RÉGI WIKI DYNAMIC GALLERY LOGIKA ---
    function initWikiDynamicGallery() {
        $('.wiki-dynamic-gallery').each(function() {
            var $container = $(this);
            if ($container.data('initialized')) return;
            $container.data('initialized', true);

            var searchTerm = $container.data('search');
            var limit = $container.data('limit') || 3;
            var targetHeight = 200;

            var apiUrl = "https://commons.wikimedia.org/w/api.php?action=query&format=json&generator=search&gsrsearch=File:" +
                         encodeURIComponent(searchTerm) + "&gsrlimit=" + limit +
                         "&prop=imageinfo&iiprop=url|size&iiurlheight=" + targetHeight + "&origin=*";

            $.getJSON(apiUrl, function(data) {
                if (data && data.query && data.query.pages) {
                    var pages = data.query.pages;
                    var galleryHtml = '';

                    for (var id in pages) {
                        if (!pages[id].imageinfo) continue;
                        var img = pages[id].imageinfo[0];
                        var title = pages[id].title.replace('File:', '');

                        galleryHtml += '<a href="' + img.url + '" class="lg-item" data-src="' + img.url + '" data-sub-html="<h4>' + title + '</h4>">';
                        galleryHtml += '  <img src="' + img.thumburl + '" style="height:' + targetHeight + 'px; width:auto; margin:5px; border-radius:6px; cursor:pointer;" alt="' + title + '" />';
                        galleryHtml += '</a>';
                    }
                    $container.html(galleryHtml);

                    if (window.lightGallery) {
                        lightGallery($container[0], {
                            selector: '.lg-item',
                            licenseKey: '0000-0000-000-0000'
                        });
                    }
                }
            });
        });
    }

// --- ÚJ VEGYES GALÉRIA LOGIKA ---
    function initMindenGaleriaElem() {
        $('.egyedi-galeria-container').each(function() {
            var $container = $(this);
            if ($container.data('vegyes-initialized')) return;
            $container.data('vegyes-initialized', true);

            // 1. Külső URL és Commons képek feliratának kezelése
            $container.find('.kulso-url-doboz').each(function() {
                var $doboz = $(this);
                var imgUrl = $doboz.attr('data-src');

                // Megkeressük a feliratot, ha üres, megpróbálunk a URL végéből valami értelmeset kivágni
                var $feliratElem = $doboz.find('.galeria-felirat');
                var felirat = $feliratElem.text().trim();
                if (!felirat) {
                    // Ha nincs felirat, a fájlnévből csinálunk egyet (pl. IMG_20240828_150500)
                    var fileTitle = imgUrl.substring(imgUrl.lastIndexOf('/') + 1).split('.')[0];
                    felirat = decodeURIComponent(fileTitle).replace(/_/g, ' ');
                    $feliratElem.text(felirat); // Beírjuk a HTML-be is, hogy látsszon a kép alatt!
                }

                var $lgItem = $('<a>', {
                    'href': imgUrl,
                    'class': 'lg-vegyes-item',
                    'data-src': imgUrl,
                    'data-sub-html': '<h4>' + felirat + '</h4>'
                });

                $('<img>', {
                    'src': imgUrl,
                    'class': 'galeria-kep url-kep',
                    'alt': felirat
                }).appendTo($lgItem);

                $doboz.prepend($lgItem);
                $doboz.find('.url-link-szoveg').remove();
            });

            // 2. Belső MediaWiki <figure> képek feliratának kényszerítése
            $container.find('figure').each(function() {
                var $figure = $(this);
                var $a = $figure.find('a.mw-file-description');
                var $img = $figure.find('img.mw-file-element');

                if ($a.length > 0 && $img.length > 0) {
                    var imgSrc = $img.attr('src');
                    var origSrc = imgSrc;

                    if (imgSrc.indexOf('/thumb/') !== -1) {
                        origSrc = imgSrc.replace('/thumb/', '/').substring(0, imgSrc.replace('/thumb/', '/').lastIndexOf('/'));
                    }

                    // Felirat kinyerése
                    var $figcaption = $figure.find('figcaption');
                    var felirat = $figcaption.text().trim();

                    // HA ÜRES A FIGCAPTION: Kivágjuk a Fájl: nevet a linkből dekorációnak
                    if (!felirat) {
                        var hrefAttr = $a.attr('href') || ''; // pl. /wiki/Fájl:Lithops_dinterii_1.jpg
                        var rawTitle = hrefAttr.substring(hrefAttr.lastIndexOf(':') + 1).split('.')[0];
                        felirat = decodeURIComponent(rawTitle).replace(/_/g, ' ');
                        $figcaption.text(felirat); // Kényszerítve beírjuk a kép alá!
                    }

                    var captionHtml = '<h4>' + felirat + '</h4>';

                    $a.addClass('lg-vegyes-item')
                      .attr('href', origSrc)
                      .attr('data-src', origSrc)
                      .attr('data-sub-html', captionHtml)
                      .on('click', function(e) {
                          e.preventDefault();
                      });
                }
            });

            // 3. Inicializálás
            lightGallery($container[0], {
                selector: '.lg-vegyes-item',
                licenseKey: '0000-0000-000-0000',
                thumbnail: true,
                animateThumb: true,
                showThumbByDefault: true
            });
        });
    }
})();

/**
 * ============================================================================
 * KIEGÉSZÍTŐIKONOK ÉS STÍLUSLAPOK BETÖLTÉSE
 * ============================================================================
 */
var link = document.createElement("link");
link.rel = "stylesheet";
link.href = "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css";
document.head.appendChild(link);

/**
 * ============================================================================
 * JOGOSULTSÁGKEZELÉS (Fülek elrejtése anonim felhasználóknak)
 * ============================================================================
 */
if (mw.config.get('wgUserName') === null) {
    var hideTabs = function () {
        var el1 = document.querySelector('#ca-history');
        var el2 = document.querySelector('#ca-viewsource');
        if (el1) el1.style.display = 'none';
        if (el2) el2.style.display = 'none';

        if (el1 || el2) clearInterval(observer);
    };
    var observer = setInterval(hideTabs, 100);
}

/**
 * ============================================================================
 * KÜLSŐ LINK VISLEKEDÉS (Új lapon nyíló külső hivatkozások)
 * ============================================================================
 */
$(function () {
    $('a.external').attr('target', '_blank');
});

/**
 * ============================================================================
 * NAVIGÁCIÓS GOMBOK (Tetejére és Vissza gomb logikája)
 * ============================================================================
 */
$(function() {
    // Tetejére gomb létrehozása
    var $btn = $('<button/>', {
        html: '<i class="bi bi-arrow-up-square"></i> Tetejére',
        id: 'backToTopBtn',
        title: 'Az oldal tetejére',
        css: {
            position: 'fixed',
            bottom: '20px',
            right: '20px',
            padding: '10px 15px',
            'font-size': '14px',
            'background-color': '#888446ff',
            color: 'white',
            border: 'none',
            'border-radius': '10px',
            cursor: 'pointer',
            display: 'none',
            width: '100px',
            'z-index': 1000
        },
        click: function() {
            window.scrollTo({top: 0, behavior: 'smooth'});
        }
    });

    // Vissza gomb létrehozása
    var $backBtn = $('<button/>', {
        html: '<i class="bi bi-arrow-left-square"></i> Vissza',
        id: 'backBtn',
        title: 'Előző oldal',
        css: {
            position: 'fixed',
            bottom: '60px',
            right: '20px',
            padding: '10px 15px',
            'font-size': '14px',
            'background-color': '#547454ff',
            color: 'white',
            border: 'none',
            'border-radius': '10px',
            cursor: 'pointer',
            display: 'none',
            width: '100px',
            'z-index': 1000
        },
        click: function() {
            window.history.back();
        }
    });

    $('body').append($btn).append($backBtn);

    // Gombok láthatóságának kezelése görgetéskor
    $(window).scroll(function() {
        if ($(window).scrollTop() > 100) {
            $btn.fadeIn();
            $backBtn.fadeIn();
        } else {
            $btn.fadeOut();
            $backBtn.fadeOut();
        }
    });
});

/**
 * ============================================================================
 * TAXOBOX ÉS RENDSZERTANI LINKEK KEZELÉSE
 * ============================================================================
 */
$(document).ready(function() {
    $('.taxobox-icons a').attr('target', '_blank');
});

/**
 * ============================================================================
 * DATATABLES INTEGRÁCIÓ (Javított táblázatkezelés)
 * ============================================================================
 */
mw.loader.using( ['jquery', 'mediawiki.util'] ).done( function () {
    if ( $( '.datatable-hook' ).length > 0 ) {
        $.getScript( 'https://cdn.datatables.net/2.1.8/js/dataTables.min.js' )
            .done( function() {
                $( '.datatable-hook' ).each( function() {
                    var $table = $(this);
                    var $headerRow = $table.find( 'tr:has(th)' ).first();

                    if ( $headerRow.length > 0 ) {
                        var $thead = $( '<thead></thead>' );
                        $headerRow.detach().appendTo( $thead );
                        $table.prepend( $thead );
                    }

                    $table.DataTable({
                        language: {
                            url: '//cdn.datatables.net/plug-ins/2.1.8/i18n/hu.json'
                        },
                        layout: {
                            topStart: 'pageLength',
                            topEnd: 'search',
                            bottomStart: 'info',
                            bottomEnd: 'paging'
                        },
                        pageLength: 10,
                        columnDefs: [ { targets: '_all', defaultContent: '' } ]
                    });
                });
            })
            .fail( function() {
                console.error( 'Hiba: Nem sikerült betölteni a DataTables szkriptet.' );
            });
    }
});

/**
 * ============================================================================
 * SZUKKULENS NÖVÉNYHATÁROZÓ KULCSOK LOGIKÁJA
 * ============================================================================
 */
mw.hook('wikipage.content').add(function () {
    const aktualisKategoriak = mw.config.get('wgCategories') || [];
    if (!aktualisKategoriak.includes('Szukkulens növényhatározó kulcsok')) {
        return;
    }

    const regexKoztespont = /^Szukkulens határozó:/;
    const bodyContent = document.getElementById('bodyContent');
    if (!bodyContent) return;

    // Köztes határozó oldalak linkjei
    bodyContent.querySelectorAll('a').forEach(a => {
        const teljesNev = a.getAttribute('title') || '';

        if (regexKoztespont.test(teljesNev)) {
            let tisztaGombSzöveg = teljesNev.replace(/\s*\(a lap nem létezik\)$/, '');
            a.innerHTML = '';

            const arrowSpan = document.createElement('span');
            arrowSpan.className = 'arrow-prefix';
            arrowSpan.textContent = '→';

            const spaceNode = document.createTextNode(' ');
            const textNode = document.createTextNode(tisztaGombSzöveg);

            a.appendChild(arrowSpan);
            a.appendChild(spaceNode);
            a.appendChild(textNode);

            a.className = "new hatarozo-koztespont-btn";

            let previousNode = a.previousSibling;
            if (previousNode && previousNode.nodeType === Node.TEXT_NODE) {
                previousNode.textContent = previousNode.textContent.replace(/[→\s\xA0&rarr;]+$/, '');
            }
        }
    });

    // Határozó kulcs valódi végpontjai
    bodyContent.querySelectorAll('li').forEach(li => {
        const bendoLinkek = li.querySelectorAll('a[href*="/wiki/"]:not(.external)');

        bendoLinkek.forEach(link => {
            const title = link.getAttribute('title') || '';

            if (regexKoztespont.test(title) || link.classList.contains('hatarozo-koztespont-btn')) {
                return;
            }

            let vizsgaltNode = link.previousSibling;
            if (link.parentElement.tagName.toLowerCase() === 'i') {
                vizsgaltNode = link.parentElement.previousSibling;
            }

            let elotteLevoSzo = "";
            if (vizsgaltNode && vizsgaltNode.nodeType === Node.TEXT_NODE) {
                elotteLevoSzo = vizsgaltNode.textContent;
            }

            if (!elotteLevoSzo.includes('Pl.') && !elotteLevoSzo.includes('(')) {
                if (!link.classList.contains('hatarozo-vegpont-btn')) {
                    const tisztaFajnev = link.textContent.replace(/^[→\s\xA0]+/, '').replace(/[→\s\xA0]+$/, '').trim() || title;

                    link.innerHTML = `<span class="arrow-prefix">→ </span><span class="botanical-name">${tisztaFajnev}</span>`;
                    link.classList.add("hatarozo-vegpont-btn");

                    if (link.parentElement.tagName.toLowerCase() === 'i') {
                        link.parentElement.style.fontStyle = "normal";
                    }
                }

                if (vizsgaltNode && vizsgaltNode.nodeType === Node.TEXT_NODE) {
                    vizsgaltNode.textContent = vizsgaltNode.textContent.replace(/[→\s\xA0&rarr;]+$/, '');
                }
            }
        });
    });
});