Added inline links settings
This commit is contained in:
parent
2e293ce785
commit
7a0e572100
|
@ -200,6 +200,21 @@
|
|||
Show quits
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<h2>Links and URLs</h2>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="opt">
|
||||
<input type="checkbox" name="thumbnails">
|
||||
Show thumbnails
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="opt">
|
||||
<input type="checkbox" name="links">
|
||||
Show link descriptions
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<h2>Notifications</h2>
|
||||
</div>
|
||||
|
|
|
@ -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"));
|
||||
|
||||
|
|
Loading…
Reference in New Issue