Last active
August 14, 2023 05:07
-
-
Save ver-1000000/31d3da8090edbd2fc4122baa272037d3 to your computer and use it in GitHub Desktop.
Chromeで任意のMinecraftのDynmapを開いて、ロケーションバーに`javascript:`って打った後にコピペしてエンターするとチャットログが見れる画面が生まれるやつ
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
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 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
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