├── AliTV-Union.js ├── BatchClearOnedriveRecycleBin-Admin.ps1 ├── BatchDeleteFolder-Onedrive-Admin.ps1 ├── BatchSetOnedriveStorageLimit-Admin.ps1 ├── BatchVideoToMP3.py ├── CheckTgBotHealthyAndRestart.py ├── CleanGITHUBArtifacts.js ├── FixEncoding4AudioMetadata.py ├── GalgameMoveToSubFolder.py ├── ImportMEGALinks.py ├── M365WholeTenantOnedriveToRcloneConf.py ├── ProxyRedirect.py ├── README.md └── RemovePasswordForArchive.py /AliTV-Union.js: -------------------------------------------------------------------------------- 1 | addEventListener('fetch', event => { 2 | event.respondWith(handleRequest(event.request)) 3 | }) 4 | 5 | async function handleRequest(request) { 6 | const url = new URL(request.url) 7 | 8 | if (url.pathname === '/auth') { 9 | return handleAuthRequest() 10 | } else if (url.pathname === '/check-status') { 11 | return handleStatusRequest(url) 12 | } else if (url.pathname === '/token') { 13 | return handleTokenRequest(request) 14 | } else { 15 | return new Response('Not Found', { status: 404 }) 16 | } 17 | } 18 | 19 | async function handleAuthRequest() { 20 | const apiResponse = await fetch('http://api.extscreen.com/aliyundrive/qrcode', { 21 | method: 'POST', 22 | headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, 23 | body: new URLSearchParams({ 24 | 'scopes': 'user:base,file:all:read,file:all:write', 25 | 'width': 500, 26 | 'height': 500 27 | }) 28 | }) 29 | 30 | const data = await apiResponse.json() 31 | const qrData = data.data 32 | const sid = qrData.sid 33 | 34 | const responseHeaders = new Headers() 35 | const qrLink = qrData.qrCodeUrl 36 | const qrID = qrLink.split('/qrcode/')[1] 37 | responseHeaders.set('Content-Type', 'text/html') 38 | responseHeaders.set('Refresh', '0; url=/check-status?sid=' + sid + "&qrid=" + qrID) 39 | responseHeaders.set('Cache-Control', 'no-cache, no-store, must-revalidate') 40 | const html = ` 41 | 42 | 43 |
44 | 45 |Welcome to ACG Database, where all ACG resources meet.
159 |Or login using this link
213 |Waiting for authentication...
214 |Welcome to ACG Database, where all ACG resources meet.
218 |