From ab5bc95df3a5f4dfdb9c8f47ce47520b88cb861a Mon Sep 17 00:00:00 2001 From: Yang Lin Date: Fri, 25 Nov 2016 01:42:21 +0800 Subject: [PATCH] Fixes more --- public/translate/cn/translate.js | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/public/translate/cn/translate.js b/public/translate/cn/translate.js index 707e44e59b..f31c6571fe 100644 --- a/public/translate/cn/translate.js +++ b/public/translate/cn/translate.js @@ -57,21 +57,13 @@ var sourceVisible = localStorage.getItem('source-visible') === 'true'; if (node.innerText === 'Back to top') { var x = 0; } - if (node.children.length > 0) { - // For
  • ...

  • , processes it as block. - if (processContainer(node) <= 1) { - if (processBlock(node)) { - i++; - } - } else { - count++; + + if (processContainer(node) <= 1) { + if (processBlock(node)) { + i++; } } else { - if (node.tagName === 'A' && node.classList.contains('to-top')) { - if (processBlock(node)) { - i++; - } - } + count++; } break; } @@ -93,7 +85,7 @@ var sourceVisible = localStorage.getItem('source-visible') === 'true'; if (sibling) { if (sibling.tagName === 'LI') { - processBlock(sibling); + processContainer(sibling); } if (isClonedNode(current, sibling)) {