Skip to content

Commit

Permalink
[threads-helper] Fix after update (#1487)
Browse files Browse the repository at this point in the history
For some reasons, it starts to have two `span` with text "For you".

Fix by clicking both of them. If in the future there are three, just click them all.
  • Loading branch information
SamChou19815 committed Oct 19, 2023
1 parent 7e85338 commit 7205e15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/threads-extension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
let changed = false;
window.setInterval(() => {
if (changed) return;
const node = Array.from(document.querySelectorAll("span")).find(
const nodes = Array.from(document.querySelectorAll("span")).filter(
(el) => el.textContent === "For you",
);
if (node) {
for (const node of nodes) {
console.log("[threads-helper] Force following feed");
node.click();
changed = true;
Expand Down
2 changes: 1 addition & 1 deletion packages/threads-extension/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Threads Helper",
"version": "0.0.1",
"version": "0.0.2",
"manifest_version": 3,
"description": "Force defaulting to following feed",
"permissions": [],
Expand Down

0 comments on commit 7205e15

Please sign in to comment.