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

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

来自Rizline中文维基
 
(未显示同一用户的17个中间版本)
第30行: 第30行:
             <th scope="row" class="infobox-label" style="width:90px;background:#ddf;">其他</th>
             <th scope="row" class="infobox-label" style="width:90px;background:#ddf;">其他</th>
             <td class="infobox-data" id="other-data">d</td>
             <td class="infobox-data" id="other-data">d</td>
        </tr>
        <tr class="infobox-below" style="display:none;">
            <td colspan="2" style="padding:0.5em;text-align:center;">e</td>
         </tr>
         </tr>
     </tbody>
     </tbody>
</table>
</table>
<script>
    document.addEventListener('DOMContentLoaded', function () {
        initRandomChallenge()
    })
    function regenerateChallenge() {
        initRandomChallenge()
    }


<script>
    function useMockData() {
    document.addEventListener('DOMContentLoaded', () => {
        updateSongInfo({
         const encodedUrl = 'https://rizwiki.cn/api.php?action=query%26titles=曲目列表%26prop=revisions%26rvprop=content%26format=json'
            title: "Pastel Lines",
            ez: "1",
            hd: "6",
            in: "11"
        }, {
            titleStyle: '#94E1FF',
            headerStyle: '#A3E5FF',
            labelStyle: '#B2E9FE'
        })
    }
 
    function initRandomChallenge() {
         var encodedUrl = 'https://rizwiki.cn/api.php?action=query%26titles=曲目列表%26prop=revisions%26rvprop=content%26format=json'
        var decodedUrl = decodeURIComponent(encodedUrl)


        const decodedUrl = decodeURIComponent(encodedUrl)
         fetch(decodedUrl)
         fetch(decodedUrl)
             .then(r => r.json())
             .then(function (r) { return r.json() })
             .then(data => {
             .then(function (data) {
                console.log('解析后的数据:', data)
 
                 if (data.query) {
                 if (data.query) {
                     if (data.query.pages) {
                     if (data.query.pages) {
                         const pages = data.query.pages
                         var pages = data.query.pages
                         const pageId = Object.keys(pages)[0]
                         var pageId = Object.keys(pages)[0]
                         const wikitext = pages[pageId].revisions[0]['*']
                         var wikitext = pages[pageId].revisions[0]['*']
                         const songs = parseSongsFromWikitext(wikitext)
                         var songs = parseSongsFromWikitext(wikitext)


                         if (songs.length > 0) {
                         if (songs.length > 0) {
第57行: 第78行:
                         }
                         }
                     } else {
                     } else {
                        console.error('数据格式不正确,缺少query.pages')
                         useMockData()
                         useMockData()
                     }
                     }
                 } else {
                 } else {
                    console.error('数据格式不正确,缺少query')
                     useMockData()
                     useMockData()
                 }
                 }
             })
             })
             .catch(e => {
             .catch(function (e) {
                 console.error('获取曲目列表失败:', e)
                 console.error('获取曲目列表失败:', e)
                 useMockData()
                 useMockData()
             })
             })
     })
     }


     function parseSongsFromWikitext(wikitext) {
     function parseSongsFromWikitext(wikitext) {
         const songs = []
         const songs = []
        console.log('wikitext内容:', wikitext)
        // 分割整个文本,按"|-"来分割每一行
         const rows = wikitext.split('|-')
         const rows = wikitext.split('|-')
        console.log('分割出的行数:', rows.length)


         for (let i = 1; i < rows.length; i++) { // 从1开始跳过表头
         for (const row of rows.slice(1)) {
            const row = rows[i]
             const columns = row.split('\n').filter(function (col) { return col.trim().startsWith('|') })
            console.log(`处理第 ${i} 行:`, row)
 
            // 按换行符分割每一列
             const columns = row.split('\n').filter(col => col.trim().startsWith('|'))
            console.log(`第 ${i} 行列数:`, columns.length)


             if (columns.length >= 7) {
             if (columns.length >= 7) {
                // 提取各列数据
                 const imageMatch = columns[0].match(/\[\[文件:([^|\]]+)/)
                 const imageMatch = columns[0].match(/\[\[文件:([^|\]]+)/)
                 const titleMatch = columns[1].match(/\[\[([^|\]]+)/)
                 const titleMatch = columns[1].match(/\[\[([^|\]]+)/)
第99行: 第108行:
                             author: columns[2].replace(/^\|/, '').trim(),
                             author: columns[2].replace(/^\|/, '').trim(),
                             duration: columns[3].replace(/^\|/, '').trim(),
                             duration: columns[3].replace(/^\|/, '').trim(),
                             ez: columns[4].replace(/^\|/, '').trim(),
                        }
                             hd: columns[5].replace(/^\|/, '').trim(),
                        if (song.title === "BRAVE: ROAD") {
                             in: columns[6].replace(/^\|/, '').trim()
                             song.ez = ""
                         };
                            song.hd = columns[4].replace(/^\|/, '').trim()
 
                             song.in = columns[5].replace(/^\|/, '').trim()
                        console.log('解析出的曲目:', song)
                             song.at = columns[6].replace(/^\|/, '').trim()
                         } else {
                            song.ez = columns[4].replace(/^\|/, '').trim()
                            song.hd = columns[5].replace(/^\|/, '').trim()
                            song.in = columns[6].replace(/^\|/, '').trim()
                        }


                         if (song.title) {
                         if (song.title) {
第117行: 第131行:
             }
             }
         }
         }
        console.log('解析出的所有曲目:', songs)
        console.log('总共匹配到:', songs.length, '个曲目')


         return songs
         return songs
第129行: 第140行:


         fetch(decodedUrl)
         fetch(decodedUrl)
             .then(r => r.json())
             .then(function (r) { return r.json() })
             .then(data => {
             .then(function (data) {
                 try {
                 const pages = data.query.pages
                    const pages = data.query.pages
                const pageId = Object.keys(pages)[0]
                    const pageId = Object.keys(pages)[0]
                const pageData = pages[pageId]
                    const pageData = pages[pageId]


                    if (!pageData.revisions) {
                if (!pageData.revisions) {
                        throw new Error('页面不存在')
                    throw new Error('页面不存在')
                    }
                }


                    const wikitext = pageData.revisions[0]['*']
                const wikitext = pageData.revisions[0]['*']
                    const styles = parseStylesFromWikitext(wikitext)
                const styles = parseStylesFromWikitext(wikitext)


                    let imageUrl = null
                let imageUrl = null
                    if (pageData.thumbnail) {
                if (pageData.thumbnail) {
                        if (pageData.thumbnail.source) {
                    if (pageData.thumbnail.source) {
                            imageUrl = pageData.thumbnail.source;
                        imageUrl = pageData.thumbnail.source
                            console.log('获取到的缩略图URL:', imageUrl);
                        }
                     }
                     }
                }


                    updateSongInfo(song, {
                updateSongInfo(song, {
                        titleStyle: styles.title || '#94E1FF',
                    titleBg: styles.titleBg || '#94E1FF',
                        headerStyle: styles.header || '#A3E5FF',
                    titleColor: styles.titleColor || '#000000',
                        labelStyle: styles.label || '#B2E9FE',
                    headerBg: styles.headerBg || '#A3E5FF',
                        imageUrl: imageUrl,
                    headerColor: styles.headerColor || '#000000',
                        pageUrl: `https://rizwiki.cn/wiki/${encodeURIComponent(song.title)}`
                    labelBg: styles.labelBg || '#B2E9FE',
                    })
                    labelColor: styles.labelColor || '#000000',
                 } catch (e) {
                    imageUrl: imageUrl,
                    console.error('解析曲目数据失败:', e)
                    pageUrl: `https://rizwiki.cn/wiki/${encodeURIComponent(song.title)}`
                    throw e
                 })
                }
             })
             })
             .catch(e => {
             .catch(function (e) {
                 console.error('获取曲目颜色失败:', e)
                 console.error('获取曲目颜色失败:', e)
                 updateSongInfo(song, {
                 updateSongInfo(song, {
                     titleStyle: '#94E1FF',
                     titleBg: '#94E1FF',
                     headerStyle: '#A3E5FF',
                     titleColor: '#000000',
                     labelStyle: '#B2E9FE',
                    headerBg: '#A3E5FF',
                     headerColor: '#000000',
                    labelBg: '#B2E9FE',
                    labelColor: '#000000',
                     imageUrl: null,
                     imageUrl: null,
                     pageUrl: `https://rizwiki.cn/wiki/${encodeURIComponent(song.title)}`
                     pageUrl: `https://rizwiki.cn/wiki/${encodeURIComponent(song.title)}`
第174行: 第185行:
             })
             })
     }
     }
        const encodedUrl = `https://rizwiki.cn/api.php?action=query%26titles=${encodeURIComponent(song.title)}%26prop=revisions%7Cpageimages%26rvprop=content%26pithumbsize=300%26format=json`
        const decodedUrl = decodeURIComponent(encodedUrl)


        fetch(decodedUrl)
    function parseStylesFromWikitext(wikitext) {
            .then(r => r.json())
        var styles = {}
            .then(data => {
        var color1Match = wikitext.match(/\|color1\s*=\s*([^\n}]+)/)
                try {
         var color3Match = wikitext.match(/\|color3\s*=\s*([^\n}]+)/)
                    const pages = data.query.pages
         var color4Match = wikitext.match(/\|color4\s*=\s*([^\n}]+)/)
                    const pageId = Object.keys(pages)[0]
                    const pageData = pages[pageId]
 
                    if (!pageData.revisions) {
                        throw new Error('页面不存在')
                    }
 
                    const wikitext = pageData.revisions[0]['*']
                    const styles = parseStylesFromWikitext(wikitext)
 
                    let imageUrl = null
                    if (pageData.thumbnail) {
                        if (pageData.thumbnail.source) {
                            imageUrl = pageData.thumbnail.source;
                            console.log('获取到的缩略图URL:', imageUrl);
                        }
                    }
 
    function parseImageFromWikitext(wikitext) {
         const fileMatch = wikitext.match(/\[\[文件:([^|\]]+)(?:\|[^]]*)?\]\]/)
         if (fileMatch) {
            const fileName = encodeURIComponent(fileMatch[1].trim())
            return `https://rizwiki.cn/wiki/文件:${fileName}`
        }
        return null
    }


    function parseStylesFromWikitext(wikitext) {
        var textcolor1Match = wikitext.match(/\|textcolor1\s*=\s*([^\n}]+)/)
        const styles = {}
         var textcolor3Match = wikitext.match(/\|textcolor3\s*=\s*([^\n}]+)/)
         const titleMatch = wikitext.match(/infobox-title.*?background:(#[0-9a-fA-F]+)/)
         var textcolor4Match = wikitext.match(/\|textcolor4\s*=\s*([^\n}]+)/)
         if (titleMatch) styles.title = titleMatch[1]


         const headerMatch = wikitext.match(/infobox-header.*?background:(#[0-9a-fA-F]+)/)
         if (color1Match) styles.titleBg = color1Match[1].trim()
         if (headerMatch) styles.header = headerMatch[1]
        if (color3Match) styles.headerBg = color3Match[1].trim()
         if (color4Match) styles.labelBg = color4Match[1].trim()


         const labelMatch = wikitext.match(/infobox-label.*?background:(#[0-9a-fA-F]+)/)
         if (textcolor1Match) styles.titleColor = textcolor1Match[1].trim()
         if (labelMatch) styles.label = labelMatch[1]
        if (textcolor3Match) styles.headerColor = textcolor3Match[1].trim()
         if (textcolor4Match) styles.labelColor = textcolor4Match[1].trim()


         return styles
         return styles
     }
     }


     function parseImageFromWikitext(wikitext) {
     function updateSongInfo(song, data) {
         console.log('曲目页面wikitext:', wikitext)
         var titleElement = document.querySelector('.infobox-title th')
        var headerElement = document.querySelector('.infobox-header th')
        var labelElements = document.querySelectorAll('.infobox-label')
        var belowElement = document.querySelector('.infobox-below')


         // 尝试多种匹配模式
         titleElement.textContent = song.title
         const patterns = [
         titleElement.style.background = data.titleBg || '#94E1FF'
            /\[\[文件:([^|\]\n]+)(?:\|[^]\n]*)?\]\]/,  // [[文件:xxx.png]]
        titleElement.style.color = data.titleColor || '#000000'
            /\[\[File:([^|\]\n]+)(?:\|[^]\n]*)?\]\]/,  // [[File:xxx.png]]
            /src="([^"]+\.(?:png|jpg|jpeg|gif))"/i,    // src="xxx.png"
            /src='([^']+\.(?:png|jpg|jpeg|gif))'/i    // src='xxx.png'
        ]


         for (const pattern of patterns) {
         headerElement.style.background = data.headerBg || '#A3E5FF'
            const match = wikitext.match(pattern)
        headerElement.style.color = data.headerColor || '#000000'
            if (match) {
                console.log('匹配到的图片:', match[1])
                let fileName = match[1].trim()


                // 如果是文件名,构造图片URL
        for (var i = 0; i < labelElements.length; i++) {
                if (fileName.includes('.')) {
            labelElements[i].style.background = data.labelBg || '#B2E9FE'
                    fileName = encodeURIComponent(fileName)
            labelElements[i].style.color = data.labelColor || '#000000'
                    return `https://rizwiki.cn/images/thumb/?file=${fileName}&width=300`
                }
                return match[1]
            }
         }
         }


         return null
         belowElement.style.background = data.labelBg || '#B2E9FE'
    }
        belowElement.style.color = data.labelColor || '#000000'


    function updateSongInfo(song, data) {
        // 更新图片
         document.querySelector('.infobox-title th').textContent = song.title
         var container = document.querySelector('.infobox td[colspan="2"]')
         document.querySelector('.infobox-title th').style.background = data.titleStyle
         container.innerHTML = `<a href="${data.pageUrl}" target="_blank"><img id="song-image" width="300" height="300" src="${data.imageUrl || '/images/thumb/4/41/插画图标.png/300px-插画图标.png'}"></a>`
        document.querySelector('.infobox-header th').style.background = data.headerStyle
        document.querySelectorAll('.infobox-label').forEach(label => label.style.background = data.labelStyle)


         const container = document.querySelector('.infobox td[colspan="2"]')
         var availableDifficulties = []
         container.innerHTML = `<a href="${data.pageUrl}" target="_blank">
         if (song.ez) availableDifficulties.push({ type: "EZ", value: song.ez })
         <img id="song-image" width="300" height="300" src="${data.imageUrl || '/images/thumb/4/41/插画图标.png/300px-插画图标.png'}">
         if (song.hd) availableDifficulties.push({ type: "HD", value: song.hd })
    </a>`
         if (song.in) availableDifficulties.push({ type: "IN", value: song.in })
 
        if (song.at) availableDifficulties.push({ type: "AT", value: song.at })
         window.difficultyArray = [
        window.difficultyArray = availableDifficulties.map(function (diff) {
            createDiffSpan("EZ", song.ez),
             return createDiffSpan(diff.type, diff.value);
            createDiffSpan("HD", song.hd),
        });
             createDiffSpan("IN", song.in),
        window.difficultyArray.push('<span style="width:max-content;text-align:center;display:inline-block;border-radius:1em;color:white;background:#53D6FF;padding:0 0.80em;margin:0.1em 0.50em">无限制</span>');
            '<span style="width:max-content;text-align:center;display:inline-block;border-radius:1em;color:white;background:#53D6FF;padding:0 0.80em;margin:0.1em 0.50em">无限制</span>'
        ]


         generateRandomRestrictions()
         generateRandomRestrictions()
第274行: 第246行:


     function createDiffSpan(diff, level) {
     function createDiffSpan(diff, level) {
         const colors = { EZ: '#57E4C4', HD: '#FDBA61', IN: '#FE8661' }
         var colors = {
            EZ: '#57E4C4', HD: '#FDBA61', IN: '#FE8661', AT: '#4C364B'
        }
         return `<span style="width:max-content;text-align:center;display:inline-block;border-radius:1em;color:white;background:${colors[diff]};padding:0 0.80em;margin:0.1em 0.50em">${diff} ${level}</span>`
         return `<span style="width:max-content;text-align:center;display:inline-block;border-radius:1em;color:white;background:${colors[diff]};padding:0 0.80em;margin:0.1em 0.50em">${diff} ${level}</span>`
     }
     }


     function generateRandomRestrictions() {
     function generateRandomRestrictions() {
         const speeds = [...Array(40).fill("无限制"), ...Array.from({ length: 91 }, (_, i) => (i + 10) / 10)]
         // 流速选项
         const mods = ["无MOD", "镜像模式", "保护模式", "Bad保护模式", "特殊计量条", "隐藏计量条"]
        var speeds = Array(40).fill("无限制").concat(Array.from({ length: 91 }, function (_, i) { return (i + 10) / 10 }))
         const others = ["无限制", "静音", "单手", "手持"]
        // 随机流速
        var selectedSpeed = speeds[Math.floor(Math.random() * speeds.length)]
         // 随机难度
        var selectedDifficulty = window.difficultyArray[Math.floor(Math.random() * window.difficultyArray.length)]
 
        // 流速难度显示
        document.getElementById('speed-data').textContent = selectedSpeed
        document.getElementById('difficulty-data').innerHTML = selectedDifficulty
 
        // MOD权重配置
        var modOptions = [
            { name: "无MOD", weight: 9 },
            { name: "无限制", weight: 9 },
            { name: "观赏模式", weight: 1 },
 
            { name: "镜像模式", weight: 4 },
            { name: "保护模式", weight: 4 },
            { name: "Bad保护模式", weight: 4 },
            { name: "特殊计量条", weight: 1, exclude: ["特殊计量条100%", "特殊计量条110%", "特殊计量条120%"] },
            { name: "特殊计量条100%", weight: 1, exclude: ["特殊计量条", "特殊计量条110%", "特殊计量条120%"] },
            { name: "特殊计量条110%", weight: 1, exclude: ["特殊计量条", "特殊计量条100%", "特殊计量条120%"] },
            { name: "特殊计量条120%", weight: 1, exclude: ["特殊计量条", "特殊计量条100%", "特殊计量条110%"] },
            { name: "隐藏计量条", weight: 4 }
        ]
 
        // 其他限制权重配置
         var otherOptions = [
            { name: "无限制", weight: 12 },
            { name: "静音", weight: 2 },
            { name: "单手", weight: 2, exclude: ["全拆打法", "全换打法", "禁止出张"] },
            { name: "手持", weight: 2 },
            { name: "Bad数比Hit数多", weight: 1 },
            { name: "Combo低于50", weight: 1 },
            { name: "全拆打法", weight: 2, exclude: ["单手", "全换打法"] },
            { name: "全换打法", weight: 2, exclude: ["单手", "全拆打法"] },
            { name: "禁止出张", weight: 2, exclude: ["单手"] },
            { name: "反色", weight: 1 }
        ]
 
        // 随机MOD
        var selectedMods = selectWeightedItemsWithExclude(modOptions, 0.3, ["无MOD", "无限制", "观赏模式"])
 
        // 随机其他限制
        var selectedOthers = selectWeightedItemsWithExclude(otherOptions, 0.8, ["无限制"])


         document.getElementById('difficulty-data').innerHTML = window.difficultyArray[Math.floor(Math.random() * window.difficultyArray.length)]
         updateRestrictionElement('mod-data', selectedMods)
        updateRestrictionElement('other-data', selectedOthers)
        updateBelowText(selectedDifficulty, selectedSpeed, selectedMods, selectedOthers)
    }


        document.getElementById('speed-data').textContent = speeds[Math.floor(Math.random() * speeds.length)]
    // 加权随机选择函数,逐个检查冲突
    // options: 选项数组
    // singleProbability: 只选择一个项的概率
    // excludeItem: 选择多个时要排除的项
    function selectWeightedItemsWithExclude(options, singleProbability, excludeItems) {
        var selectedItems = []


        let selectedMods = []
         if (Math.random() < singleProbability) {
         if (Math.random() < 0.3) {
            var weightedOptions = []
             selectedMods = [mods[Math.floor(Math.random() * mods.length)]]
            for (var i = 0; i < options.length; i++) {
                for (var j = 0; j < options[i].weight; j++) {
                    weightedOptions.push(options[i].name)
                }
            }
             selectedItems = [weightedOptions[Math.floor(Math.random() * weightedOptions.length)]]
         } else {
         } else {
             const count = Math.floor(Math.random() * 3) + 2
             var availableOptions = options.filter(function (opt) {
            const availableMods = mods.filter(m => m !== "无MOD")
                return !excludeItems.includes(opt.name)
            const shuffled = [...availableMods].sort(() => Math.random() - 0.5)
             })
             selectedMods = shuffled.slice(0, Math.min(count, availableMods.length))


             const hasSpecial = selectedMods.includes("特殊计量条")
             var weightedOptions = []
             if (hasSpecial) {
             for (var i = 0; i < availableOptions.length; i++) {
                 const specialRates = ["特殊计量条100%", "特殊计量条110%", "特殊计量条120%"]
                 for (var j = 0; j < availableOptions[i].weight; j++) {
                 selectedMods = selectedMods.filter(m => m !== "特殊计量条")
                    weightedOptions.push(availableOptions[i])
                 selectedMods.push(specialRates[Math.floor(Math.random() * specialRates.length)])
                 }
            }
 
            var count = Math.floor(Math.random() * 3) + 2  // 2-4个项
            var maxAttempts = 20
 
            while (maxAttempts > 0) {
                 if (selectedItems.length < count) {
                    if (weightedOptions.length > 0) {
                        maxAttempts--
 
                        var randomIndex = Math.floor(Math.random() * weightedOptions.length)
                        var candidate = weightedOptions[randomIndex]
                        var canAdd = true
 
                        for (var j = 0; j < selectedItems.length; j++) {
                            var selectedItem = selectedItems[j]
                            if (candidate.exclude) {
                                if (candidate.exclude.includes(selectedItem)) {
                                    canAdd = false
                                    break
                                }
                            }
                            var selectedOption = availableOptions.find(function (opt) { return opt.name === selectedItem })
                            if (selectedOption) {
                                if (selectedOption.exclude) {
                                    if (selectedOption.exclude.includes(candidate.name)) {
                                        canAdd = false
                                        break
                                    }
                                }
                            }
                        }
 
                        if (canAdd) {
                            selectedItems.push(candidate.name)
                            weightedOptions = weightedOptions.filter(function (opt) { return opt.name !== candidate.name })
                        } else {
                            weightedOptions.splice(randomIndex, 1)
                        }
                    } else {
                        break
                    }
                } else {
                    break
                }
             }
             }
         }
         }


         const modElement = document.getElementById('mod-data')
         for (var i = 0; i < excludeItems.length; i++) {
         if (selectedMods.length === 1) {
            if (selectedItems.includes(excludeItems[i])) {
             modElement.textContent = selectedMods[0]
                selectedItems = [excludeItems[i]]
                break
            }
        }
 
        return selectedItems
    }
 
    function updateRestrictionElement(elementId, items) {
        var element = document.getElementById(elementId)
         if (items.length == 1) {
             element.textContent = items[0]
         } else {
         } else {
             modElement.innerHTML = `<p>${selectedMods.join('<br>')}</p>`
             element.innerHTML = '<p>' + items.join('<br>') + '</p>'
         }
         }
    }
    function updateBelowText(difficulty, speed, mods, others) {
        var belowElement = document.querySelector('.infobox-below')
        var belowText = ""


         let selectedOthers = []
         if (mods[0] == "观赏模式") {
         if (Math.random() < 0.8) {
            belowText = "WOW奖励关!"
             selectedOthers = [others[Math.floor(Math.random() * others.length)]]
         } else if (difficulty.includes('EZ')) {
         } else {
             if (speed == "无限制") {
            const count = Math.floor(Math.random() * 2) + 2
                if (mods[0] == "无限制") {
             const availableOthers = others.filter(o => o !== "无限制")
                    if (others[0] == "无限制") {
            const shuffled = [...availableOthers].sort(() => Math.random() - 0.5)
                        belowText = "最简单的一集"
             selectedOthers = shuffled.slice(0, Math.min(count, availableOthers.length))
                    }
                }
            }
         } else if (difficulty.includes('无限制')) {
             if (speed == "无限制") {
                if (mods[0] == "无限制") {
                    if (others[0] == "无限制") {
                        belowText = "无限制!"
                    }
                }
             }
        } else if (difficulty.includes('AT')) {
            belowText = "这么强?!"
         }
         }


         const otherElement = document.getElementById('other-data')
         if (belowText) {
        if (selectedOthers.length === 1) {
            belowElement.style.display = ""
             otherElement.textContent = selectedOthers[0]
             belowElement.querySelector('td').textContent = belowText
         } else {
         } else {
             otherElement.innerHTML = `<p>${selectedOthers.join('<br>')}</p>`
             belowElement.style.display = "none"
         }
         }
    }
    function useMockData() {
        updateSongInfo({
            title: "Pastel Lines",
            ez: "1",
            hd: "6",
            in: "11"
        }, {
            titleStyle: '#94E1FF',
            headerStyle: '#A3E5FF',
            labelStyle: '#B2E9FE'
        })
     }
     }
</script>
</script>
</html>
</html>
神秘的随机挑战!
神秘的随机挑战!


Ver.1.6


<html>
<button onclick="regenerateChallenge()"
    style="padding: 10px 20px; font-size: 16px; background-color: var(--background-color-interactive-subtle); border: var(--border-width-base) solid var(--border-color-base); border-radius: var(--border-radius-large); cursor: pointer; transition-duration: 100ms;"
    onmouseover="this.style.backgroundColor='var(--background-color-base)'"
    onmouseout="this.style.backgroundColor='var(--background-color-interactive-subtle)'">
    新挑战
</button>
</html>
<pre>
{{Infobox
{{Infobox
|name         = 随机挑战
|name = 随机挑战
|title       = 曲目
|title = 曲目
|titlestyle   = background:#ccc
|titlestyle = background:#ccc
|image       = [[File:插画图标.png|100px]]
|image = [[File:插画图标.png|100px]]
|imagestyle  =
|headerstyle = background:#ccf
|headerstyle = background:#ccf
|labelstyle = background:#ddf
|labelstyle   = background:#ddf


|header1 = 限制
|header1 = 限制
|label2 = 难度
|label2 = 难度
|data2   = a
|data2 = a
|label3 = 流速
|label3 = 流速
|data3   = b
|data3 = b
|label4 = MOD
|label4 = MOD
|data4   = c
|data4 = c
|label5 = 其他
|label5 = 其他
|data5   = d
|data5 = d
 
|belowstyle = background:#ddf;
|below = e


}}
}}
</pre>
----
----
[[User:RedDragon/Test]]
[[User:RedDragon/Test]]
[[User:RedDragon/Test1]]
[[User:RedDragon/Test1]]
[[User:RedDragon/Test2]]
[[User:RedDragon/Test2]]

2025年10月23日 (四) 01:34的最新版本

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

神秘的随机挑战!

Ver.1.6

{{Infobox
|name = 随机挑战
|title = 曲目
|titlestyle = background:#ccc
|image = [[File:插画图标.png|100px]]
|headerstyle = background:#ccf
|labelstyle = background:#ddf

|header1 = 限制
|label2 = 难度
|data2 = a
|label3 = 流速
|data3 = b
|label4 = MOD
|data4 = c
|label5 = 其他
|data5 = d

|belowstyle = background:#ddf;
|below = e

}}

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