Workaround for Google Translate

While I cannot be too specific on the details, I am working on a site that has machine translation services included. However, two of the languages requested are not offered by the service, so a link that applies Google Translate’s machine translation to the page has been applied for each of those languages. Furthermore, it seems as though the current design is not supported in Internet Explorer, so a workaround has been written to allow for use in IE: the page instead jumps to the Google Translate page.

Example Page (Mozilla Docs)

My problem is that it has been requested that, if a language link is clicked on the page while in the Google Translate page, the browser leaves Google Translate and returns to the page linked in the original site, or jumps to the same page in Google Translate, essentially refreshing, if the link clicked within the translated site has an href that connects to the Google Translate page.

My current code is below, but unfortunately it doesn’t seem to work:

if (location.href === link1 || location.href === link2) {
            let nodeList = document.querySelectorAll("a.notranslate");
            for (let x =0; x < nodeList.length; x++) {
                nodeList[x].addEventListener("click", function() {

I apologize that this seems like an inefficient way to handle the problem; there are restrictions that make more direct solutions impossible.

If anyone has any ideas how to change the code above to work in the Google Translate page, I would appreciate it, and please let me know if I can explain anything more clearly.

To sum up the problem in simple terms, I need to write code that allows links that show up in the webpage within the Google Translate page to jump to a new page in the browser rather than staying on the same page in the window and only updating the section that has the translated page.