Add notranslate to prevent translating code (#769)

This commit is contained in:
maple 2024-03-01 10:22:14 +08:00 committed by GitHub
parent 35b9f78a8c
commit eaa762de7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
} }