diff options
author | KillyMXI | 2017-10-05 03:51:13 +0300 |
---|---|---|
committer | KillyMXI | 2017-10-05 03:51:13 +0300 |
commit | 4013b585cca660533984b60d329cc90e89b5ba59 (patch) | |
tree | cf793c7aa6a633fe0bbb41402655152c9ec851c9 /juick-www | |
parent | 3a887c5ba67a1b3f04f2a09db71f3ea5e2d94e4a (diff) |
www: update embedding selectors
Diffstat (limited to 'juick-www')
-rw-r--r-- | juick-www/src/main/js/killy/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-www/src/main/js/killy/index.js b/juick-www/src/main/js/killy/index.js index b96613c2..c9885b03 100644 --- a/juick-www/src/main/js/killy/index.js +++ b/juick-www/src/main/js/killy/index.js @@ -305,7 +305,7 @@ function embedLinksToX(x, beforeNodeSelector, allLinksSelector) { function embedLinksToArticles() { let beforeNodeSelector = 'nav.l'; let allLinksSelector = 'p:not(.ir) a, pre a'; - Array.from(document.querySelectorAll('#content > article')).forEach(article => { + Array.from(document.querySelectorAll('#content article')).forEach(article => { embedLinksToX(article, beforeNodeSelector, allLinksSelector); }); } @@ -322,7 +322,7 @@ function embedLinksToPost() { * Embed all the links in all messages/replies on the page. */ function embedAll() { - if (document.querySelectorAll('#content > article').length) { + if (document.querySelector('#content article[data-mid]')) { embedLinksToArticles(); } else { embedLinksToPost(); |