אונטערשייד צווישן ווערסיעס פון "באַניצער:שווערמער/common.js"

קפיצה לניווט קפיצה לחיפוש
קיין רעדאגירונג באמערקונג
אין תקציר עריכה
צייכן: צוריקגעשטעלט
אין תקציר עריכה
צייכן: מאנועל צוריקשטעל
שורה 134: שורה 134:
// [[m:User:Jon Harald Søby/diffedit.js]]
// [[m:User:Jon Harald Søby/diffedit.js]]
mw.loader.load( '//meta.wikimedia.org/w/index.php?title=User:Jon_Harald_Søby/diffedit.js&action=raw&ctype=text/javascript' );
mw.loader.load( '//meta.wikimedia.org/w/index.php?title=User:Jon_Harald_Søby/diffedit.js&action=raw&ctype=text/javascript' );
mw.loader.using('mediawiki.util', function() {
    $(document).ready(function() {
        document.querySelectorAll('sup.reference').forEach(ref => {
            let next = ref.nextSibling;
            while (next && next.nodeType === Node.TEXT_NODE && next.textContent.trim() === '') {
                next = next.nextSibling; // skip empty text nodes
            }
            if (next && next.nodeType === Node.ELEMENT_NODE && next.classList.contains('reference')) {
                ref.insertAdjacentText('afterend', ', ');
            }
        });
    });
});

נאוויגאציע מעניו