Last active
January 2, 2016 07:59
-
-
Save projectweekend/8273789 to your computer and use it in GitHub Desktop.
Since Facebook feels the need to capture stuff I do not choose to post, I'm going to have some fun with it! I don't have the time to type stuff into textareas all day, but this JavaScript snippet does. Go to your Facebook news feed, open up your browser's dev tools, paste this into console, and press enter.
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
var mySpecialMessage = "Suck It!"; | |
var sendMySpecialMessage = function () { | |
var textareasOnPage = document.getElementsByTagName("textarea"); | |
for (var i = 0; i < textareasOnPage.length; ++i) { | |
var item = textareasOnPage[i]; | |
if (i % 2 == 0) { | |
item.value = mySpecialMessage; | |
} else { | |
// every odd cycle through loop, blank out the message | |
item.value = ""; | |
} | |
} | |
console.log("Sending message: " + mySpecialMessage); | |
}; | |
window.setInterval(function () { sendMySpecialMessage() }, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment