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
# This module defines the library modules | |
# SDL2::SDL2 and SDL2::SDL2main | |
# | |
# Don't forget to include SDLmain.h and SDLmain.m your project for the | |
# OS X framework based version. (Other versions link to -lSDL2main which | |
# this module will try to find on your behalf.) Also for OS X, this | |
# module will automatically add the -framework Cocoa on your behalf. | |
# | |
# |
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() { | |
const delay = (ms) => new Promise(r => setTimeout(r, ms)); | |
// Given a url, try to download a high-res version of it | |
// This prevents us from downloading a downscaled thumbnail | |
function replaceUrlParam(url) { | |
return url | |
.split('?')[0] // get rid of querystring | |
.replace('-scaled.', '.'); // Remove `-scaled` to attempt to get the full res image | |
} |