Merge pull request 'Migrate Renovate config' (#3) from renovate/migrate-config into master

Reviewed-on: #3
··[CST 2026-02-23 Monday 08:41:34]
This commit is contained in:
biss
2026-02-23 08:41:34 +08:00
commit bc59115ebe
107 changed files with 54767 additions and 0 deletions

13
js/random.js Normal file
View File

@@ -0,0 +1,13 @@
function randomPost() {
fetch('/sitemap.xml').then(res => res.text()).then(str => (new window.DOMParser()).parseFromString(str, "text/xml")).then(data => {
let ls = data.querySelectorAll('url loc');
let locationHref,locSplit;
do {
locationHref = ls[Math.floor(Math.random() * ls.length)].innerHTML
locSplit = locationHref.split('/')[3] || ''
} while (locSplit !== 'posts');
//若所有文章都如 https://…….com/posts/2022/07/…… 格式,主域名后字符是 posts则循环条件改为
//while (locSplit !== 'posts');
location.href = locationHref
})
}