מייבאים כמותיים, בדוקי עריכות אוטומטית, אינטערפעיס אדמיניסטראַטאָרן, מנטרים, מייבאים, מעדכנים, אספקלריה רעדאקטארן
3,951
רעדאגירונגען
אין תקציר עריכה צייכן: צוריקגעשטעלט |
אין תקציר עריכה צייכן: צוריקגעשטעלט |
||
| שורה 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' ); | ||
document.querySelectorAll('sup.reference').forEach | document.querySelectorAll('sup.reference').forEach(ref => { | ||
// Look for the next sibling node | |||
let next = ref.nextSibling; | |||
while (next && next.nodeType === Node.TEXT_NODE && next.textContent.trim() === '') { | |||
next = next.nextSibling; // skip empty text nodes | |||
} | |||
// If the next non-empty node is also a reference, add a comma | |||
if (next && next.nodeType === Node.ELEMENT_NODE && next.classList.contains('reference')) { | |||
ref.insertAdjacentText('afterend', ', '); | |||
} | |||
}); | }); | ||
רעדאגירונגען