A common challenge when customizing a Fluid Topics portal is making sure that a preset action occurs at the right time. Triggering the right action at the right time usually depends on waiting until another event is completed.
It is possible to listen to some events that occur in the Fluid Topics web application directly from a JavaScript environment (in the Custom JavaScript menu).
Incorrectly configuring a tenant's custom.js file can break the tenant. Antidot does not accept responsibility for any problems that may occur for this reason.
The following events are available:
ft:pageopeningft:reader:topicsloadedft:search:resultsloadedft:search:noresultsloadedft:auth:usersignedinft:auth:usersignedoutft:analytics:userevents
All are native JavaScript events and should be handled like any other event.
The following line shows how to integrate event listening into the custom.js file:
document.addEventListener('$EVENT_NAME', function(event){
//Insert your JavaScript code here
});