Is there an API to add new buttons next to or underneath the New Topic button - or where the New Topic button would go if logged out? I’d like to create an “Action” button with similar functionality to the Categories Button; when a user clicks it a dropdown should appear
I could definitely do it with jQuery, but I’d like to be able to switch out themes
This is the script I’m currently using to add a button to the very top menu, which I put in my themes common/head_tag.html
:
<script type="text/discourse-plugin" version="0.4">
api.decorateWidget('header-icons:before', helper => {
return [
helper.h('li', [
helper.h('a.handsfree-show-when-stopped.handsfree-start.icon', {
title: 'start webcam and enable handsfree'
}, helper.h('i.fab.fa-video.home-button-icon.d-icon')),
]),
helper.h('li', [
helper.h('a.handsfree-show-when-started.handsfree-stop.icon', {
title: 'stop webcam and disable handsfree'
}, helper.h('i.fab.fa-video.home-button-icon.d-icon')),
])
]
});
</script>
Is there something like that but for the New Topic section?