Created
August 21, 2020 15:54
-
-
Save Kotuhan/9aa102272590f56e22db5b3430b52efd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const formatDate = () => { | |
let dateObj = new Date(); | |
let month = dateObj.getMonth(); | |
let day = String(dateObj.getDate()).padStart(2, '0'); | |
return Number(month) + 1 + '/' + Number(day); | |
}; | |
const getTextRow = ([first, second], i) => { | |
return `${i + 1}. [и=${first}]: ${second} | |
`; | |
}; | |
const getStats = () => { | |
let [_, ...rows] = [ | |
...document | |
.getElementById('loc') | |
.contentWindow.document.getElementsByName('no_combat')[0] | |
.contentWindow.document.querySelectorAll('#ppl table tr'), | |
]; | |
var details = rows.map((row) => { | |
const [nameCell, a, b, c, expCell] = row.children; | |
const name = nameCell.querySelector('nobr').children[1].innerText; | |
const exp = expCell.innerText; | |
return [name, exp]; | |
}); | |
var result = ` | |
Результаты сдачи опыта на момент ${formatDate()} | |
${details.map(getTextRow).join('\n')} | |
`; | |
copy(result); | |
return result; | |
}; | |
getStats() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Берем вот это. Идем в зал кланов. Открываем список персов клана (ОБЯЗАТЕЛЬНО!!!) . Жмем ф12 для того чтобы открыть консоль. Вставляем ВЕСЬ скрипт и вуала - у вас в буфере обмена статистика по опыту на данный момент.