Notaku exposes a Widget JavaScript API to control your widget behaviour
Open the widget sidebar
typescriptNotaku.show()
Close the widget sidebar
typescriptNotaku.hide()
Change the widget current url
This method will change the website shown in the widget sidebar.
It works even if the widget has not been opened yet.
typescriptNotaku.goTo('https://notaku.so/docs')
Change the widget full page url link
The widget sidebar will show a link to visit your full page website.
You can use this method to change the link url, very useful in case you are hosting the website on a
/docs
subdirectorytypescriptNotaku.setFullPageUrl('https://notaku.so/docs')
Multiple widgets on a website
If you have many Notaku widgets on a page you can target one with the
getWidget(widgetId)
function
typescriptNotaku.getWidget('{{widgetId}}').show()