The following JavaScript code can be used to block automatic translation of blocks of code on a web page. This can be useful to prevent users from using machine translators to access sensitive information on a website.
To use this code, you can simply copy and paste the above code into your browser's console while on the webpage you want to block automatic translation.
If you want to use the script on all web pages automatically, you can use a browser extension like Tampermonkey. Here is an example of how to add the script to Tampermonkey:
- Install Tampermonkey in your browser.
- Click on the Tampermonkey icon in your browser's toolbar and select "Create New Script".
- Copy and paste the above code into Tampermonkey's script editor.