Last active
January 24, 2022 22:01
-
-
Save mkanenobu/5cf6c2b3b580ba0c30814997cbf3fa51 to your computer and use it in GitHub Desktop.
Log google meet chat text.
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
var attribute = "data-sender-name"; | |
// HACK | |
var getChatTextDoms = () => | |
Array.prototype.slice | |
.call(document.querySelectorAll("*")) | |
.filter((el) => typeof el.attributes[attribute] !== "undefined"); | |
var texts = getChatTextDoms(); | |
var result = ""; | |
Object.values(texts).forEach((textDom) => { | |
result += textDom.innerText + "\n\n"; | |
}); | |
window.prompt("Copy to clipboard: Ctrl+C, Enter", result); | |
// For bookmarklet | |
// javascript:var attribute="data-sender-name",getChatTextDoms=function(){return Array.prototype.slice.call(document.querySelectorAll("*")).filter(function(a){return"undefined"!==typeof a.attributes[attribute]})},texts=getChatTextDoms(),result="";Object.values(texts).forEach(function(a){result+=a.innerText+"\n\n"});window.prompt("Copy to clipboard: Ctrl+C, Enter",result); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment