Skip to content

Commit

Permalink
Clicking on text Ask HNs activates the top element
Browse files Browse the repository at this point in the history
Closes #53
  • Loading branch information
qsantos committed Oct 13, 2024
1 parent 13ff5c5 commit 9497bd4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# v0.1.25

- Only annotate the first 10 links (the ones with matching number hotkeys) #43
- Clicking on the text of Ask HNs activates the top element #53

# v0.1.24

Expand Down
4 changes: 4 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,10 @@ chrome.storage.sync.get((options) => {
// Metadata on story
gotoThing(el.parentElement.previousElementSibling);
break;
} else if (el.classList.contains("toptext")) {
// Ask HN text
gotoThing(el.parentElement.parentElement.parentElement.firstElementChild);
break;
}
} while ((el = el.parentElement));
}
Expand Down

0 comments on commit 9497bd4

Please sign in to comment.