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

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Bookmark

A plugin for Candy Chat to allow managing MUC bookmarks

Usage

Include the JavaScript file:

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

To enable this plugin, add its init method after you init Candy, but before Candy.connect():

CandyShop.Bookmark.init();

When you wish to bookmark a room, simply:

CandyShop.Bookmark.add('someroom@conference.example.com');

If you would like for bookmarks to destroy when the room is closed, add this to your main JS file:

  $(Candy).on('candy:view.room.after-close', function (ev, obj) {
    CandyShop.Bookmark.remove(obj.roomJid);
  });