Last active
August 15, 2020 04:35
-
-
Save kakas/0b9043595f94270e3394a60143831a30 to your computer and use it in GitHub Desktop.
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
(function() { | |
var blocks = [] | |
var articles = Array.apply(null, document.querySelectorAll('div[role="article"].l9j0dhe7')) | |
articles.forEach(article => { | |
var block = [] | |
var name = article.querySelector('span.pq6dq46d span').innerText | |
var contents = Array.apply(null, article.querySelectorAll('li div[dir="auto"]')).map(li => li.innerText) | |
block.push(name) | |
block.push(...contents) | |
blocks.push(block.join("\n")) | |
}) | |
console.log(blocks.join("\n\n")) | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
// open message
var articles = Array.apply(null, document.querySelectorAll('div[role="article"].l9j0dhe7'))
articles.forEach(article => article.querySelector('div[role="button"]').click())