summaryrefslogtreecommitdiff
path: root/static/js
diff options
context:
space:
mode:
Diffstat (limited to 'static/js')
-rw-r--r--static/js/admin.js17
-rw-r--r--static/js/invalid_domains.js2
-rw-r--r--static/js/pichat.js24
3 files changed, 39 insertions, 4 deletions
diff --git a/static/js/admin.js b/static/js/admin.js
index e54368c..fc18685 100644
--- a/static/js/admin.js
+++ b/static/js/admin.js
@@ -102,4 +102,19 @@ Admin.cancelMute = function(id, nick) {
buttons: { 'OK': submit , 'Cancel': close }
});
html.dialog('open');
-} \ No newline at end of file
+}
+
+
+/*
+$('.msgDiv').live('mouseenter', function() {
+ $(this).css({'border': '1px dotted red',
+ 'margin': '-1' });
+})
+
+$('.msgDiv').live('mouseleave', function() {
+ $(this).css({'border': 'none',
+ 'margin': '0'});
+})
+
+
+*/ \ No newline at end of file
diff --git a/static/js/invalid_domains.js b/static/js/invalid_domains.js
index e0159d0..7f9dd45 100644
--- a/static/js/invalid_domains.js
+++ b/static/js/invalid_domains.js
@@ -65,6 +65,8 @@ var InvalidDomains = [
"http://geneology2.com",
"http://www.geneology2.com",
"http://img.waffleimages.com",
+ "http://www.worldofstock.com",
+ "http://aphrodite.cooltext.com",
"http://www.onemetal.com",
"http://static.funnyjunk.com",
"http://www.whimsical-wits.com",
diff --git a/static/js/pichat.js b/static/js/pichat.js
index 62cf52e..a236ba0 100644
--- a/static/js/pichat.js
+++ b/static/js/pichat.js
@@ -18,7 +18,7 @@ Imgs = {
}
Anim = {
- "chatThumbBig": {"width": "27px", "height": "27px", "right": "0px", "bottom": "2px"},
+ "chatThumbBig": {"width": "54px", "height": "54px", "right": "0px", "bottom": "2px"},
"chatThumbTiny": {"width": "8px", "height": "8px", "right": "8px", "bottom": "8px"},
"chatThumb": {"width": "16px", "height": "16px", "right": "4px", "bottom": "4px"},
"logThumb": {"width": "27px", "height": "27px", "marginRight": "0px", "marginTop": "0px"},
@@ -199,10 +199,10 @@ function buildMessageDiv(msg, isLoading) {
var loadingClass = isLoading ? ' loading' : '';
var containsImageClass = LastMsgContainsImage ? ' contains-image' : '';
return '<div class="msgDiv dump ' + loadingClass + containsImageClass + '" ' + msgId + '>'
- + '<span class="nick"><b><a href="http://dump.fm/' + nick + ' ">' + nick + '</a></b>'
+ + '<span class="nick"><b><a href="http://dump.fm/' + nick + ' " target="_blank">' + nick + '</a></b>'
+ ' <img src="'+Imgs.chatThumbDot+'" class="chat-thumb" onclick="Tag.favorite(this)"> '
+ '</span>'
- + buildMsgContent(msg.content)
+ + '<span class="content">' + buildMsgContent(msg.content) + '</span>'
+ '</div>';
}
@@ -1032,3 +1032,21 @@ function startTitleUpdater() {
$(function() {
OrigTitle = $('title').text();
});
+
+
+$('.msgDiv').live('click', function(e) {
+ var tagName = e.target.tagName;
+ if (tagName == 'A' || tagName == 'IMG') {
+ return;
+ }
+ var wasFavorited = $(this).hasClass("favorite");
+ var button = $(this).find('.chat-thumb');
+ if (wasFavorited) {
+ $(button).attr("src", Imgs.chatThumbOff);
+ } else {
+ $(button).attr("src", Imgs.chatThumbBig);
+ $(button).stop().animate(Anim.chatThumbBig, 'fast').animate(Anim.chatThumb, 'fast', 'swing');
+ }
+ Tag.favorite(button);
+ return false;
+});