v0.3.25: 外部依赖内置化 — qrcodejs/Hitokoto/IPgeo/代理测试
This commit is contained in:
@@ -46,13 +46,11 @@
|
||||
const categories=data.categories||[]
|
||||
const fetchedAt=data.fetchedAt||''
|
||||
// Quote
|
||||
fetch('https://v1.hitokoto.cn/').then(r=>r.json()).then(d=>{
|
||||
document.getElementById('homeQuote').textContent='「 '+d.hitokoto+' 」'
|
||||
document.getElementById('homeQuoteAuthor').textContent='---'+(d.from_who||d.from||'')
|
||||
}).catch(()=>{
|
||||
document.getElementById('homeQuote').textContent='「 学而时习之,不亦说乎。 」'
|
||||
document.getElementById('homeQuoteAuthor').textContent='---孔子'
|
||||
})
|
||||
fetch('https://v1.(function(){
|
||||
var q=QUOTES[Math.floor(Math.random()*QUOTES.length)];
|
||||
document.getElementById('homeQuote').textContent='「 '+q+' 」';
|
||||
document.getElementById('homeQuoteAuthor').textContent='——古籍经典';
|
||||
})()
|
||||
|
||||
// Store expanded state per category
|
||||
window.__expanded=window.__expanded||{}
|
||||
|
||||
Reference in New Issue
Block a user