-
-
Save legokichi/0276943d3cd59de5720a951c484617ba to your computer and use it in GitHub Desktop.
Chromeで任意のMinecraftのDynmapを開いて、ロケーションバーに`javascript:`って打った後にコピペしてエンターするとチャットログが見れる画面が生まれるやつ
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
d = document; a = d.createElement('pre'); d.body.appendChild(a); a.style = 'position:fixed;resize:both;top:200px;height:200px;width:400px;overflow:auto;white-space:pre-wrap;background:#46486787;z-index:1'; q = (x) => d.querySelectorAll(x)[0]; m = q('.messagelist'); t = ''; o = new MutationObserver(_ => { tt = ((q('.messagerow')||{}).innerText||'').trim(); if (tt && t != tt) { a.innerText = `[${new Date().toLocaleString('ja-JP')}] ${tt}\n\n${a.innerText}`; t = tt; } }); o.observe(m, { childList: true }) |
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
d = document; | |
a = d.createElement('pre'); | |
d.body.appendChild(a); | |
a.style = 'position:fixed;resize:both;top:200px;height:200px;width:400px;overflow:auto;white-space:pre-wrap;background:#00000080;z-index:1'; | |
q = (x) => d.querySelectorAll(x)[0]; | |
m = q('.messagelist'); | |
t = ''; | |
o = new MutationObserver(_ => { | |
tt = ((q('.messagerow')||{}).innerText||'').trim(); | |
if (tt && t != tt) { | |
a.innerText = `[${new Date().toLocaleString('ja-JP')}] ${tt}\n\n${a.innerText}`; | |
t = tt; | |
} | |
}); | |
o.observe(m, { childList: true }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment