Skip to content

Instantly share code, notes, and snippets.

@e0da
Created January 28, 2013 01:26
Show Gist options
  • Save e0da/4652006 to your computer and use it in GitHub Desktop.
Save e0da/4652006 to your computer and use it in GitHub Desktop.
Turn off Facebook chat programatically
/*
* So far, the strategy is to try to use the menu to do this.
* It would be better to call whatever function turns this crap
* off directly, but so far I haven't found anything.
*/
// Open the menu
document.querySelector('.fbChatSidebarDropdown a').click()
// Turn off chat (can only be clicked if the menu is open)
document.querySelector('.fbChatGoOfflineItem').click()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment