I've implemented a Tampermonkey script on Chrome that adds buttons to web pages. Upon clicking, the script analyzes the page and displays an alert. Below is the code snippet for showing the button:
function Main(){
GM_addStyle('.myButtonDiv {color: black; background-color: black}');
var div = document.createElement('div');
div.setAttribute('class', 'myButtonDiv');
div.innerHTML = '<input type="button" value="clickMe">';
document.body.insertBefore(div, document.body.firstChild);
div.firstChild.addEventListener('click', runMyScript, true);
}
I have multiple scripts like this running on the same page, but currently, the buttons are stacked vertically, occupying too much screen space.
Is there a way to align them side by side in a single row?
Appreciate any advice, Nir