This file contains hidden or 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
{ | |
"ab":{ | |
"name":"Abkhaz", | |
"nativeName":"аҧсуа" | |
}, | |
"aa":{ | |
"name":"Afar", | |
"nativeName":"Afaraf" | |
}, | |
"af":{ |
This file contains hidden or 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
function loadData(url){ | |
return new Promise((resolve, reject) => { | |
let xmlhttp = new XMLHttpRequest(); | |
xmlhttp.onreadystatechange = function(){ | |
if(xmlhttp.readyState === XMLHttpRequest.DONE){ | |
if(xmlhttp.status === 200){ | |
resolve(xmlhttp.responseText); | |
}else{ | |
reject(xmlhttp.status); | |
} |
This file contains hidden or 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
// modified from https://github.com/PvtTyphoon/lfm-rich-presence | |
const rpc = require("discord-rpc"); | |
const rp = new rpc.Client({ | |
transport: "ipc", | |
}); | |
const fetch = require("request-promise"); | |
const prettyMilliseconds = require("pretty-ms"); | |
function formatNumber(number) { | |
var x = number.split("."); |