Maybe try using js to detect if menu content has changed and then apply new styles.
UPDATE
When Chrome translates a page it adds several elements to a page:
- two
script
elements to head
tag
- global object
window.google
class = "translated-ltr"
to html
tag
div id="goog-gt-tt"
to body
tag
You can watch for changes in DOM to find out when content is translated:
document.addEventListener('DOMSubtreeModified', function (e) {
if(e.target.tagName === 'HTML' && window.google) {
if(e.target.className.match('translated')) {
// page has been translated
} else {
// page has been translated and translation was canceled
}
}
}, true);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…