2017-05-18 20:08:54 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
const $ = require("jquery");
|
|
|
|
const socket = require("../socket");
|
|
|
|
const helpers_parse = require("../libs/handlebars/parse");
|
|
|
|
|
|
|
|
socket.on("topic", function(data) {
|
|
|
|
const topic = $("#chan-" + data.chan).find(".header .topic");
|
|
|
|
topic.html(helpers_parse(data.topic));
|
2018-01-30 09:38:33 +00:00
|
|
|
// .prop() is safe escape-wise but consider the capabilities of the attribute
|
|
|
|
topic.prop("title", data.topic);
|
2017-05-18 20:08:54 +00:00
|
|
|
});
|