Created
April 13, 2013 02:59
-
-
Save cowboy/5376701 to your computer and use it in GitHub Desktop.
jQuery: "export" Facebook messenger logs to console
This file contains hidden or 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
// todo: find way to load jQuery into a FB page without getting the "Refused to | |
// load the script because it violates the following Content Security Policy" error | |
// step 1 | |
document.getElementById("webMessengerRecentMessages").innerHTML | |
// step 2 | |
$(".-cx-PRIVATE-uiImageBlock__content").each(function() { | |
var name = $(this).find(".-cx-PRIVATE-webMessengerMessageGroup__authorName").text(); | |
$(this).find(".-cx-PRIVATE-webMessengerMessageGroup__message p").each(function() { | |
console.log("<" + name + "> " + $(this).text()); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment