@sallysbakeblog

Sally McKenney

🎂 3x best-selling cookbook author and creator of Sally’s Baking Addiction blog #sallysbakingaddiction CLICK FOR ALL RECIPES 👇🏼
4,369 Posts 593,176 Followers 273 Following
/g.exec(data); if(!c && 0===c.length) { return; } data = JSON.parse(c[1]).entry_data.ProfilePage[0]; let user = data.graphql.user; if (user.edge_owner_to_timeline_media.page_info.has_next_page) { next = user.edge_owner_to_timeline_media.page_info.end_cursor; } }).error(function(jqXHR, textStatus, errorThrown) { $.post(folder + "/app/controllers/ajax.php", {update_request: 'js_error', type: 'profile'}); }); function createMedia(id, img, likes, comments, caption, caption_mormal, time, mediaNum, username = '', location = [], is_video = false, video_url = '') { var google_ads_id = 'div-gpt-ad-1574936888745-' + mediaNum; var google_ads = '
\n' + '
', google_ads_append = '', user_url = '', location_url = ''; if (mediaNum == 2 || mediaNum == 3 || mediaNum == 6) { // if (show_ads === true) { // google_ads_append = '
' + google_ads + '
'; // } } if (username != '') { user_url = '
@' + username + '
'; } if ($.isEmptyObject(location) === false) { location_url = '' + location.name + ''; } let content = google_ads_append + '
  • \n' + ' \n' + '\n' + '
    \n' + user_url + '
    \n' + caption + '
    ' + '
    \n' + location_url + '
    \n' + '
    \n' + '\n' + ' \n' + ' \n' + '
  • '; return { content: content, ads: google_ads_append !== '', ads_id: google_ads_id, }; } function time_ago(time) { switch (typeof time) { case 'number': break; case 'string': time = +new Date(time); break; case 'object': if (time.constructor === Date) time = time.getTime(); break; default: time = +new Date(); } var time_formats = [ [60, 'second', 1], // 60 [3600, 'minute', 60], // 60*60, 60 [86400, 'hour', 3600], // 60*60*24, 60*60 [604800, 'day', 86400], // 60*60*24*7, 60*60*24 [2419200, 'week', 604800], // 60*60*24*7*4, 60*60*24*7 [29030400, 'month', 2419200], // 60*60*24*7*4*12, 60*60*24*7*4 [2903040000, 'year', 29030400], // 60*60*24*7*4*12*100, 60*60*24*7*4*12 ]; var seconds = (+new Date() - time) / 1000, token = 'ago', list_choice = 1; if (seconds == 0) { return 'Just now' } if (seconds < 0) { seconds = Math.abs(seconds); token = 'from now'; list_choice = 2; } var i = 0, format; let count; while (format = time_formats[i++]) if (seconds < format[0]) { if (typeof format[2] == 'string') return format[list_choice]; else { count = Math.floor(seconds / format[2]); return count + ' ' + format[1] + (count>1 ? 's' : '') + ' ' + token; } } return time; }