Created
August 3, 2023 00:35
-
-
Save shizone/c4128d91f13d8179697ac9c5a858f359 to your computer and use it in GitHub Desktop.
Yukizuriのチャット内容をダウンロードするスクリプト
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
const times = $.makeArray($('.chat-box-timestamp')).map((e) => e.innerText); | |
const names = $.makeArray($('.chat-box-name')).map((e) => e.innerText); | |
const texts = $.makeArray($('.chat-box-text')).map((e) => e.innerText); | |
const messages = names.map((n, i) => `${times[i]} - ${n}: ${texts[i]}`); | |
const blob = new Blob([ messages.join('\n')], {'type': 'text/plain'}); | |
const url = URL.createObjectURL(blob); | |
const a = document.createElement('a'); | |
a.setAttribute('href', url); | |
a.setAttribute('download', `yukizuri_${new Date().toLocaleDateString('sv-SE')}.log`); | |
a.click(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment