Skip to content

Instantly share code, notes, and snippets.

@Kotuhan
Created August 21, 2020 15:54
Show Gist options
  • Save Kotuhan/9aa102272590f56e22db5b3430b52efd to your computer and use it in GitHub Desktop.
Save Kotuhan/9aa102272590f56e22db5b3430b52efd to your computer and use it in GitHub Desktop.
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()
@Kotuhan
Copy link
Author

Kotuhan commented Aug 24, 2020

Берем вот это. Идем в зал кланов. Открываем список персов клана (ОБЯЗАТЕЛЬНО!!!) . Жмем ф12 для того чтобы открыть консоль. Вставляем ВЕСЬ скрипт и вуала - у вас в буфере обмена статистика по опыту на данный момент.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment