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

Help Required: Custom hardcoded text colors #183

Open
websterz opened this issue Mar 8, 2017 · 0 comments
Open

Help Required: Custom hardcoded text colors #183

websterz opened this issue Mar 8, 2017 · 0 comments

Comments

@websterz
Copy link

websterz commented Mar 8, 2017

Hello,
I just started plugin development, and my first plugin is very simple which just replaces all the text messages according to roles, like for admins it will be red and for moderators it will be orange, and for normal users it will be black.

I have following code which adds simple text to the message but i am not able to get the roles of the users who sent message.

I tried different techniques but failed to get roles.

Here is my code, can any body suggest how do i get roles:

var CandyShop = (function(self) { return self; }(CandyShop || {}));

CandyShop.Roles = (function(self, Candy, $) {
	self.init = function init() {			
		$(Candy).on('candy:view.message.before-show', function(e, args) {			
			args.message = args.message+ ' - admin';// + self.Role();			
		});
	};
	return self;
}(CandyShop.Roles || {}, Candy, jQuery));

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant