Skip to content
Permalink
Browse files

DEV: Run prettier on files

hopefully I have the right version
  • Loading branch information...
SamSaffron committed Jun 24, 2019
1 parent c15ec21 commit deb7f0dd5d4a58c20c1af5a2c72b660a42245720
@@ -13,19 +13,22 @@ export default {
initialize() {
withPluginApi("0.1", api => {
const usersOnHoliday = Discourse.Site.current().users_on_holiday;
api.decorateCooked(el => {
if (!usersOnHoliday) {
return;
}
api.decorateCooked(
el => {
if (!usersOnHoliday) {
return;
}

usersOnHoliday.forEach(username => {
$(el)
.find(`a.mention[href="/u/${username}"]`)
.not(".on-holiday")
.append(iconHTML("calendar-alt"))
.addClass("on-holiday");
});
}, { id: 'discourse-calendar-holiday-flair' });
usersOnHoliday.forEach(username => {
$(el)
.find(`a.mention[href="/u/${username}"]`)
.not(".on-holiday")
.append(iconHTML("calendar-alt"))
.addClass("on-holiday");
});
},
{ id: "discourse-calendar-holiday-flair" }
);

api.addPosterIcon(cfs => {
const onHoliday = customBool(cfs.on_holiday);
@@ -22,7 +22,10 @@ function stringToHexColor(str) {
function initializeDiscourseCalendar(api) {
let _topicController;

api.decorateCooked(attachCalendar, { onlyStream: true, id: 'discourse-calendar' });
api.decorateCooked(attachCalendar, {
onlyStream: true,
id: "discourse-calendar"
});

api.registerCustomPostMessageCallback("calendar_change", topicController => {
const stream = topicController.get("model.postStream");

0 comments on commit deb7f0d

Please sign in to comment.
You can’t perform that action at this time.