From c75771f13d25a817923aea570b1314f57533971a Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Thu, 29 Dec 2016 23:43:10 +0200 Subject: [PATCH] Fix stuff that breaks in jQuery 3 --- client/js/libs/jquery/inputhistory.js | 2 +- client/js/lounge.js | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/client/js/libs/jquery/inputhistory.js b/client/js/libs/jquery/inputhistory.js index add413db..1f5b7bf8 100644 --- a/client/js/libs/jquery/inputhistory.js +++ b/client/js/libs/jquery/inputhistory.js @@ -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); }); diff --git a/client/js/lounge.js b/client/js/lounge.js index 774aeddd..98d1a2f6 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -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; } });