From 4013b585cca660533984b60d329cc90e89b5ba59 Mon Sep 17 00:00:00 2001 From: KillyMXI Date: Thu, 5 Oct 2017 03:51:13 +0300 Subject: www: update embedding selectors --- juick-www/src/main/js/killy/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'juick-www') 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(); -- cgit v1.2.3