Skip to content

Instantly share code, notes, and snippets.

View nullm4ri's full-sized avatar
😈
making null

Suhyun Kim nullm4ri

😈
making null
  • Seongnam, South Korea
View GitHub Profile
function isAnimatedGif(src, cb) {
var request = new XMLHttpRequest();
request.open('GET', src, true);
request.responseType = 'arraybuffer';
request.addEventListener('load', function () {
var arr = new Uint8Array(request.response),
i, len, length = arr.length, frames = 0;
// make sure it's a gif (GIF8)
if (arr[0] !== 0x47 || arr[1] !== 0x49 ||