Notaku exposes a Widget JavaScript API to control your widget behaviour

Open the widget sidebar

Notaku.show()

Close the widget sidebar

Notaku.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.

Notaku.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 subdirectory

Notaku.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

Notaku.getWidget('{{widgetId}}').show()