Skip to content

Commit e53fec8

Browse files
committed
ui improvment and adding dynamic ws protocol
1 parent f556877 commit e53fec8

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

src/static/css/main-light.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,12 @@ ul {
581581
.tw-block a {
582582
direction: ltr !important;
583583
}
584+
.tw-block video {
585+
width: 100%;
586+
}
587+
.tw-block iframe {
588+
width: 100%;
589+
}
584590
.article__list {
585591
margin-top: 30px;
586592
text-align: right;

src/static/css/main.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,12 @@ ul {
590590
.tw-block a {
591591
direction: ltr !important;
592592
}
593+
.tw-block video {
594+
width: 100%;
595+
}
596+
.tw-block iframe {
597+
width: 100%;
598+
}
593599
.article__list {
594600
margin-top: 30px;
595601
text-align: right;

src/static/js/ws.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
const socket = new WebSocket("ws://" + window.location.host + "/ws/notifier/");
1+
const protocol = window.location.protocol == "https:" ? "wss://" : "ws://";
2+
const socket = new WebSocket(protocol + window.location.host + "/ws/notifier/");
23
socket.onopen = function open() {
34
console.log("WebSockets connection created.");
45
};

0 commit comments

Comments
 (0)