🏠 Home 

Greasy Fork is available in English.

getBTC

quick simple test function to get bitcoin price

สคริปต์นี้ไม่ควรถูกติดตั้งโดยตรง มันเป็นคลังสำหรับสคริปต์อื่น ๆ เพื่อบรรจุด้วยคำสั่งเมทา // @require https://update.greasyfork.org/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