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
// this allows to send arbitrary messages. The chat conversation you want to send messages to has to be open. | |
// just run this in the JS console | |
// http://stackoverflow.com/a/39165137/1249001 | |
function findReactComponent(dom) { | |
for (var key in dom) | |
if (key.startsWith("__reactInternalInstance$")) { | |
var compInternals = dom[key]._currentElement; | |
var compWrapper = compInternals._owner; | |
var comp = compWrapper._instance; |