From 1cd9da3873c7b05aa1696cd2174a3bd65b0c3e7d Mon Sep 17 00:00:00 2001 From: Ne1s07 Date: Thu, 2 May 2019 11:54:38 +0800 Subject: [PATCH] Fix the inserted
covering origin content (#151) When inserting
after element, it will create a new to contain the new
element. This may cause part of the origin website content to be covered. So just use `beforeend` instead of `afterend` to avoid that. --- src/content/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/index.js b/src/content/index.js index 3b92b86..eb9e55e 100644 --- a/src/content/index.js +++ b/src/content/index.js @@ -2,5 +2,5 @@ import React from "react"; import ReactDOM from "react-dom"; import TranslateContainer from "./components/TranslateContainer"; -document.body.insertAdjacentHTML("afterend", "
"); +document.body.insertAdjacentHTML("beforeend", "
"); ReactDOM.render(, document.getElementById("simple-translate"));