Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
onlyLargePhotos.js
var imgHTML = [];
var imgs = document.querySelectorAll(".fbPhotoStarGridElement");
imgs.forEach((el, i)=>{
imgHTML.push('<img src="'+el.getAttribute('data-starred-src')+'">');
});
document.body.innerHTML = imgHTML;
@allisonburtch

This comment has been minimized.

Copy link

allisonburtch commented Jul 15, 2014

hey, this is awesome, thank you!
Anyone else getting this error?

Uncaught Error: <![EX[["Tried to get element with id of \"%s\" but it is not present on the page.","rightColContent"]]]> 
@seandogg

This comment has been minimized.

Copy link

seandogg commented Jul 17, 2014

Yes Allison, same error here.

@nbriz

This comment has been minimized.

Copy link
Owner Author

nbriz commented Jul 17, 2014

that's probably because u haven't loaded jquery yet :)
make sure to copy+paste all this ( http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js ) in there first, then hit enter ( the console should say "true" after that ), then copy+paste the code above && hit enter

@vbogert

This comment has been minimized.

Copy link

vbogert commented Jul 17, 2014

Hey Nick - I'm getting the same error as Allison and Sean. I tried pasting in the jquery url that you posted but I'm getting another error:

SyntaxError: Unexpected token }

Any suggestions?

@seandogg

This comment has been minimized.

Copy link

seandogg commented Jul 19, 2014

Worked when I loaded jquery :) thanks x 1000 nbriz this is awesome. Saves as an 8in x 6in which is nice for print too. So stoked.. thx

@nbriz

This comment has been minimized.

Copy link
Owner Author

nbriz commented Jul 19, 2014

@vbogert,
that kind of error usually happens when a loop/function/etc isn't closed ( meaning the ' } ' is actually missing rather than 'unexpected' ) make sure you copy the entire jquery code ( u might be missing one character )
that or u may be copying && pasting the code twice ( sometimes when u paste jquery it'll look like nothings's there, try hitting 'enter' anyways b4 u attempt to paste it in again )

@nbriz

This comment has been minimized.

Copy link
Owner Author

nbriz commented Jul 21, 2014

UPDATES >>>> http://nickbriz.com/facebook/unfriend.html <<< new scripts which might help ( comment here if u still have issues )

@afinucane

This comment has been minimized.

Copy link

afinucane commented Dec 7, 2014

Anyone else getting a large amount of 403 errors when they run this?

@ghost

This comment has been minimized.

Copy link

ghost commented Mar 9, 2015

I am also getting the issue with 403 errors where trying to execute the code. Some large photos load and some do not. Is this Facebook doing a rate limit on GETs in order to prevent the photo dump?

@nbriz

This comment has been minimized.

Copy link
Owner Author

nbriz commented Mar 31, 2015

some observations from Ted Davis ( who helped re-write the code above ):

i ran into one problem.. 
the server address you patch onto jpg urls unfortunately isn’t so static. 
when i did it, i had 93 images fail to load.. 
looked closer and saw the servers change a bit from your:

    fbcdn-sphotos-f-a.. » to things like: fbcdn-sphotos-a-a... etc.

not sure the rules.. if it’s just date of upload/hosting or euro/us thing?
@alezotta

This comment has been minimized.

Copy link

alezotta commented Aug 8, 2016

Is there any updated version of the script? I only get a blank page when I run it. I'd like to download the photos I'm tagged in before untagging myself with the all inclusive script found at http://nickbriz.com/facebook/unfriend.html

@SAI16497307

This comment has been minimized.

Copy link

SAI16497307 commented Jan 7, 2018

@nbriz I am getting the same error as Allison and Sean. Is there a fix for this?
And sometimes I get a blank page, anyone could help?

@nbriz

This comment has been minimized.

Copy link
Owner Author

nbriz commented Feb 27, 2018

updated w/new code by @ffd8 (Ted Davis) Feb 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.