1// const addAppFeatures = () => { 2// const appMenu = document.querySelector('.app-menu'); 3// const appShare = document.querySelector('.app-share'); 4// const appSocial = document.querySelector('.app-social'); 5// const appFooter = document.querySelector('.app-footer'); 6// const appBack = document.querySelector('.app-back'); 7// const appComments = document.querySelector('.app-comments'); 8 9 10// if (appFooter) document.body.classList.add('app'); 11// if (appMenu) appMenu.addEventListener('click', () => menu.classList.toggle('on')); 12// if (appShare) appShare.addEventListener('click', () => appSocial.classList.toggle('on')); 13// if (appBack) appBack.addEventListener('click', () => window.history.back()); 14// if (appComments) { 15// const commentButton = document.querySelector('.article-comment-btn'); 16// const { top, left } = commentButton.getBoundingClientRect(); 17// const scrollOptions = {top: parseInt(top) * 0.9, left: left, behavior: 'smooth'}; 18// appComments.addEventListener('click', () => { 19// lazyload(); 20// window.scrollTo(scrollOptions) 21// }); 22// } 23 24// const appCSS = document.createElement('link'); 25// appCSS.rel = 'stylesheet'; 26// appCSS.href = '/wp-content/themes/philenews/styles/app.css'; 27// document.head.lastElementChild.insertAdjacentElement('afterend', appCSS); 28// } 29 30// window.addEventListener('load', addAppFeatures); 31 32(() => { 33 const appMenu = document.querySelector('.app-menu'); 34 // const appShare = document.querySelector('.app-share'); 35 // const appSocial = document.querySelector('.app-social'); 36 const appFooter = document.querySelector('.app-footer'); 37 // const appBack = document.querySelector('.app-back'); 38 // const appComments = document.querySelector('.app-comments'); 39 40 if (appFooter) document.body.classList.add('app'); 41 if (appMenu) appMenu.addEventListener('click', () => { 42 const homeHappNow = document.querySelector('[page="app-home"] .happ__now.happ__now--app'); 43 const middleFace = document.querySelector('body .mc__face.face__middle:first-of-type'); 44 if (menu.classList.contains('on')) { 45 if (middleFace) middleFace.classList.remove('closed'); 46 if (homeHappNow) homeHappNow.classList.remove('closed'); 47 document.body.classList.remove("stop-scrolling"); 48 menu.classList.remove('on'); 49 } else { 50 if (homeHappNow) homeHappNow.classList.add('closed') 51 if (middleFace) middleFace.classList.add('closed') 52 document.body.classList.add("stop-scrolling"); 53 menu.classList.add('on'); 54 } 55 }); 56 const homeAppMenuClose = document.querySelector('.app__home_close'); 57 if (homeAppMenuClose) { 58 homeAppMenuClose.addEventListener('click', () => { 59 const homeHappNow = document.querySelector('[page="app-home"] .happ__now.happ__now--app'); 60 const middleFace = document.querySelector('body .mc__face.face__middle:first-of-type'); 61 if (middleFace) middleFace.classList.remove('closed'); 62 if (homeHappNow) homeHappNow.classList.remove('closed'); 63 document.body.classList.remove("stop-scrolling"); 64 menu.classList.remove('on'); 65 }) 66 } 67 // if (appShare) appShare.addEventListener('click', () => appSocial.classList.toggle('on')); 68 // if (appBack) appBack.addEventListener('click', () => window.history.back()); 69 // if (appComments) { 70 // const commentButton = document.querySelector('.article-comment-btn'); 71 // const { top, left } = commentButton.getBoundingClientRect(); 72 // const scrollOptions = {top: parseInt(top) * 0.9, left: left, behavior: 'smooth'}; 73 // appComments.addEventListener('click', () => { 74 // lazyload(); 75 // window.scrollTo(scrollOptions) 76 // }); 77 // } 78 79 // const appCSS = document.createElement('link'); 80 // appCSS.rel = 'stylesheet'; 81 // appCSS.href = '/wp-content/themes/philenews/styles/app.css'; 82 // document.head.lastElementChild.insertAdjacentElement('afterend', appCSS); 83})(); 84 85// [...document.querySelectorAll('div[id^=div-gpt-phn]')].flatMap(a => [...a.childNodes]); 86// [...document.querySelectorAll('div[id^=div-gpt-phn]')].map(a => a.closest('.extra-content-box')).filter(a => a !== null).filter(a => a.parentElement).forEach(a => { 87// if (!a.parentElement.classList.contains('adLoaded')) { 88// a.remove(); 89// } 90// }) 91 92 93
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.