thelounge/client/js/socket-events/uploads.js
Pavel Djundik ce212e001c Add file uploading support
Co-Authored-By: Max Leiter <hello@maxleiter.com>
Co-Authored-By: Jérémie Astori <astorije@users.noreply.github.com>
2018-09-03 10:30:05 +03:00

11 lines
273 B
JavaScript

"use strict";
const socket = require("../socket");
const wrapCursor = require("undate").wrapCursor;
socket.on("upload:success", (url) => {
const fullURL = new URL(url, location);
const textbox = document.getElementById("input");
wrapCursor(textbox, fullURL, " ");
});