PageSourceSearch

https://asia-today.news/local/components/asia/page.nav/templates/.default/script.js?17705921211768

js asia-today.news collected 2026-10-02 13:03:01 UTC 1,768 bytes, 63 lines download raw bytes

1/*
2function getURI(href){
3	let l = document.createElement('a');
4	l.href = href;
5	return l.href;
6}
7document.addEventListener('DOMContentLoaded', function(){
8	
9  document.addEventListener('click', (e) => {
10    if (e.target.matches('[data-pager-load="show-more"], [data-pager-load="show-more"] *')) {
11      e.preventDefault();
12		let thisBtn = e.target;
13		if(!thisBtn.matches('[data-pager-load="show-more"]')){
14			thisBtn = thisBtn.closest('[data-pager-load="show-more"]');
15		}
16		let parentNode = thisBtn.closest('[data-pager-load="news"]');
17		if(!parentNode){
18			thisBtn.remove();
19			return false;
20		}
21		let newsList = parentNode.querySelector('[data-pager-load="news-list"]');
22		if(!newsList){
23			thisBtn.remove();
24			return false;
25		}
26		let pagen = thisBtn.getAttribute('data-pager-load-param');
27		if(!pagen){
28			thisBtn.remove();
29			return false;
30		}
31		let fetchUrl = getURI(thisBtn.getAttribute('href'));
32		fetchUrl = new URL(fetchUrl);
33		fetchUrl.searchParams.set('ACTION', 'NEWS');
34		if(fetchUrl){
35			fetch(fetchUrl, {})
36			.then(response => response.json())
37			.then(dataJson => {
38				if('RESPONSE' in dataJson){
39					newsList.insertAdjacentHTML('beforeend', dataJson.RESPONSE);
40				}
41				if('NEXT' in dataJson && 'PAGE' in dataJson){
42					if(dataJson.NEXT===false){
43						thisBtn.remove();
44						return false;
45					}else{
46						let newFetch = getURI(fetchUrl);
47						fetchUrl = new URL(fetchUrl);
48						fetchUrl.searchParams.delete(pagen);
49						fetchUrl.searchParams.delete('ACTION');
50						fetchUrl.searchParams.set(pagen, parseInt(dataJson.PAGE)+1);
51						thisBtn.setAttribute('href', fetchUrl.href);
52					}
53				}else{
54					thisBtn.remove();
55					return false;
56				}
57			})
58		}
59    }
60  });
61  
62});
63*/

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.