This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function fetchMarketJSON(forceFetch = false) { | |
let sendReq = (typeof GM.xmlHttpRequest === 'function')? GM.xmlHttpRequest : GM_xmlhttpRequest; | |
if (typeof sendReq !== 'function') { | |
console.error("fetchMarketJSON GM.xmlHttpRequest null function"); | |
isUsingLocalMarketJson = true; | |
const jsonStr = MARKET_JSON_LOCAL_BACKUP; | |
const jsonObj = JSON.parse(jsonStr); | |
if (jsonObj && jsonObj.time && jsonObj.market) { | |
jsonObj.market.Coin.ask = 1; |