andy0130tw
1/30/2016 - 1:53 PM

Fetch the URLs of a Facebook sticker pack! Also the very first gist of mine featuring ES6.

Fetch the URLs of a Facebook sticker pack! Also the very first gist of mine featuring ES6.

// Before using,
//   1) add an ID (`ggg` in this case) to the container of the table of the sticker pack you want.
//   2) The static ones are cached unless the animated ones are needed so you must move your cursor through all the stickers.

// Hint: The URLs can be fed into DownloadThemAll! or something else.

Array.from(document.querySelectorAll("#ggg ._5r8i"))
     .map( x=>x.style.backgroundImage
               .match(/https[^"]+/)[0]
               .replace(/(s|p)\d+x\d+/, "") )
     .join("\n")