如何在“同桌英语”中使用 NeonLingo

NeonLingo

2025/3/16

cover 同桌英语是一个英语学习网站,因为这个网站的一些特殊处理, 使用 NeonLingo 时会遇到一些问题. 今天就和大家分享一下, 如何在“同桌英语”中使用 NeonLingo.

安装 TamperMonkey

首先我们需要安装 TamperMonkey 这个浏览器插件.

添加脚本

我们需要点击安装好的 TamperMonkey, 然后点击新增脚本 create

复制下面的内容

将下方的内容复制到编辑框内, 然后保存(Ctrl + S 或者 Cmd + S)

// ==UserScript==
// @name NeonLingo 兼容处理: <同桌的你>
// @run-at document-start
// @match https://ielts.itongzhuo.com/*
// @match https://ielts2.itongzhuo.com/*
// ==/UserScript==

;(function () {
  const url = 'https://ai-oss3.oss-cn-shenzhen.aliyuncs.com/ielts/resources/javascript/ionic.bundle.min.js'

  const checkNode = (node) => node.tagName === 'SCRIPT' && node.src.startsWith(url)
  Array.from(document.querySelectorAll('script')).forEach((dom) => {
    if (checkNode(dom)) {
      dom.src = ''
    }
  })

  const observer = new MutationObserver((mutations) => {
    mutations.forEach((mutation) => {
      mutation.addedNodes.forEach((node) => {
        if (checkNode(node)) {
          node.src = ''
        }
      })
    })
  })

  observer.observe(document.documentElement, {
    childList: true,
    subtree: true,
  })
})()

edit

刷新网站

当我们在同桌英语中, 点击 TamperMonkey, 可以看到 NeonLingo 兼容处理: <同桌的你> 是激活状态, 便大功告成啦!

done