Skip to content

Instantly share code, notes, and snippets.

@r-plus
Created August 5, 2022 12:38
Show Gist options
  • Save r-plus/89dbe3e383ea5b653b13f621c0cf9df2 to your computer and use it in GitHub Desktop.
Save r-plus/89dbe3e383ea5b653b13f621c0cf9df2 to your computer and use it in GitHub Desktop.
BetterTouchTool javascript transform for github iOS Simulator screenshot width 300
async (str) => {
const re = /https?:\/\/[-_.!~*\'a-zA-Z0-9;\/?:\@&=+\$,%#]+/g;
const m = str.match(re);
return `<img src=${m[0]} width=300>`;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment