From 5173547a0d2b61cc6068e71ea1ee75a7bf539849 Mon Sep 17 00:00:00 2001 From: maple3142 Date: Thu, 29 Feb 2024 16:51:31 +0800 Subject: [PATCH] Feat: Add notranslate to prevent translating code --- source/js/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/js/utils.js b/source/js/utils.js index abc50ff78..808d838fe 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; }