thelounge/client/js/socket.js
2019-11-25 20:12:59 +02:00

12 lines
294 B
JavaScript

"use strict";
const io = require("socket.io-client");
const socket = io({
transports: JSON.parse(document.body.dataset.transports),
path: window.location.pathname + "socket.io/",
autoConnect: false,
reconnection: !document.body.classList.contains("public"),
});
module.exports = socket;