aboutsummaryrefslogtreecommitdiff
path: root/src/java/com
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2014-07-24 22:20:33 +0700
committerGravatar Ugnich Anton2014-07-24 22:20:33 +0700
commit2b9c93ac6d216b67e95ccc0cfb30bc5f58c9744a (patch)
tree089dd7296b530975fa972481ec8b4603d6d6b2c8 /src/java/com
parentf71af4b67ba2bab9e3db49cf4faef081248077df (diff)
Websocket replies
Diffstat (limited to 'src/java/com')
-rw-r--r--src/java/com/juick/http/www/PageTemplates.java5
-rw-r--r--src/java/com/juick/http/www/UserThread.java13
2 files changed, 14 insertions, 4 deletions
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java
index dabbea99..c64f99dd 100644
--- a/src/java/com/juick/http/www/PageTemplates.java
+++ b/src/java/com/juick/http/www/PageTemplates.java
@@ -51,9 +51,9 @@ public class PageTemplates {
out.println("<!DOCTYPE html>");
out.print("<html>");
out.print("<head>");
- out.print("<link rel=\"stylesheet\" href=\"/style.2014070300.css\"/>");
+ out.print("<link rel=\"stylesheet\" href=\"/style.2014072300.css\"/>");
out.print("<script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js\"></script>");
- out.print("<script type=\"text/javascript\" src=\"/scripts.2014070500.js\"></script>");
+ out.print("<script type=\"text/javascript\" src=\"/scripts.2014071701.js\"></script>");
if (headers != null) {
out.print(headers);
}
@@ -247,6 +247,7 @@ public class PageTemplates {
out.println("m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)");
out.println("})(window,document,'script','//www.google-analytics.com/analytics.js','ga');");
out.println("ga('create','UA-385578-4','juick.com');");
+ out.println("ga('require','displayfeatures');");
out.println("ga('send','pageview');");
if (sapeon) {
diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java
index d2b65b77..c2d7cb14 100644
--- a/src/java/com/juick/http/www/UserThread.java
+++ b/src/java/com/juick/http/www/UserThread.java
@@ -80,6 +80,15 @@ public class UserThread {
out.println("</section>");
PageTemplates.pageFooter(request, out, visitor, false);
+
+ out.println("<script type='text/javascript'>");
+ if (visitor != null && visitor.UID == 1 && msg.User.UID == 1) {
+ out.println("var juickDebug=1;");
+ }
+ out.println("var pageMID=" + msg.MID + ";");
+ out.println("initWS();");
+ out.println("</script>");
+
PageTemplates.pageEnd(out);
} finally {
out.close();
@@ -298,7 +307,7 @@ public class UserThread {
if (msg.User.Banned == false) {
out.println(" <div class=\"msg-header\"><a href=\"/" + msg.User.UName + "/\">@" + msg.User.UName + "</a>:</div>");
} else {
- out.println(" <div class=\"msg-header\">[banned]:</div>");
+ out.println(" <div class=\"msg-header\">[удалено]:</div>");
}
out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.MID + "#" + msg.RID + "\" title=\"" + msg.TimestampString + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.TimestampString) + "</a></div>");
out.println(" <div class=\"msg-txt\">" + PageTemplates.formatMessage(msg.Text) + "</div>");
@@ -344,7 +353,7 @@ public class UserThread {
if (msg.User.Banned == false) {
out.println(" <div class=\"msg-header\"><a href=\"/" + msg.User.UName + "/\">@" + msg.User.UName + "</a>:</div>");
} else {
- out.println(" <div class=\"msg-header\">[banned]:</div>");
+ out.println(" <div class=\"msg-header\">[удалено]:</div>");
}
out.println(" <div class=\"msg-ts\"><a href=\"/" + msg.MID + "#" + msg.RID + "\" title=\"" + msg.TimestampString + " GMT\">" + PageTemplates.formatDate(msg.TimeAgo, msg.TimestampString) + "</a></div>");
out.println(" <div class=\"msg-txt\">" + PageTemplates.formatMessage(msg.Text) + "</div>");