Skip to content

Instantly share code, notes, and snippets.

@akshar-dave
Last active September 21, 2021 20:15
Show Gist options
  • Save akshar-dave/547784123aca47f860a883911c24b68d to your computer and use it in GitHub Desktop.
Save akshar-dave/547784123aca47f860a883911c24b68d to your computer and use it in GitHub Desktop.
Open the Activity tab in notifications on Unsplash by default
function $(elem){
return document.querySelectorAll(elem);
}
var notificationBtn = $('button._1aYva')[0];
notificationBtn.addEventListener('click', function(){
var notificationsVisible = setInterval(function() {
if ($('._35qCx button:nth-child(2)')[0]) {
$('._35qCx button:nth-child(2)')[0].click();
clearInterval(notificationsVisible);
}
}, 100);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment