Put a navigation button with payload on the right side of titlebar

I have an idea to implement this function after I found someone's solution from forum. May be a little bit stupid. :joy:

I creat a template node link to a group.See below code.,

<style>
#my-refresh-button {
    background-color: #353f48; 
    color: #f6f6f6;
    border: none;
    font-size: 35px;
}
</style>
<script>
    var theScope = scope;
    var myButton = document.getElementById("my-refresh-button");
    if(!myButton) {
    var button = document.createElement('BUTTON');
    button.addEventListener('click', sendPayload);
    button.innerHTML ='≡'
    button.id = 'my-refresh-button'
    button.style.position = 'absolute'
    button.style.right = '5px'
     button.style.top = '-2px'
    var titleBar = document.getElementById("nr-dashboard-toolbar");
    titleBar.append(button);
    }
    function sendPayload(){
    theScope.send("1");
    }
</script>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.