自动把翻译结果的id设置为原文元素的id

This commit is contained in:
Zhicheng Wang 2016-05-14 20:42:09 +08:00
parent d17dd7434a
commit 3e8b152e2c
1 changed files with 4 additions and 3 deletions

View File

@ -9,10 +9,11 @@
} else {
prevNode.classList.add('original-english');
}
node.title = prevNode.innerText;
node.id = prevNode.id;
node.classList.add('translated');
node.classList.add('translated-cn');
}
node.title = prevNode.innerText;
node.classList.add('translated');
node.classList.add('translated-cn');
}
});