mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-20 19:02:33 +00:00
Add notranslate to prevent translating code (#769)
This commit is contained in:
parent
35b9f78a8c
commit
eaa762de7e
@ -75,6 +75,9 @@ NexT.utils = {
|
|||||||
box = document.createElement('div');
|
box = document.createElement('div');
|
||||||
box.className = 'code-container';
|
box.className = 'code-container';
|
||||||
container.wrap(box);
|
container.wrap(box);
|
||||||
|
|
||||||
|
// add "notranslate" to prevent Google Translate from translating it, which also completely messes up the layout
|
||||||
|
box.classList.add('notranslate');
|
||||||
}
|
}
|
||||||
target = box;
|
target = box;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user