Fix stuff that breaks in jQuery 3

This commit is contained in:
Pavel Djundik 2016-12-29 23:43:10 +02:00
parent d9cde04af6
commit c75771f13d
2 changed files with 4 additions and 8 deletions

View file

@ -20,7 +20,7 @@ import jQuery from "jquery";
);
var self = this;
if (self.size() > 1) {
if (self.length > 1) {
return self.each(function() {
$(this).history(options);
});

View file

@ -300,10 +300,6 @@ $(function() {
text.html(templates.actions[type](data.msg));
}
if (text.find("i").size() === 1) {
text = text.find("i");
}
if ((type === "message" || type === "action") && chan.hasClass("channel")) {
var nicks = chan.find(".users").data("nicks");
if (nicks) {
@ -1095,13 +1091,13 @@ $(function() {
contextMenu.on("click", ".context-menu-item", function() {
switch ($(this).data("action")) {
case "close":
$(".networks .chan[data-target=" + $(this).data("data") + "] .close").click();
$(".networks .chan[data-target='" + $(this).data("data") + "'] .close").click();
break;
case "chan":
$(".networks .chan[data-target=" + $(this).data("data") + "]").click();
$(".networks .chan[data-target='" + $(this).data("data") + "']").click();
break;
case "user":
$(".channel.active .users .user[data-name=" + $(this).data("data") + "]").click();
$(".channel.active .users .user[data-name='" + $(this).data("data") + "']").click();
break;
}
});