let
newWindow= window.open(),
style= document.createElement("style");
document.body.append(style);


newWindow.document.write(`
<div style="border:1px solid black;
width:99%; height:50%; display:flex;
flex-direction:column">

<textarea style="width:100%; height:95%; padding:10px"></textarea>

<section style="
width: 100%;
display: flex;
justify-content: flex-end;
align-items: center">
inject !important
<input type="checkbox">
</section>
</div>`);

let textarea= newWindow.document.querySelector("textarea");
let imp= newWindow.document.querySelector("input");
textarea.onkeyup= function(){
if(imp.checked){
style.innerHTML= textarea.value.replace(/;/g, "!important;");
}
else{
style.innerHTML= textarea.value;
}
};