Skip to content

Instantly share code, notes, and snippets.

@aflashyrhetoric
Last active May 16, 2016 22:49
Show Gist options
  • Save aflashyrhetoric/182ba09ef5572e3c48442c58a82a2746 to your computer and use it in GitHub Desktop.
Save aflashyrhetoric/182ba09ef5572e3c48442c58a82a2746 to your computer and use it in GitHub Desktop.
Changes names on messenger.com.
// Gets all the names
var names = document.getElementsByClassName("_1ht6");
var nameHeaders = document.getElementsByClassName("_3oh-");
// New name variable, leave empty to delete names (not recommended)
var newName = "";
// Changes names to newName
[].slice.call(names).forEach( function ( name ) { name.innerHTML = newName;});
// Changes nameHeaders and conversation messages to John Doe
[].slice.call(nameHeaders).forEach( function ( name ) { name.innerHTML = newName;});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment