Skip to content

Instantly share code, notes, and snippets.

View encryptededdy's full-sized avatar

Edward Zhang encryptededdy

View GitHub Profile
@mohan-cao
mohan-cao / Code.gs
Last active May 27, 2019 21:58
Facebook RSS Feed photo post filter for IFTTT (to any service)
/// This code is functionally equivalent to the filter code in IFTTT
/// Gets largest dimension image from FB RSS <content> in the RSS entry
function GetBiggestImage(content) {
if (!content) return "";
if (Array.isArray(content)) {
return content.map(function(e){return e.map(function(f){return GetBiggestImage(f)})})
}
var re = /src\s*=\s*"(.+?)"/g;
var biggestDim = [0, 0];