Created
July 29, 2019 09:15
-
-
Save EvanTheB/02db41bf333ed19f97fbda3e1ec2edeb to your computer and use it in GitHub Desktop.
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
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