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() { | |
var doc = document, | |
htm = doc.documentElement, | |
lct = null, // last click target | |
nearest = function(elm, tag) { | |
while (elm && elm.nodeName != tag) { | |
elm = elm.parentNode; | |
} | |
return elm; | |
}; |
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
const sleep = ms => { | |
return new Promise(resolve => { | |
setTimeout(resolve, ms) | |
}) | |
} | |
const makeid = length => { | |
let text = "" | |
const possible = "ABCDEFGHIJKLMNPQRSTUVWXYZ0123456789" | |
for (let i = 0; i < length; i += 1) { |
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
const makeid = length => { | |
let text = "" | |
const possible = "ABCDEFGHIJKLMNPQRSTUVWXYZ0123456789" | |
for (let i = 0; i < length; i += 1) { | |
text += possible.charAt(Math.floor(Math.random() * possible.length)) | |
} | |
return text | |
} | |
const buildMetadataFromHeaders = headers => { |