From f4e5ab2d4ec9f31b5e29dde3c47e8a1cb98aa0d6 Mon Sep 17 00:00:00 2001 From: boke0 Date: Sat, 13 Mar 2021 01:22:00 +0900 Subject: [PATCH] [fix] --- kyokusui/main.py | 1 + kyokusui/templates/thread.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kyokusui/main.py b/kyokusui/main.py index 0b4d9e6..cc2890f 100644 --- a/kyokusui/main.py +++ b/kyokusui/main.py @@ -7,6 +7,7 @@ from .model import Board, Thread, Res, Permission from .utils import hiroyuki + class App(App): name = 'Kyokusui' description = '業務用便所の落書き' diff --git a/kyokusui/templates/thread.html b/kyokusui/templates/thread.html index 98de4cb..48b7c8e 100644 --- a/kyokusui/templates/thread.html +++ b/kyokusui/templates/thread.html @@ -89,7 +89,7 @@ const textarea = document.querySelector("#message") const image_form = document.querySelector("#image") const image2send = document.querySelector("#image2send") -const ws = new WebSocket("{{ fullurl(request, "/api/v0/board/" + board._id + "/" + thread._id + "/socket", scheme="ws") }}") +const ws = new WebSocket("{{ fullurl(request, "/api/v0/board/" + board._id + "/" + thread._id + "/socket", scheme="ws" if request.scheme == "http" else "wss") }}") image_form.onchange = async e => { const files = await Promise.all(Array.from(e.target.files).map(f => { return new Promise((resolve, reject) => {