Skip to content

Commit

Permalink
fix: add embedPageTitle selector for adding click hint to the embed p…
Browse files Browse the repository at this point in the history
…age title roam-unofficial#216
  • Loading branch information
JimmyLv authored Apr 30, 2022
1 parent 770bc52 commit 6deb52c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ts/core/features/vim-mode/hint-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Promise.all(HINT_IDS.map(hintCss)).then(cssClasses => {
export const updateVimHints = (block: HTMLElement) => {
// button is for reference counts
const links = block.querySelectorAll(
`${Selectors.link}, ${Selectors.externalLink}, ${Selectors.checkbox}, ${Selectors.button}, ${Selectors.blockReference}`
`${Selectors.link}, ${Selectors.externalLink}, ${Selectors.embedPageTitle}, ${Selectors.checkbox}, ${Selectors.button}, ${Selectors.blockReference}`
)
links.forEach((link, i) => {
link.classList.add(HINT_CSS_CLASS, hintCssClass(i))
Expand Down
3 changes: 2 additions & 1 deletion src/ts/core/roam/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export const Selectors = {
dailyNotes: '#rm-log-container',
viewMore: '.roam-log-preview',
checkbox: '.check-container',
externalLink: 'a',
externalLink: 'a[target="_blank"]',
embedPageTitle: '.rm-embed--page a span.rm-page__title',
referenceItem: '.rm-reference-item',
breadcrumbsContainer: '.zoom-mentions-view',
pageReferenceItem: '.rm-ref-page-view',
Expand Down

0 comments on commit 6deb52c

Please sign in to comment.