Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yqs112358/edgetranslator-codetag-bugfix

Fix <code> bug for Microsoft Edge translator
https://github.com/yqs112358/edgetranslator-codetag-bugfix

edge edge-translator tampermonkey-script

Last synced: 29 days ago
JSON representation

Fix <code> bug for Microsoft Edge translator

Awesome Lists containing this project

README

        

# Fix \ bug for Edge translator

English | [δΈ­ζ–‡](README_zh.md)

## Introduction

- A simple TamperMonkey script
- To fix a long-standing bug in Microsoft Edge's built-in translator: it moves all `` tags to the end of the paragraph when translating, resulting in a completely unreadable text paragraph.
- More detailed discussion: [The translator always move the code tag content to the end - Microsoft Community Hub](https://techcommunity.microsoft.com/t5/discussions/the-translator-always-move-the-code-tag-content-to-the-end/m-p/1906043)

before

πŸ‘‡

after

## Installation

- Greasy Fork: https://greasyfork.org/scripts/485715-fix-code-bug-for-edge-translator

## Tips

- Principle: replace `` with the same-styled `` on all pages
- Due to the principle of implementation, this script may lead to performance issue when there are a lot of changes in the DOM
- This solution is by no means perfect, may cause problems on some sites, and javascript code relying on xpath to modify elements will also be affected
- **Feel free to report problems and bugs in Issue**

> Why hasn't such a ridiculous bug been fixed in many years?
> Fuck you, Microsoft!