From eaa762de7e106e86c291e09c283650fa9dca9d1f Mon Sep 17 00:00:00 2001 From: maple Date: Fri, 1 Mar 2024 10:22:14 +0800 Subject: [PATCH] Add notranslate to prevent translating code (#769) --- source/js/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/js/utils.js b/source/js/utils.js index abc50ff..808d838 100644 --- a/source/js/utils.js +++ b/source/js/utils.js @@ -75,6 +75,9 @@ NexT.utils = { box = document.createElement('div'); box.className = 'code-container'; 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; }