Skip to content

Instantly share code, notes, and snippets.

@the1812
Last active February 23, 2020 09:31
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save the1812/bd5c3edabd61b03696428fcfde53d74f to your computer and use it in GitHub Desktop.
Save the1812/bd5c3edabd61b03696428fcfde53d74f to your computer and use it in GitHub Desktop.
更改 Edge (Chromium) 的显示语言

更新: Edge 已经可以直接更改显示语言了

测试于 77.0.186.0 版, 未来版本可能有变化

在语言设置里添加想要的语言, 然后随便点一个语言的菜单.

context-menu

Ctrl+Shift+IF12打开开发者工具, 粘贴以下的代码, 按回车执行.

(() => {
  const checkbox = document.querySelector('settings-ui')
    .shadowRoot.querySelector('settings-main')
    .shadowRoot.querySelector('settings-basic-page')
    .shadowRoot.querySelector("settings-section[section='languages']")
    .querySelector('settings-languages-page')
    .shadowRoot.querySelector('settings-animated-pages')
    .querySelector('neon-animatable')
    .querySelector('cr-action-menu')
    .querySelector('cr-checkbox')

  if (checkbox !== null) {
    const unlock = () => {
      checkbox.removeAttribute('disabled')
    }
    const observer = new window.MutationObserver(unlock)
    observer.observe(checkbox, { attributes: true })
    unlock()
  }
})()

code

然后语言设置就解锁了.

unlocked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment