From 7a0e5721004498f59305aa528aa86dd48b041efe Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Sat, 27 Sep 2014 16:22:34 -0700 Subject: [PATCH] Added inline links settings --- client/index.html | 15 +++++++++++++++ client/js/shout.js | 18 +++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/client/index.html b/client/index.html index cc099501..28418f20 100644 --- a/client/index.html +++ b/client/index.html @@ -200,6 +200,21 @@ Show quits +
+

Links and URLs

+
+
+ +
+
+ +

Notifications

diff --git a/client/js/shout.js b/client/js/shout.js index 8e1c1a5f..f2a6e070 100644 --- a/client/js/shout.js +++ b/client/js/shout.js @@ -277,7 +277,21 @@ $(function() { }); socket.on("toggle", function(data) { - $("#toggle-" + data.id).parent().after(render("toggle", data)); + var toggle = $("#toggle-" + data.id); + toggle.parent().after(render("toggle", data)); + switch (data.type) { + case "link": + if (options.links) { + toggle.click(); + } + break; + + case "image": + if (options.thumbnails) { + toggle.click(); + } + break; + } }); socket.on("users", function(data) { @@ -292,11 +306,13 @@ $(function() { var options = $.extend({ badge: false, join: true, + links: true, mode: true, motd: false, nick: true, notification: true, part: true, + thumbnails: true, quit: true, }, $.cookie("settings"));