-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenscript.js
15 lines (14 loc) · 929 Bytes
/
genscript.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const apiScopes = [...document.querySelectorAll('body > div.main > section > table:nth-child(7) > tbody > tr > td > code')].map(n => n.innerText)
const apiScopesDescriptions = [...document.querySelectorAll('body > div.main > section > table:nth-child(7) > tbody > tr > td:nth-child(2)')].map(n => n.innerText.split('\n')[0])
const api = {}
for (const scope of apiScopes) {
const index = apiScopes.indexOf(scope)
api[scope] = apiScopesDescriptions[index]
}
const chatScopes = [...document.querySelectorAll('body > div.main > section > table:nth-child(9) > tbody > tr > td:nth-child(1) > code')].map(n => n.innerText)
const chatScopesDescriptions = [...document.querySelectorAll('body > div.main > section > table:nth-child(9) > tbody > tr > td:nth-child(2)')].map(n => n.innerText)
const chat = {}
for (const scope of chatScopes) {
const index = chatScopes.indexOf(scope)
chat[scope] = chatScopesDescriptions[index]
}