Skip to content

Instantly share code, notes, and snippets.

@borantula
Last active September 21, 2019 11:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save borantula/2a5b11a921de51534eff859482995243 to your computer and use it in GitHub Desktop.
Save borantula/2a5b11a921de51534eff859482995243 to your computer and use it in GitHub Desktop.
//https://www.facebook.com/ads/preferences/?entry_product=ad_settings_screen
//Put this in console and watch :)
clear();
document.querySelector('#u_0_t ._2qo2 ._2qo6').click();
setTimeout(()=>{
var seeMoreInterval = setInterval(()=>{
if(document.querySelector('._45yr')) {
document.querySelector('._45yr').click()
} else {
clearInterval(seeMoreInterval);
var adElements = [...document.querySelectorAll("._2b2e button")];
var adElementsCount = adElements.length;
adElements.map((adElement,ind)=>{
setTimeout(()=>{
adElement.click()
if(adElementsCount === ind + 1) {
setTimeout(()=>window.location.reload(),1000)
}
},ind*500);
});
}
},2000);
},2000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment