diff --git a/src/hub.js b/src/hub.js index db26ba4d3fea99f82f7616c663b5ec2486f757e9..665c90e2d63342c0673e189632778ef829a3906f 100644 --- a/src/hub.js +++ b/src/hub.js @@ -309,38 +309,36 @@ const onReady = async () => { spawnMediaInfrontOfPlayer(e.detail); }); - if (qsTruthy("mediaTools")) { - document.addEventListener("paste", e => { - if (e.target.nodeName === "INPUT") return; - - const url = e.clipboardData.getData("text"); - const files = e.clipboardData.files && e.clipboardData.files; - if (url) { - spawnMediaInfrontOfPlayer(url); - } else { - for (const file of files) { - spawnMediaInfrontOfPlayer(file); - } + document.addEventListener("paste", e => { + if (e.target.nodeName === "INPUT") return; + + const url = e.clipboardData.getData("text"); + const files = e.clipboardData.files && e.clipboardData.files; + if (url) { + spawnMediaInfrontOfPlayer(url); + } else { + for (const file of files) { + spawnMediaInfrontOfPlayer(file); } - }); + } + }); - document.addEventListener("dragover", e => { - e.preventDefault(); - }); + document.addEventListener("dragover", e => { + e.preventDefault(); + }); - document.addEventListener("drop", e => { - e.preventDefault(); - const url = e.dataTransfer.getData("url"); - const files = e.dataTransfer.files; - if (url) { - spawnMediaInfrontOfPlayer(url); - } else { - for (const file of files) { - spawnMediaInfrontOfPlayer(file); - } + document.addEventListener("drop", e => { + e.preventDefault(); + const url = e.dataTransfer.getData("url"); + const files = e.dataTransfer.files; + if (url) { + spawnMediaInfrontOfPlayer(url); + } else { + for (const file of files) { + spawnMediaInfrontOfPlayer(file); } - }); - } + } + }); if (!qsTruthy("offline")) { document.body.addEventListener("connected", () => { diff --git a/src/react-components/2d-hud.js b/src/react-components/2d-hud.js index 8bcec6c7137d1a47f8322610fbf3c4891ee1774b..15168e999bd4576f80b0f4242ed60675f4557699 100644 --- a/src/react-components/2d-hud.js +++ b/src/react-components/2d-hud.js @@ -3,7 +3,6 @@ import PropTypes from "prop-types"; import cx from "classnames"; import styles from "../assets/stylesheets/2d-hud.scss"; -import qsTruthy from "../utils/qs_truthy"; const TopHUD = ({ muted, frozen, spacebubble, onToggleMute, onToggleFreeze, onToggleSpaceBubble }) => ( <div className={cx(styles.container, styles.top)}> @@ -40,13 +39,11 @@ TopHUD.propTypes = { const BottomHUD = ({ onCreateObject }) => ( <div className={cx(styles.container, styles.bottom)}> - {qsTruthy("mediaTools") && ( - <div - className={cx("ui-interactive", styles.iconButton, styles.large, styles.createObject)} - title={"Create Object"} - onClick={onCreateObject} - /> - )} + <div + className={cx("ui-interactive", styles.iconButton, styles.large, styles.createObject)} + title={"Create Object"} + onClick={onCreateObject} + /> </div> );