document.querySelector('input[value="Создать лот"]')?.click()
?function findLink(text) {
for (const a of document.querySelectorAll('.amt-link > a:not(._lock-time)')) {
if (a.querySelector('.link-icon + span').textContent.trim() === text)
return a.href;
}
return '';
}
findLink("Ярость богов")
function normalize(text) {
return text.normalize().replace(/\s+/, '').toLowerCase();
}
function findLink(text) {
text = normalize(text);
for (const a of document.querySelectorAll('.amt-link > a:not(._lock-time)')) {
if (normalize(a.querySelector('.link-icon + span').textContent) === text)
return a.href;
}
return '';
}
findLink("Ярость богов")
event.preventDefault()
и таки запускать что-то своё. Однако нажатие кнопки в интерфейсе это конечно не отменит, и страница для этого должна быть в фокусе.:) let newArr = [];
for(let i = 0; i < arr.length; i++) {
let values = arr[i];
newArr[i] = {
"values": values
}
}
// ...
"items": newArr,
/*
newArr = [
{values: arr[0]},
{values: arr[1]},
{values: arr[2]},
...
]
*/