MediaWiki:Common.js: Unterschied zwischen den Versionen

Keine Bearbeitungszusammenfassung
Markierungen: Manuelle Zurücksetzung Zurückgesetzt
Keine Bearbeitungszusammenfassung
Markierung: Manuelle Zurücksetzung
Zeile 1: Zeile 1:
/* === PREPRINT START === */
/* === PREPRINT START === */
/* ============================================
/* ============================================
   PREPRINT v7.17 - JS v260212r11
   PREPRINT v7.17 - JS v260212r7
    
    
   ARCHITECTURE:
   ARCHITECTURE:
Zeile 52: Zeile 52:
                 }
                 }
                  
                  
                New:
                 // Minerva: observe mutations, unwrap sections as they appear
                 // Minerva: observe mutations, unwrap sections as they appear
                 var debounceTimer = null;
                 var debounceTimer = null;
Zeile 799: Zeile 800:
          
          
         function positionOCElements() {
         function positionOCElements() {
            if (positionOCElements._running) return;
            positionOCElements._running = true;
           
            // Reset layout modifications before reading positions
            $('.preprint-oc-spacer').remove();
            if (layout && layout[0]) layout[0].style.paddingBottom = '';
           
             // Force reflow
             // Force reflow
             if (layout && layout[0]) {
             if (layout && layout[0]) {
Zeile 898: Zeile 892:
             // Fix overlaps
             // Fix overlaps
             fixOverlaps();
             fixOverlaps();
            /*
             // Correct OC position to align with adjacent IC content
             // Correct OC position to align with adjacent IC content
             linkage.forEach(function(link) {
             linkage.forEach(function(link) {
Zeile 914: Zeile 907:
                 }
                 }
             });
             });
            */
             syncOCtoIC();
             syncOCtoIC();
             adjustLayoutPadding();
             adjustLayoutPadding();
            positionOCElements._running = false;
              
              
             // Watch for collapsible table expand/collapse
             // Watch for collapsible table expand/collapse
             if (!layout._ocObserver) {
             if (!layout._ocObserver) {
                var ocDebounce = null;
                 layout._ocObserver = new MutationObserver(function() {
                 layout._ocObserver = new MutationObserver(function() {
                     clearTimeout(ocDebounce);
                     fixOverlaps();
                     ocDebounce = setTimeout(function() {
                     syncOCtoIC();
                        positionOCElements();
                     adjustLayoutPadding();
                     }, 300);
                 });
                 });
                 layout._ocObserver.observe(layout[0], { subtree: true, attributes: true, attributeFilter: ['class'] });
                 layout._ocObserver.observe(layout[0], { subtree: true, attributes: true, attributeFilter: ['class'] });
Zeile 1.678: Zeile 1.666:


})();
})();


/* === PREPRINT END === */
/* === PREPRINT END === */