summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rwxr-xr-xstatic/css/dump.css78
-rw-r--r--static/js/invalid_domains.js3
-rw-r--r--static/js/pichat.js61
3 files changed, 116 insertions, 26 deletions
diff --git a/static/css/dump.css b/static/css/dump.css
index 55e3130..27bf99a 100755
--- a/static/css/dump.css
+++ b/static/css/dump.css
@@ -1733,11 +1733,11 @@ font-size:12px;
position:absolute;
top:0px;
background-color:red;
-padding:5px;
-right:0px;
- border-bottom-left-radius:5px;
- -webkit-border-bottom-left-radius:5px;
- -moz-border-radius-bottomleft:5px;
+padding:3px;
+left:0px;
+ border-bottom-right-radius:5px;
+ -webkit-border-bottom-right-radius:5px;
+ -moz-border-radius-bottomright:5px;
}
#dashadminmute a{color:white;}
#edit-toggle{
@@ -1799,7 +1799,9 @@ margin-left:230px;
font-family: 'HelveticaNeue-Light','Helvetica Neue Light','Helvetica Neue',Arial,Helvetica,sans-serif;
font-size:50px;
letter-spacing:-2px;
+display:inline-black;
margin-bottom:10px;
+height:45px;word-wrap:suppress;
}
#middash h3{
@@ -1845,6 +1847,9 @@ width:550px;
max-height:100px;
height: expression(this.width > 50 ? 50: true);
max-width:150px;
+ box-shadow: -1px 1px 10px #000;
+ -webkit-box-shadow:-1px 1px 10px #000;
+ -moz-box-shadow: -1px 1px 10px #000;
}
@@ -2161,3 +2166,66 @@ color:#000; text-shadow: 0px 1px 0px #fff;
margin-left:20px;color:#66AACC;
font-size:11px;
}
+/*MESSAGE STUFF*/
+
+
+a.msgbtn {
+
+ padding:5px;
+top:-7px;
+right:-1px;
+font-weight:500;
+ position: absolute;
+ font-size: 12.5px;
+ background: #fff;
+ color: #000;
+border: 1px dotted #0C8FFF;
+ text-align: center;
+font-family: Monaco, "Courier New", Courier, monospace;
+ cursor: pointer;
+ margin-left: 50px;
+ margin-top:6px;
+
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ text-decoration: none;
+ border-bottom-left-radius:5px;
+ -webkit-border-bottom-left-radius:5px;
+ -moz-border-radius-bottomleft:5px;
+
+}
+a.msgbtn:active {
+ background:#eee;
+
+}
+#directmsgs {
+ position: fixed;
+ right: -262px;
+ width: 245px;
+padding:7px;
+ background-image:url("/static/img/thumbs/stripes.gif");
+border: 1px dotted #0C8FFF;
+top:50px;
+background-color:#fff;
+ height: 90%;
+ overflow-x: hidden;
+
+}
+#directmsgs img{
+ max-width:220px;
+ width: expression(this.width > 650 ? 650: true);
+ max-height:400px;
+ height: expression(this.width > 400 ? 400: true);
+margin:5px;
+ box-shadow: -1px 1px 10px #000;
+ -webkit-box-shadow:-1px 1px 10px #000;
+ -moz-box-shadow: -1px 1px 10px #000;
+
+}
+#directmsgs h2{
+padding-bottom:10px;
+ font-family: Monaco, "Courier New", Courier, monospace;
+ font-weight: 100;
+font-size:15px;
+}
+#singlemsg{padding:5px;} \ No newline at end of file
diff --git a/static/js/invalid_domains.js b/static/js/invalid_domains.js
index ea1c1c5..a9ce909 100644
--- a/static/js/invalid_domains.js
+++ b/static/js/invalid_domains.js
@@ -87,5 +87,6 @@ var InvalidDomains = [
"http://carsdriveingallery.com",
"http://xxxspacegirls.us",
"http://www.newlog.com.ar",
- "villagephotos.com"
+ "villagephotos.com",
+ "hereticpress.com"
];
diff --git a/static/js/pichat.js b/static/js/pichat.js
index a33209b..884e01f 100644
--- a/static/js/pichat.js
+++ b/static/js/pichat.js
@@ -120,6 +120,7 @@ Log.initialize();
URLRegex = /((\b(http\:\/\/|https\:\/\/|ftp\:\/\/)|(www\.))+(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi;
PicRegex = /\.(jpg|jpeg|png|gif|bmp|svg|fid)$/i;
RecipRegex = /(^|\s)@\w+/g;
+TopicRegex = /(^|\s)#\w+/g;
function getImagesAsArray(text) {
@@ -135,24 +136,44 @@ function getImagesAsArray(text) {
return imgs
}
-function linkify(text, recips) {
- LastMsgContainsImage = false;
- var recipWrapper = function(text) { return recipientReplace(text, recips); };
- return text.replace(URLRegex, linkReplace).replace(RecipRegex, recipWrapper);
+function topicReplace(text) {
+ text = $.trim(text).toLowerCase();
+ var topicLabel = text.substring(1);
+ return ' <a target="_blank" href="http://dump.fm/t/' + topicLabel + '">' + text + '</a> ';
}
function recipientReplace(atText, recips) {
+ recips = recips || [];
+
+ var space = '';
if (atText[0] == ' ') {
atText = atText.slice(1);
- var space = ' ';
- } else {
- var space = '';
+ space = ' ';
}
- var nick = atText.slice(1);
- if (!recips || recips.indexOf(nick.toLowerCase()) == -1) {
+
+ var nick = atText.slice(1).toLowerCase();
+ var matchedRecip;
+ for (var i = 0; i < recips.length; i++) {
+ if (recips[i].toLowerCase() == nick) {
+ matchedRecip = recips[i];
+ break;
+ }
+ }
+
+ if (matchedRecip) {
+ return space + '<a target="_blank" href="http://dump.fm/' + matchedRecip + '">@' + matchedRecip + '</a>';
+ } else {
return space + atText;
- } else
- return space + '<a target="_blank" href="/' + nick + '">' + atText + '</a>';
+ }
+}
+
+function linkify(text, recips) {
+ LastMsgContainsImage = false;
+ var recipWrapper = function(text) { return recipientReplace(text, recips); };
+ return text
+ .replace(URLRegex, linkReplace)
+ .replace(RecipRegex, recipWrapper)
+ .replace(TopicRegex, topicReplace);
}
// use this in escapeHtml to turn everyone's text lIkE tHiS
@@ -330,7 +351,7 @@ function setImgsEnable() {
function buildMsgContent(content, recips) {
if (content.substr(0,6) == "<safe>")
- return content.substr(6,content.length - 13)
+ return content.substr(6,content.length - 13);
else return linkify(escapeHtml(content), recips);
}
@@ -363,7 +384,7 @@ function buildUserDiv(user) {
+ escapeHtml(user.nick) + '</a></div>';
} else {
return '<div class="username">'
- + '<a href="/' + escapeHtml(user.nick) + '" target="_blank">'
+ + '<a href="http://dump.fm/' + escapeHtml(user.nick) + '" target="_blank">'
+ '<img src="/static/img/noinfo.png" width="50" height="50">'
+ escapeHtml(user.nick) + '</a></div>';
}
@@ -373,7 +394,7 @@ function buildUserDiv(user) {
function buildFav(f) {
var h = '<div class="fav-note">'
- + '<img src="/static/img/thumbs/chatheartover.gif">'
+ + '<img src="http://dump.fm/static/img/thumbs/chatheartover.gif">'
+ '<a href="http://dump.fm/' + f.from + '">' + f.from + '</a>'
+ '&nbsp;<span>just faved you!</span>'
+ '</div>';
@@ -712,7 +733,7 @@ function enableProfileEdit() {
activateProfileEditable();
}
-function initProfile() {
+function initProfile(recips) {
Search.initInpage();
$(".linkify-text").each(function() {
var text = jQuery(this).text();
@@ -720,7 +741,7 @@ function initProfile() {
});
$(".linkify-full").each(function() {
- $(this).html(buildMsgContent($(this).text(), Recips));
+ $(this).html(buildMsgContent($(this).text(), recips));
});
$('#edit-toggle').click(enableProfileEdit);
@@ -732,11 +753,11 @@ function initProfile() {
});
};
-function initLog() {
- Search.initInpage()
+function initLog(recips) {
+ Search.initInpage();
$('.logged-dump .content').each(function() {
var t = $(this);
- t.html(buildMsgContent(t.text()));
+ t.html(buildMsgContent(t.text(), recips));
});
initLogThumb(".logged-dump .thumb", '.dump');
}
@@ -797,7 +818,7 @@ function paletteToChat(img){
chatText += " "
chatText += $(img).attr("src") + " "
$("#msgInput").val(chatText)
- $("#msgInput").focus().val($("#msgInput").val()) //http://stackoverflow.com/questions/1056359/
+ $("#msgInput").focus().val($("#msgInput").val()) // http://stackoverflow.com/questions/1056359/
paletteHide()
}