aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/client.html6
-rw-r--r--webAO/client.ts30
-rw-r--r--webAO/styles/chatbox/aa.css8
-rw-r--r--webAO/styles/chatbox/acww.css73
-rw-r--r--webAO/styles/chatbox/chat999.css4
-rw-r--r--webAO/styles/chatbox/chatdd.css4
-rw-r--r--webAO/styles/chatbox/chatdr2.css4
-rw-r--r--webAO/styles/chatbox/chatfuture.css4
-rw-r--r--webAO/styles/chatbox/chatplvsaa.css4
-rw-r--r--webAO/styles/chatbox/ddlc.css4
-rw-r--r--webAO/styles/chatbox/dgs.css4
-rw-r--r--webAO/styles/chatbox/ff.css4
-rw-r--r--webAO/styles/chatbox/halla.css4
-rw-r--r--webAO/styles/chatbox/homestuck.css4
-rw-r--r--webAO/styles/chatbox/key.css62
-rw-r--r--webAO/styles/chatbox/legacy.css4
-rw-r--r--webAO/styles/chatbox/n64zelda.css4
-rw-r--r--webAO/styles/chatbox/papermario.css4
-rw-r--r--webAO/styles/chatbox/trilogy.css4
-rw-r--r--webAO/styles/chatbox/whentheycry.css4
-rw-r--r--webAO/styles/chatbox/yakuza.css4
-rw-r--r--webAO/styles/chatbox/yttd.css4
22 files changed, 242 insertions, 5 deletions
diff --git a/public/client.html b/public/client.html
index dfea213..eed53b8 100644
--- a/public/client.html
+++ b/public/client.html
@@ -130,6 +130,12 @@
</div>
</div>
<div id="client_trackstatus"><marquee id="client_trackstatustext">None</marquee></div>
+ <div id="client_clock">
+ <p id="client_clock_month"></p>
+ <p id="client_clock_date"></p>
+ <p id="client_clock_time"></p>
+ <p id="client_clock_weekday"></p>
+ </div>
</div>
</div>
<form onsubmit="return false">
diff --git a/webAO/client.ts b/webAO/client.ts
index 069e323..edd5d13 100644
--- a/webAO/client.ts
+++ b/webAO/client.ts
@@ -38,7 +38,8 @@ let { ip: serverIP, mode, asset, theme } = queryParser() ;
// Unless there is an asset URL specified, use the wasabi one
const DEFAULT_HOST = "http://attorneyoffline.de/base/";
export let AO_HOST = asset || DEFAULT_HOST;
-const THEME = theme || "default";
+let THEME: string = theme || "default";
+let CHATBOX: string;
export let client: Client;
@@ -2536,17 +2537,17 @@ export function setChatbox(style: string) {
const themeselect = <HTMLSelectElement>(
document.getElementById("client_chatboxselect")
);
- const selected_theme = themeselect.value;
+ CHATBOX = themeselect.value;
- setCookie("chatbox", selected_theme);
- if (selected_theme === "dynamic") {
+ setCookie("chatbox", CHATBOX);
+ if (CHATBOX === "dynamic") {
if (chatbox_arr.includes(style)) {
chatbox_theme.href = `styles/chatbox/${style}.css`;
} else {
chatbox_theme.href = "styles/chatbox/aa.css";
}
} else {
- chatbox_theme.href = `styles/chatbox/${selected_theme}.css`;
+ chatbox_theme.href = `styles/chatbox/${CHATBOX}.css`;
}
}
window.setChatbox = setChatbox;
@@ -2562,6 +2563,25 @@ export function resizeChatbox() {
const trackstatus = <HTMLMarqueeElement>(document.getElementById("client_trackstatustext"));
trackstatus.width = (trackstatus.offsetWidth-1)+"px";
+
+
+ //clock
+ const now = new Date();
+ let weekday = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
+ const month = ["January","February","March","April","May","June","July","August","September","October","November","December"];
+ document.getElementById("client_clock_month").innerText = month[now.getMonth()];
+ console.debug(CHATBOX);
+ if (CHATBOX == "acww") {
+ weekday = ["Su","Mo","Tu","We","Th","Fr","Sa"];
+ document.getElementById("client_clock_weekday").innerText = weekday[now.getDay()];
+ document.getElementById("client_clock_date").innerText = now.getDay()+"/"+now.getMonth();
+ document.getElementById("client_clock_time").innerText = now.getHours()+":"+now.getMinutes();
+ } else if (CHATBOX == "key") {
+ weekday = ["Sun.","Mon.","Tue.","Wed.","Thu.","Fri.","Sat."];
+ document.getElementById("client_clock_weekday").innerText = weekday[now.getDay()];
+ document.getElementById("client_clock_date").innerText = String(now.getDay());
+ }
+
}
window.resizeChatbox = resizeChatbox;
diff --git a/webAO/styles/chatbox/aa.css b/webAO/styles/chatbox/aa.css
index 688f199..a504daf 100644
--- a/webAO/styles/chatbox/aa.css
+++ b/webAO/styles/chatbox/aa.css
@@ -139,3 +139,11 @@
right: 0;
}
}
+
+#client_trackstatus {
+ display: none;
+}
+
+#client_clock {
+ display: none;
+} \ No newline at end of file
diff --git a/webAO/styles/chatbox/acww.css b/webAO/styles/chatbox/acww.css
index ffda68b..dd899b9 100644
--- a/webAO/styles/chatbox/acww.css
+++ b/webAO/styles/chatbox/acww.css
@@ -146,4 +146,77 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock_date {
+ position: absolute;
+ width: 13%;
+ height: 4%;
+ right: 0;
+ top: 1%;
+ text-align: left;
+ color: #7d5500;
+ background: linear-gradient(
+ to bottom,
+ #ffef55,
+ #ffef55 20%,
+ #ffcf3c 20%,
+ #ffcf3c 40%,
+ #ffef55 40%,
+ #ffef55 60%,
+ #ffcf3c 60%,
+ #ffcf3c 80%,
+ #ffef55 80%,
+ #ffef55 100%
+ );
+ border: 0.1em solid #ae4500;
+ border-radius: 50%;
+ border-bottom: none;
+ font-weight: bold;
+ padding-left: 1.5em;
+ padding-top: 0.5em;
+}
+
+#client_clock_month {
+ display: none;
+}
+
+#client_clock_weekday {
+ position: absolute;
+ width: 2.5%;
+ height: 3%;
+ right: 1%;
+ top: 2%;
+ color: white;
+ background: #00b63c;
+ background-size: 100% 40%;
+ border: 0.1em solid #00b63c;
+ border-radius: 100%;
+}
+
+#client_clock_time {
+ position: absolute;
+ width: 16%;
+ height: 4%;
+ right: 2%;
+ top: 4%;
+ text-align: center;
+ color: #5d5500;
+ background: linear-gradient(
+ to bottom,
+ rgba(255,255,0,0),
+ rgba(255,255,0,0) 20%,
+ #ffcf3c 20%,
+ #ffcf3c 40%,
+ #ffef55 40%,
+ #ffef55 60%,
+ #ffcf3c 60%,
+ #ffcf3c 80%,
+ #ffef55 80%,
+ #ffef55 100%
+ );
+ border: 0.1em solid #ae4500;
+ border-radius: 50%;
+ border-top: none;
+ padding-top: 0.5em;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/chat999.css b/webAO/styles/chatbox/chat999.css
index 221dced..de20d28 100644
--- a/webAO/styles/chatbox/chat999.css
+++ b/webAO/styles/chatbox/chat999.css
@@ -121,4 +121,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/chatdd.css b/webAO/styles/chatbox/chatdd.css
index dca2390..d1561a4 100644
--- a/webAO/styles/chatbox/chatdd.css
+++ b/webAO/styles/chatbox/chatdd.css
@@ -104,4 +104,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/chatdr2.css b/webAO/styles/chatbox/chatdr2.css
index fdfc426..59b11dc 100644
--- a/webAO/styles/chatbox/chatdr2.css
+++ b/webAO/styles/chatbox/chatdr2.css
@@ -120,4 +120,8 @@
font-family: monospace;
font-size: 1.2em;
white-space: nowrap;
+}
+
+#client_trackstatus {
+ display: fuck;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/chatfuture.css b/webAO/styles/chatbox/chatfuture.css
index 96b124d..cd638f4 100644
--- a/webAO/styles/chatbox/chatfuture.css
+++ b/webAO/styles/chatbox/chatfuture.css
@@ -130,4 +130,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/chatplvsaa.css b/webAO/styles/chatbox/chatplvsaa.css
index af8a09f..a656e9b 100644
--- a/webAO/styles/chatbox/chatplvsaa.css
+++ b/webAO/styles/chatbox/chatplvsaa.css
@@ -106,4 +106,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/ddlc.css b/webAO/styles/chatbox/ddlc.css
index f88b631..0b019fb 100644
--- a/webAO/styles/chatbox/ddlc.css
+++ b/webAO/styles/chatbox/ddlc.css
@@ -127,4 +127,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/dgs.css b/webAO/styles/chatbox/dgs.css
index 82a7699..77b8db0 100644
--- a/webAO/styles/chatbox/dgs.css
+++ b/webAO/styles/chatbox/dgs.css
@@ -136,4 +136,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/ff.css b/webAO/styles/chatbox/ff.css
index 4528ca0..942794b 100644
--- a/webAO/styles/chatbox/ff.css
+++ b/webAO/styles/chatbox/ff.css
@@ -104,4 +104,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/halla.css b/webAO/styles/chatbox/halla.css
index 0814b20..0932937 100644
--- a/webAO/styles/chatbox/halla.css
+++ b/webAO/styles/chatbox/halla.css
@@ -136,4 +136,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/homestuck.css b/webAO/styles/chatbox/homestuck.css
index a41031a..e6eea68 100644
--- a/webAO/styles/chatbox/homestuck.css
+++ b/webAO/styles/chatbox/homestuck.css
@@ -76,4 +76,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/key.css b/webAO/styles/chatbox/key.css
index c269334..50d2bc1 100644
--- a/webAO/styles/chatbox/key.css
+++ b/webAO/styles/chatbox/key.css
@@ -47,6 +47,7 @@
width: 100%;
filter: none;
font-family: "Verdana";
+ transition: height 1s linear;
}
#client_chatdecoration {
@@ -137,4 +138,65 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ position: absolute;
+ top: 1%;
+ left: 1%;
+ width: 12%;
+ height: 15%;
+ background-color: #d59a9a;
+ border: #ffbe9f 3px ridge;
+ border-radius: 100%;
+}
+
+#client_clock_month {
+ position: absolute;
+ width: 90%;
+ height: 15%;
+ left: 5%;
+ top: 8%;
+ margin: 0;
+ color: #52443c;
+ background: #ffb183;
+ border: 2px white outset;
+ border-radius: 100%;
+ text-shadow: -1px -1px 0 #d7e5d9, 1px -1px 0 #d7e5d9, -1px 1px 0 #d7e5d9, 1px 1px 0 #d7e5d9;
+ font-size: small;
+ line-height: 1;
+}
+
+#client_clock_date {
+ position: absolute;
+ width: 50%;
+ height: 50%;
+ left: 25%;
+ top: 25%;
+ margin: 0;
+ color: #fdf5e4;
+ text-shadow: -1px -1px 0 #78320b, 1px -1px 0 #78320b, -1px 1px 0 #78320b, 1px 1px 0 #78320b;
+ font-size: 3em;
+}
+
+#client_clock_weekday {
+ position: absolute;
+ width: 25%;
+ height: 25%;
+ right: 0;
+ bottom: 0;
+ margin: 0;
+ color: gray;
+ text-shadow: -1px -1px 0 darkgray, 1px -1px 0 darkgray, -1px 1px 0 darkgray, 1px 1px 0 darkgray;
+ text-decoration: underline;
+ font-size: smaller;
+ font-weight: bold;
+ background-color: #c7856f;
+ border: #ffc89f 3px ridge;
+ border-radius: 100%;
+ line-height: 2;
+}
+
+#client_clock_time {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/legacy.css b/webAO/styles/chatbox/legacy.css
index 52fabf9..debbcb3 100644
--- a/webAO/styles/chatbox/legacy.css
+++ b/webAO/styles/chatbox/legacy.css
@@ -90,4 +90,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/n64zelda.css b/webAO/styles/chatbox/n64zelda.css
index 59279e2..35187f0 100644
--- a/webAO/styles/chatbox/n64zelda.css
+++ b/webAO/styles/chatbox/n64zelda.css
@@ -110,4 +110,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/papermario.css b/webAO/styles/chatbox/papermario.css
index ab62f26..587fcd1 100644
--- a/webAO/styles/chatbox/papermario.css
+++ b/webAO/styles/chatbox/papermario.css
@@ -94,4 +94,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/trilogy.css b/webAO/styles/chatbox/trilogy.css
index 927cfb8..05b98b7 100644
--- a/webAO/styles/chatbox/trilogy.css
+++ b/webAO/styles/chatbox/trilogy.css
@@ -113,4 +113,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/whentheycry.css b/webAO/styles/chatbox/whentheycry.css
index 7fd611a..1a08e27 100644
--- a/webAO/styles/chatbox/whentheycry.css
+++ b/webAO/styles/chatbox/whentheycry.css
@@ -107,4 +107,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/yakuza.css b/webAO/styles/chatbox/yakuza.css
index 0da74fa..40da26c 100644
--- a/webAO/styles/chatbox/yakuza.css
+++ b/webAO/styles/chatbox/yakuza.css
@@ -104,4 +104,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file
diff --git a/webAO/styles/chatbox/yttd.css b/webAO/styles/chatbox/yttd.css
index 1ec9c7d..b6bebc7 100644
--- a/webAO/styles/chatbox/yttd.css
+++ b/webAO/styles/chatbox/yttd.css
@@ -115,4 +115,8 @@
#client_trackstatus {
display: none;
+}
+
+#client_clock {
+ display: none;
} \ No newline at end of file