Im trying to make a tampermonkey script with a html menu. Below is the current script, I tried just creating element but It doesnt show up. So I wrote the element and it removes everything else on the page.
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://mtsl.dk/csgo/
// @icon https://www.google.com/s2/favicons?domain=freefrontend.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
var elem = document.createElement('div')
elem.innerHTML = '<div id="menu"><style>div{background-color: #fec5bb; color: #3A7CA5; border: 0px solid red; border-radius: 5px; margin: 10px; padding: 5px;}</style> <div>Inventory Editor:<button>Edit Inventory</button></div><div>Autoclicker: <button>Auto Click</button></div></div>'
document.write(elem.innerHTML)
})();
<!-- This is what elem.innerHTML looks like (see function above) -->
<!-- <div id="menu">
<style>
div {
background-color: #fec5bb;
color: #3A7CA5;
border: 0px solid red;
border-radius: 5px;
margin: 10px;
padding: 5px;
}
</style>
<div>Inventory Editor:<button>Edit Inventory</button></div>
<div>Autoclicker: <button>Auto Click</button></div>
</div> -->