Skip to content

Instantly share code, notes, and snippets.

@ZSendokame
Last active March 7, 2026 23:43
Show Gist options
  • Select an option

  • Save ZSendokame/24a217b386c93927d16d1b5374a70b19 to your computer and use it in GitHub Desktop.

Select an option

Save ZSendokame/24a217b386c93927d16d1b5374a70b19 to your computer and use it in GitHub Desktop.
Training TikToks' algorithm by abusing Picture-In-Picture feature to sieve for seals and sea lions.
let keywords = ["sea lion", "sealion", "seal"];
let likeButton = document.querySelector(".pip-1ib08jm-5e6d46e3--ButtonActionItem");
let skipButton = document.querySelector(".pip-5md2hj-5e6d46e3--TransparentButtonContainer-5e6d46e3--StyledVideoSwitch");
function sealion() {
let descriptionText = document.querySelector(".pip-fuvvz-5e6d46e3--DivDescription");
if (descriptionText == null) {
return false;
}
for (keyword in keywords) {
if (descriptionText.textContent.toLowerCase().includes(keywords[keyword])) {
return true;
}
}
return false;
}
function sieve() {
if (sealion()) {
likeButton.click();
}
skipButton.click();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment