getBTC

quick simple test function to get bitcoin price

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/382976/697849/getBTC.js

function getBTCJSON(){
    var price = getURL("https://api.coindesk.com/v1/bpi/currentprice.json");
    return price;
}

function getURL(url)
{
    var xmlHttp = new XMLHttpRequest();
    xmlHttp.open( "GET", url, false );
    xmlHttp.send( null );
    return xmlHttp.responseText;


}
lol

QingJ © 2025

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