打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

用户:RedDragon/Test2:修订间差异

来自Rizline中文维基
第36行: 第36行:
<script>
<script>
     document.addEventListener('DOMContentLoaded', () => {
     document.addEventListener('DOMContentLoaded', () => {
fetch('https://rizwiki.cn/api.php?action=query&titles=Pastel%20Lines&prop=revisions&rvprop=content&format=json&origin=*')
        fetch('https://rizwiki.cn/api.php?action=query&titles=曲目列表&prop=revisions&rvprop=content&format=json')
    .then(r => {
            .then(r => r.text())
        console.log('响应状态:', r.status)
            .then(text => {
        return r.text()
                if (text.trim().startsWith('{')) {
    })
                    return JSON.parse(text)
    .then(text => {
                } else {
        console.log('响应内容:', text.substring(0, 200))
                    const match = text.match(/{.*}/s)
    })
                    if (match) {
    .catch(e => console.error('测试请求失败:', e))
                        return JSON.parse(match[0])
            .then(r => r.json())
                    } else {
                        throw new Error('无法解析API响应')
                    }
                }
            })
             .then(data => {
             .then(data => {
                if (data.error) {
                    throw new Error(data.error.info || 'API错误')
                }
                 const pages = data.query.pages
                 const pages = data.query.pages
                 const pageId = Object.keys(pages)[0]
                 const pageId = Object.keys(pages)[0]
第88行: 第95行:
     function loadSongColors(song) {
     function loadSongColors(song) {
         fetch(`https://rizwiki.cn/api.php?action=query&titles=${encodeURIComponent(song.title)}&prop=revisions&rvprop=content&format=json`)
         fetch(`https://rizwiki.cn/api.php?action=query&titles=${encodeURIComponent(song.title)}&prop=revisions&rvprop=content&format=json`)
             .then(r => r.json())
             .then(r => r.text())
             .then(data => {
             .then(text => {
                let data
                if (text.trim().startsWith('{')) {
                    data = JSON.parse(text)
                } else {
                    const match = text.match(/{.*}/s)
                    data = match ? JSON.parse(match[0]) : {}
                }
 
                if (data.error) throw new Error(data.error.info || 'API错误')
 
                 const pages = data.query.pages
                 const pages = data.query.pages
                 const pageId = Object.keys(pages)[0]
                 const pageId = Object.keys(pages)[0]

2025年10月19日 (日) 22:07的版本

曲目
限制
难度 a
流速 b
MOD c
其他 d

神秘的随机挑战!


曲目
限制
难度 a
流速 b
MOD c
其他 d

User:RedDragon/Test User:RedDragon/Test1 User:RedDragon/Test2