Skip to content

Instantly share code, notes, and snippets.

@EvanTheB
Created July 29, 2019 09:15
Show Gist options
  • Save EvanTheB/02db41bf333ed19f97fbda3e1ec2edeb to your computer and use it in GitHub Desktop.
Save EvanTheB/02db41bf333ed19f97fbda3e1ec2edeb to your computer and use it in GitHub Desktop.
function autolike () {
[].forEach.call(
document.getElementById("likes-and-labels-container")
.getElementsByClassName("like-button-text"),
function (e) {
console.error(e);
if (e.innerText === "Like") {
e.parentNode.click();
// [].forEach.call(
// document.getElementsByClassName("like-button"),
// function (e) { e.click(); }
// );
}
}
)
}
setTimeout( function() {autolike()}, 2000);
// document.addEventListener("DOMContentLoaded", function(event){
// autolike()
// });
// window.onload = function() {autolike()}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment