Last active
October 31, 2017 00:35
-
-
Save ahmadawais/fca1c3b9b96489716974c1781c298b38 to your computer and use it in GitHub Desktop.
WIP: Update Facebook Photo Album Pictures' Captions all at once!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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