1window.addEventListener('resize', customize_notification); 2window.addEventListener('DOMContentLoaded', () => { 3 waitForToastContainer(); 4 customize_notification(); 5}); 6 7function waitForToastContainer() { 8 const widget = document.querySelector('#notification-widget'); 9 if (!widget) return; 10 11 const widgetObserver = new MutationObserver(() => { 12 const toastContainer = document.querySelector('#notification-widget .toast-container'); 13 if (toastContainer) { 14 widgetObserver.disconnect(); 15 observeToastContainer(toastContainer); 16 customize_notification(); 17 } 18 }); 19 20 widgetObserver.observe(widget, { childList: true, subtree: true }); 21} 22 23function observeToastContainer(toastContainer) { 24 const toastObserver = new MutationObserver((muts) => { 25 for (const mut of muts) { 26 if (mut.addedNodes.length || mut.removedNodes.length) { 27 if(window.innerWidth < 480){ 28 toastContainer.classList.add('active'); 29 } 30 if(mut.addedNodes.length === 0){ 31 toastContainer.classList.remove('active'); 32 } 33 customize_notification(); 34 } 35 36 } 37 }); 38 39 toastObserver.observe(toastContainer, { 40 childList: true, 41 subtree: true 42 }); 43} 44 45function customize_notification(){ 46 const container = document.querySelector('.container'); 47 const toastContainer = document.querySelector('#notification-widget .toast-container'); 48 if(!container || !toastContainer || window.innerWidth < 480) return; 49 const rightOffset = container.offsetLeft + container.offsetWidth; 50 const toastContainerWidth = toastContainer.offsetWidth; 51 toastContainer.style.left = `${rightOffset - toastContainerWidth}px`; 52}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.