async function clickByElement() {
let element = document.querySelector('.css-1swe2yf-DivActionContainer.esns4rh0 [aria-pressed="false"]');
if (!element) return null;
console.log('Клик!')
element.click();
while (element.getAttribute('aria-pressed') !== 'true') {
await new Promise(resolve => setTimeout(resolve, 100));
}
return true;
}
async function clickAllElements() {
let foundClickable = false;
while (await clickByElement() !== null) {
foundClickable = true;
}
return foundClickable;
}
async function scrollToBottomAndClickAgain() {
const scrollContainer = document.querySelector('.css-1qp5gj2-DivCommentListContainer.ekjxngi3');
if (scrollContainer) {
console.log('Крутим страницу и ждем 10 сек.')
let lastScrollTop = scrollContainer.scrollTop;
scrollContainer.scrollTop = scrollContainer.scrollHeight;
await new Promise(resolve => setTimeout(resolve, 10000));
if (scrollContainer.scrollTop !== lastScrollTop) {
if (await clickAllElements()) {
await scrollToBottomAndClickAgain();
} else {
console.log('Прокрутка выполнена, новые элементы для клика не найдены.');
}
} else {
console.log('Достигли конца прокрутки, больше нечего прокручивать.');
if (await clickAllElements()) {
await scrollToBottomAndClickAgain();
} else {
console.log('Задача окончательно завершена, кликов больше не осталось');
}
}
} else {
console.error('Контейнер для прокрутки не найден');
}
}
async function initiateClicksAndScroll() {
if (await clickAllElements()) {
await scrollToBottomAndClickAgain();
} else {
console.log('Нет элементов для начальных кликов, проверяем прокрутку');
await scrollToBottomAndClickAgain();
}
}
initiateClicksAndScroll().then(() => console.log('Задача выполнена май генерал!'));
using UnityEngine;
using UnityEngine.SceneManagement;
public class GoNextStage : MonoBehaviour
{
int item;
void PickUpIntem()
{
item++;
if (!(item < 15)) Loader();
}
void Loader()
{
SceneManager.LoadScene("Second"); //<=Название след сцены
}
private void OnTriggerEnter(Collider other)
{
if (other.tag == "Item")
{
other.gameObject.SetActive(false);
PickUpIntem();
}
}
}
<div class="your_slide">
<div class="your_content">Hello world</div>
<span class="your_back"></span>
</div>
.your_slide{
position: relative;
}
.yout_content{
position: relative;
z-index: 2;
}
.your_back{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
}
SELECT DISTINCT tt.term_id
FROM wp_term_relationships AS tr
JOIN wp_term_taxonomy AS tt
ON tr.term_taxonomy_id = tt.term_taxonomy_id
JOIN wp_terms AS t
ON tt.term_id = t.term_id
WHERE tr.object_id IN (
SELECT p.ID
FROM wp_posts AS p
JOIN wp_term_relationships AS tr
ON p.ID = tr.object_id
JOIN wp_term_taxonomy AS tt
ON tr.term_taxonomy_id = tt.term_taxonomy_id
JOIN wp_terms AS t
ON tt.term_id = t.term_id
WHERE p.post_type = 'product'
AND p.post_status = 'publish'
AND tt.taxonomy = 'product_cat'
AND t.term_id = '2961'
)
AND tt.taxonomy LIKE 'pa_%';