Last active
February 18, 2021 16:26
-
-
Save raindev/01b8a8e3381f3f1103d4d2329c182704 to your computer and use it in GitHub Desktop.
A JS bookmarklet to get URLs of Google Chat threads
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
javascript:(function() { | |
Array.from(document.getElementsByTagName('c-wiz')) | |
.map(tag => ({ | |
threadId: tag.getAttribute('data-topic-id'), | |
firstMessage: tag.children[0].getAttribute('aria-label') | |
})) | |
.filter(thread => thread.threadId != null && thread.firstMessage != null) | |
.forEach(thread => console.log(window.location.href + '/' + thread.threadId | |
+ " : " + thread.firstMessage)) | |
}()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create a browser bookmark with URL set to the content of the file. Open the bookmark when a tab with Google Chat room is active and it will print the results to the browser console.