video / index.js
chaowenguo's picture
Create index.js
f7a485e
raw
history blame
917 Bytes
//npx javascript-obfuscator --unicode-escape-sequence true index.js
for (const button of globalThis.document.querySelectorAll('button')) button.onclick = async event =>
{
//const name = globalThis.document.querySelector('input').value
globalThis.document.querySelector('video').querySelector('source').src = await globalThis.fetch('https://backend.chaowenguo.eu.org/mp4', {method:'post', body:globalThis.JSON.stringify({episode:event.target.textContent})}).then(_ => _.text())
globalThis.document.querySelector('video').querySelector('track').src = globalThis.URL.createObjectURL(await globalThis.fetch('https://backend.chaowenguo.eu.org', {method:'post', body:globalThis.JSON.stringify({episode:event.target.textContent})}).then(_ => _.blob()))
globalThis.document.querySelector('video').load()
globalThis.document.querySelector('title').textContent = '京城教一' + event.target.textContent
}