Add button to layout.updatemenus with my own custom function

Can I add button as on screenshot, but with my js function?
For example I want to add alert or just console.log()