Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Latest commit

 

History

History

notifications

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Notifications

Send HTML5 Notifications when a message is received and the window is not in focus. This only works with webkit browsers.

Usage

To enable Notifications you have to include its JavaScript code and stylesheet:

<script type="text/javascript" src="candyshop/notifications/candy.js"></script>

Call its init() method after Candy has been initialized:

Candy.init('/http-bind/');

CandyShop.Notifications.init(); 

Candy.Core.connect();

It is possible to configure the Plugin.

CandyShop.Notifications.init({
	notifyNormalMessage: false,		// Send a notification for every message. Defaults to false
	notifyPersonalMessage: true,	// Send a notification if the user is mentioned. (Requires NotfiyMe Plugin) Defaults to true
	closeTime: 3000					// Close notification after X milliseconds. Zero means it doesn't close automaticly. Defaults to 3000
});