Revert "Add debug log to insert / remove element"
This reverts commit 8015eacce7
.
This commit is contained in:
parent
eccf91c769
commit
85bd5abd06
|
@ -2,9 +2,6 @@ import React from "react";
|
|||
import ReactDOM from "react-dom";
|
||||
import browser from "webextension-polyfill";
|
||||
import TranslateContainer from "./components/TranslateContainer";
|
||||
import log from "loglevel";
|
||||
|
||||
const logDir = "constent/index";
|
||||
|
||||
let isEnabled = true;
|
||||
const handleMessage = async request => {
|
||||
|
@ -32,7 +29,6 @@ browser.runtime.onMessage.addListener(handleMessage);
|
|||
const removeElement = () => {
|
||||
const element = document.getElementById("simple-translate");
|
||||
if (!element) return;
|
||||
log.log(logDir, "removeElement()");
|
||||
|
||||
ReactDOM.unmountComponentAtNode(element);
|
||||
element.parentNode.removeChild(element);
|
||||
|
@ -43,7 +39,6 @@ let isFirst = true;
|
|||
const insertElement = () => {
|
||||
const element = document.getElementById("simple-translate");
|
||||
if (element) return;
|
||||
log.log(logDir, "insertElement()");
|
||||
|
||||
document.body.insertAdjacentHTML("beforeend", "<div id='simple-translate'></div>");
|
||||
ReactDOM.render(
|
||||
|
|
Loading…
Reference in a new issue