Created
April 27, 2018 19:10
-
-
Save celestora/1760689ce359aed5543c95a9bb032373 to your computer and use it in GitHub Desktop.
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
if(localStorage.interceptedMessages == undefined) localStorage.interceptedMessages = "[]"; | |
insertionQ(".im-mess").every(message => { | |
let text = message.querySelector(".im-mess--text").textContent; | |
let peer = "#"+message.dataset.peer; | |
let messages = JSON.parse(localStorage.interceptedMessages); | |
messages.push([peer, text, Date.now()]); | |
localStorage.interceptedMessages = JSON.stringify(messages); | |
console.info([peer, text].join(": ")); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment