chaowenguo commited on
Commit
67adde3
1 Parent(s): 7e40d54

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -2
index.js CHANGED
@@ -1,9 +1,9 @@
1
  //npx javascript-obfuscator --unicode-escape-sequence true index.js
2
  for (const button of globalThis.document.querySelectorAll('button')) button.onclick = async event =>
3
  {
4
- //const name = globalThis.document.querySelector('input').value
5
  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())
6
  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()))
7
  globalThis.document.querySelector('video').load()
8
- globalThis.document.querySelector('title').textContent = '京城教一' + event.target.textContent
9
  }
 
1
  //npx javascript-obfuscator --unicode-escape-sequence true index.js
2
  for (const button of globalThis.document.querySelectorAll('button')) button.onclick = async event =>
3
  {
4
+ const name = globalThis.decodeURIComponent(globalThis.location.pathname).slice(1)
5
  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())
6
  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()))
7
  globalThis.document.querySelector('video').load()
8
+ globalThis.document.querySelector('title').textContent = name + event.target.textContent
9
  }