chaowenguo
commited on
Commit
•
4415bba
1
Parent(s):
f6c92fc
Update index.js
Browse files
index.js
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
//npx javascript-obfuscator --unicode-escape-sequence true index.js
|
2 |
globalThis.document.querySelector('div[style*="flex-direction"] > button').onclick = () =>
|
3 |
{
|
4 |
-
globalThis.document.querySelector('div[style*="flex-direction"]').style.width = globalThis.document.querySelector('div[style*="justify-content"]').style.marginLeft = globalThis.document.querySelector('video').style.marginLeft = 0
|
5 |
}
|
6 |
-
for (const
|
7 |
{
|
8 |
-
const
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
globalThis.document.querySelector('div[style*="
|
13 |
-
|
14 |
-
globalThis.document.querySelector('div[style*="flex-direction"]').style.width = globalThis.document.querySelector('div[style*="justify-content"]').style.marginLeft = globalThis.document.querySelector('video').style.marginLeft = '
|
15 |
}
|
16 |
const drama = globalThis.decodeURIComponent(globalThis.location.pathname).slice(1)
|
17 |
globalThis.document.querySelector('title').textContent = globalThis.document.querySelector('h1').textContent = drama
|
@@ -19,9 +19,9 @@ for (const episode of globalThis.Array(globalThis.Number(await globalThis.fetch(
|
|
19 |
{
|
20 |
const button = globalThis.document.createElement('button')
|
21 |
button.textContent = (episode + 1).toString().padStart(2, 0)
|
22 |
-
globalThis.document.querySelector('nav').appendChild(button)
|
23 |
}
|
24 |
-
for (const button of globalThis.document.querySelectorAll('nav > button')) button.onclick = async event =>
|
25 |
{
|
26 |
globalThis.document.querySelector('video').querySelector('source').src = await globalThis.fetch('https://backend.chaowenguo.eu.org/mp4', {method:'post', body:globalThis.JSON.stringify({drama, episode:event.target.textContent})}).then(_ => _.text())
|
27 |
globalThis.document.querySelector('video').querySelector('track').src = globalThis.URL.createObjectURL(await globalThis.fetch('https://backend.chaowenguo.eu.org', {method:'post', body:globalThis.JSON.stringify({drama, episode:event.target.textContent})}).then(_ => _.blob()))
|
|
|
1 |
//npx javascript-obfuscator --unicode-escape-sequence true index.js
|
2 |
globalThis.document.querySelector('div[style*="flex-direction"] > button').onclick = () =>
|
3 |
{
|
4 |
+
globalThis.document.querySelector('div[style*="flex-direction"]').style.width = globalThis.document.querySelector('body > nav').style.marginLeft = globalThis.document.querySelector('div[style*="justify-content"]').style.marginLeft = globalThis.document.querySelector('video').style.marginLeft = 0
|
5 |
}
|
6 |
+
for (const button of globalThis.document.querySelectorAll('div[style*="justify-content"] button')) button.onclick = async event =>
|
7 |
{
|
8 |
+
for (const episode of await globalThis.fetch('https://backend.chaowenguo.eu.org/list', {method:'post', body:event.target.textContent}).then(_ => _.json()))
|
9 |
+
{
|
10 |
+
const hyperlink = globalThis.document.createElement('a')
|
11 |
+
hyperlink.textContent = hyperlink.href = episode
|
12 |
+
globalThis.document.querySelector('div[style*="flex-direction"]').appendChild(hyperlink)
|
13 |
+
}
|
14 |
+
globalThis.document.querySelector('div[style*="flex-direction"]').style.width = globalThis.document.querySelector('body > nav').style.marginLeft = globalThis.document.querySelector('div[style*="justify-content"]').style.marginLeft = globalThis.document.querySelector('video').style.marginLeft = '10%'
|
15 |
}
|
16 |
const drama = globalThis.decodeURIComponent(globalThis.location.pathname).slice(1)
|
17 |
globalThis.document.querySelector('title').textContent = globalThis.document.querySelector('h1').textContent = drama
|
|
|
19 |
{
|
20 |
const button = globalThis.document.createElement('button')
|
21 |
button.textContent = (episode + 1).toString().padStart(2, 0)
|
22 |
+
globalThis.document.querySelector('body > nav').appendChild(button)
|
23 |
}
|
24 |
+
for (const button of globalThis.document.querySelectorAll('body > nav > button')) button.onclick = async event =>
|
25 |
{
|
26 |
globalThis.document.querySelector('video').querySelector('source').src = await globalThis.fetch('https://backend.chaowenguo.eu.org/mp4', {method:'post', body:globalThis.JSON.stringify({drama, episode:event.target.textContent})}).then(_ => _.text())
|
27 |
globalThis.document.querySelector('video').querySelector('track').src = globalThis.URL.createObjectURL(await globalThis.fetch('https://backend.chaowenguo.eu.org', {method:'post', body:globalThis.JSON.stringify({drama, episode:event.target.textContent})}).then(_ => _.blob()))
|