Replies: 1 comment 2 replies
-
I don't have tictoc, but something like this should work. const tagsElem = [...document.querySelectorAll(
'div[class*="DivMainContent"] a[href*="/tag"]'
)];
const keywords = ['cat', 'smallcat'];
if (!tagsElem) {
return false;
}
else if (tagsElem.some((el) => keywords.includes(el.innerText))){
console.log("now it works, this message is shown when condition is true");
} I did not check for anything else. I included changes so you can try to import json and try it right away. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
HI, everyone, I create two conditions, and tried many times to let it works as I want, but both of them doesn't work, any one can help check?
Condition 1:
path1: if the tags(https://prnt.sc/gOmLg3zpVouD) contain keywords"cat" or "smallcat", it will go to condition 2(https://prnt.sc/Y-kipDGYRlFe).
false: it will go to click the next video button(https://prnt.sc/HY64uowcwNU4).
condition 2:
TK condition.zip
path 1: If the follow button shows follow(https://prnt.sc/rUhpYxnOzA0i), it will go to click the follow button(https://prnt.sc/uhouardrKnxu),
path 2: If the like button didn't be clicked yet(https://prnt.sc/T_0klEoZWjnk), it will go to click the like button(https://prnt.sc/dzOYd84cmTM7)
false: it will go to click the next video button(https://prnt.sc/k2qKP0CUBSgQ)
The workflow file
TK condition.zip
Beta Was this translation helpful? Give feedback.
All reactions