用户:RedDragon/Test2:修订间差异
来自Rizline中文维基
更多操作
小 |
小 |
||
| 第127行: | 第127行: | ||
const encodedUrl = `https://rizwiki.cn/api.php?action=query%26titles=${encodeURIComponent(song.title)}%26prop=revisions%26rvprop=content%26format=json` | const encodedUrl = `https://rizwiki.cn/api.php?action=query%26titles=${encodeURIComponent(song.title)}%26prop=revisions%26rvprop=content%26format=json` | ||
const decodedUrl = decodeURIComponent(encodedUrl) | const decodedUrl = decodeURIComponent(encodedUrl) | ||
fetch(decodedUrl) | fetch(decodedUrl) | ||
| 第142行: | 第140行: | ||
const styles = parseStylesFromWikitext(wikitext) | const styles = parseStylesFromWikitext(wikitext) | ||
const imageUrl = | const imageUrl = parseImageFromWikitext(wikitext) | ||
console.log(' | console.log('提取的图片URL:', imageUrl) | ||
updateSongInfo(song, { | updateSongInfo(song, { | ||
| 第159行: | 第157行: | ||
.catch(e => { | .catch(e => { | ||
console.error('获取曲目颜色失败:', e) | console.error('获取曲目颜色失败:', e) | ||
updateSongInfo(song, { | updateSongInfo(song, { | ||
titleStyle: '#94E1FF', | titleStyle: '#94E1FF', | ||
headerStyle: '#A3E5FF', | headerStyle: '#A3E5FF', | ||
labelStyle: '#B2E9FE', | labelStyle: '#B2E9FE', | ||
imageUrl: | imageUrl: null, | ||
pageUrl: `https://rizwiki.cn/wiki/${encodeURIComponent(song.title)}` | pageUrl: `https://rizwiki.cn/wiki/${encodeURIComponent(song.title)}` | ||
}) | }) | ||
}) | }) | ||
} | |||
function parseImageFromWikitext(wikitext) { | |||
const fileMatch = wikitext.match(/\[\[文件:([^|\]]+)(?:\|[^]]*)?\]\]/) | |||
if (fileMatch) { | |||
const fileName = encodeURIComponent(fileMatch[1].trim()) | |||
return `https://rizwiki.cn/wiki/文件:${fileName}` | |||
} | |||
return null | |||
} | } | ||
2025年10月20日 (一) 00:06的版本
| 曲目 | |
|---|---|
|
|
|
| 限制 | |
| 难度 | a |
| 流速 | b |
| MOD | c |
| 其他 | d |
神秘的随机挑战!
| 曲目 | |
|---|---|
|
| |
| 限制 | |
| 难度 | a |
| 流速 | b |
| MOD | c |
| 其他 | d |
User:RedDragon/Test User:RedDragon/Test1 User:RedDragon/Test2