Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,19 @@ <h1>Hangouts.json Reader</h1>

function switchConvo(id){
$('.txt').text('');
$('.txt').append("<a href=\"javascript:void(0);\" onclick=\"jsonView('"+id+"')\">Get JSON</a></br>");
for(var event_id in Conversations[id]){
var convo_event = Conversations[id][event_id];
$('.txt').append(convo_event.sender + ": " + convo_event.message + "\n");
}
}

function jsonView(id){
var blob = new Blob([JSON.stringify(Conversations[id])], {type: 'text/plain'});
var url = window.URL.createObjectURL(blob);
window.open(url, '_blank');
window.focus();
}

</script>
</html>