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

קיין רעדאגירונג באמערקונג
(פארברייטערט)
צייכן: צוריקגעשטעלט
אין תקציר עריכה
 
(8 צווישנדיגע ווערסיעס פונעם זעלבן באַניצער נישט געוויזן)
שורה 4: שורה 4:
importScript('באַניצער:צמא לדעת/sametab.js');
importScript('באַניצער:צמא לדעת/sametab.js');
importScript("User:גאון הירדן/ייבוא ועדכון.js");
importScript("User:גאון הירדן/ייבוא ועדכון.js");
importScript('באַניצער:תנא קמא/tanachLinks.js');
mw.loader.load('https://commons.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions.js&action=raw&ctype=text/javascript');
mw.loader.load('https://commons.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions.js&action=raw&ctype=text/javascript');


שורה 11: שורה 10:
*/
*/
if ((mw.config.get('wgAction') === 'delete') && ((($("#firstHeading").text().indexOf("הפעולה בוצעה")>-1))||($("#firstHeading").text().indexOf("די אקציע איז אויסגעפירט געווארן")>-1))){
if ((mw.config.get('wgAction') === 'delete') && ((($("#firstHeading").text().indexOf("הפעולה בוצעה")>-1))||($("#firstHeading").text().indexOf("די אקציע איז אויסגעפירט געווארן")>-1))){
document.querySelectorAll('.mw-parser-output').forEach(container => {
  const refs = container.querySelectorAll('sup.reference');
  for (let i = 1; i < refs.length; i++) {
    const prev = refs[i - 1];
    const cur = refs[i];
    // Collect text between prev and cur
    let betweenText = '';
    let node = prev.nextSibling;
    while (node && node !== cur) {
      if (node.nodeType === Node.TEXT_NODE) betweenText += node.textContent;
      if (node.nodeType === Node.ELEMENT_NODE) betweenText += node.textContent;
      node = node.nextSibling;
    }
    // Only insert comma if nothing visible between
    if (betweenText.trim() === '') {
      cur.insertAdjacentText('beforebegin', ', ');
    }
  }
});


var page = mw.config.get('wgPageName');
var page = mw.config.get('wgPageName');