How to add an HTML element to the timeline container

Hi,

I’m experimenting with adding an element to the timeline element, but it seems to be very sensitive to changes - whenever I add something it breaks the functionality (the scroller no longer updates) and the timeline will no longer ‘scroll up’ when you reach the end of the page.

Is it at all possible to add something here, and if so what is the recommended way to do it?

I’m trying to achieve something like this:

… and of course I found the answer an hour later :slight_smile:

<script type="text/discourse-plugin" version="0.8">
	// testing only for staff now
	if(Discourse.User.currentProp('staff') == true ) {
		console.log('user is staff');
		api.decorateWidget('topic-timeline-container:before', helper => {
			return helper.rawHtml('')
		});
	}
</script>
4 Likes

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