ผลต่างระหว่างรุ่นของ "ผู้ใช้:Ans/script"

เนื้อหาที่ลบ เนื้อหาที่เพิ่ม
Ans (คุย | ส่วนร่วม)
sort fb (2ndary key)
Ans (คุย | ส่วนร่วม)
+https://www.thairath.co.th/tags/เมนูทีวี
บรรทัด 5:
<source lang=js>(function(){var c=document.getElementsByClassName('timestampContent'); var a=[]; for (var i=0;i<c.length;++i) a.push(c[i]); a.sort(function(x,y){x=[new Date(x.firstChild.nodeValue.replace(' at ', ' ')), x.parentNode.parentNode.href.toString()];y=[new Date(y.firstChild.nodeValue.replace(' at ', ' ')), y.parentNode.parentNode.href.toString()]; return x[0]-y[0]==0?x[1]<y[1]?-1:x[1]>y[1]?1:0:x[0]-y[0]}); for (var i=0;i<a.length;++i){var j=0; while(a[i].className!='_401d')a[i]=a[i].parentNode,++j; a[0].parentNode.appendChild(a[i])} return a})()</source>
<source lang=js>(function(){var c=document.getElementsByClassName('timestampContent'); var a=[]; for (var i=0;i<c.length;++i) a.push(c[i]); var b=[]; for (var i=0;i<a.length;++i){b.push(a[i].parentNode.parentNode.href.replace(/^(https:\/\/)www(\.facebook\.com\/)/, '$1m$2')+' ('+a[i].firstChild.nodeValue+')')} return b})().join('\n')</source>
 
https://www.thairath.co.th/tags/เมนูทีวี
<source lang=js>(await (async function(a) { a={minTs:a}; for(let i=0; i<100 && 'minTs' in a && a.minTs>0; ++i) { console.log(a.minTs); a=(await (await fetch("https://www.thairath.co.th/api-tags?tags=%E0%B9%80%E0%B8%A1%E0%B8%99%E0%B8%B9%E0%B8%97%E0%B8%B5%E0%B8%A7%E0%B8%B5&before="+a.minTs, {
"credentials": "include",
"referrer": "https://www.thairath.co.th/tags/%E0%B9%80%E0%B8%A1%E0%B8%99%E0%B8%B9%E0%B8%97%E0%B8%B5%E0%B8%A7%E0%B8%B5",
"method": "GET",
"mode": "cors"
})).json()) } console.log('break', a.minTs); return a; })(1500760860)).minTs</source>
 
== convert date to <nowiki>{{start date|...}}</nowiki> for ==