Widget Api
The Changelogfy In-App Widget, provide interface to interact with widget.
Position
You can choose between showing the widget on left and right
var CLF_config = {
app_id: "YOUR_APP_ID",
position: "right", // left
};
Offset
var CLF_config = {
app_id: "YOUR_APP_ID",
bottom: 20, // optional
top: 20, // optional:
left: 0, // optional
right: 0, // optional
};
Open
This method will open the widget
changelogfy.open();
Close
This method will close the widget
changelogfy.close();
Manual initialize
This method init will initialize manually the widget, but you need set init to false.
var CLF_config = {
app_id: "YOUR_APP_ID",
init: false, // required
};
changelogfy.init(CLF_config);
Callbacks
The Changelogfy In-App Widget supports callback, its helpful to some custom integrations.
var CLF_config = {
app_id: "YOUR_APP_ID",
callbacks: {
onReady: function () {
console.log("widget ready");
console.log(`unread entries count: ${changelogfy.getUnreadCount()}`);
},
onOpen: function () {
console.log("widget opened");
},
onClose: function () {
console.log("widget closed");
},
},
};
Destroy
This method will destroy the widget
changelogfy.destroy();
Logout
Clear all data created from changelogfy
changelogfy.logout();