歌詞取得。

ボタンおして歌詞取得

当前为 2023-03-31 提交的版本,查看 最新版本

// ==UserScript==
// @name        歌詞取得。
// @license MIT
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  ボタンおして歌詞取得
// @author       You
// @match        https://typing-tube.net/movie/show*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=typing-tube.net
// @grant        none
// ==/UserScript==

(function() {
    let butt = document.createElement('input')
butt.type = 'button'
butt.id = 'butt'
butt.value = '歌詞取得'
document.querySelector("#btn_container > p").appendChild(butt)
butt.addEventListener('click',()=>{

let lrc_arr = []
for(i in lyrics_array){
    let lrc_str = lyrics_array[i][1]
    lrc_str = lrc_str.replace(/<div(?: .+?)?>.*?<\/div>/g,"")
    lrc_str = lrc_str.replace(/<span(?: .+?)?>/g,"")
    lrc_str = lrc_str.replace(/<\/span>/g,"")
    lrc_str = lrc_str.replace(/<br>/g,"")
    lrc_str = lrc_str.replace(/<ruby>.*?<\/ruby>/g,"")
    lrc_str = lrc_str.replace(/&.*?;/g,"")
    lrc_str = lrc_str.replace('__________________________' ,"")
    if(lyrics_array[i][2] != ''){lrc_arr.push(lrc_str)}
}
let lrc_str = lrc_arr.filter(Boolean).join("\n")
    navigator.clipboard.writeText(lrc_str).then(alert("コピー済"))

})
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址