Skip to content

Instantly share code, notes, and snippets.

@ahmadawais
Last active October 31, 2017 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmadawais/fca1c3b9b96489716974c1781c298b38 to your computer and use it in GitHub Desktop.
Save ahmadawais/fca1c3b9b96489716974c1781c298b38 to your computer and use it in GitHub Desktop.
WIP: Update Facebook Photo Album Pictures' Captions all at once!
/**
* Set Caption of All Facebook Pics in an Album.
*
* 1. Create and upload pictures in a Facebook album.
* 2. Edit the alubm, go till the end to load all pics.
* 3. Open Browser console (CMD ⌘ + J for Chrome).
* 4. Run the following script line by line after editing the `theCaps` variable.
* 5. Then save the album. Cheers!
*
* @author Ahmad Awais (https://github.com/ahmadawais)
*/
let theCaps = `Whatever caption you want for all pics of album goes here`;
let fbcaps = document.querySelectorAll('.captionTextarea');
// I use this [].slice.call( divs ) to transform the NodeList into a regular array,
// so that I can call the forEach method on it.
[].slice.call( fbcaps ).forEach(function ( fbcp ) {
fbcp.innerHTML = theCaps;
});
// Now save. 🍕
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment