diff --git a/src/js/darkwire.js b/src/js/darkwire.js index a9f8d68..e344391 100644 --- a/src/js/darkwire.js +++ b/src/js/darkwire.js @@ -11,7 +11,6 @@ export default class Darkwire { this._users = []; this._fileQueue = []; this._keys = {}; - this._autoEmbedImages = false; } getFile(id) { @@ -24,15 +23,6 @@ export default class Darkwire { return file.data; } - get autoEmbedImages() { - return this._autoEmbedImages; - } - - set autoEmbedImages(state) { - this._autoEmbedImages = state; - return this._autoEmbedImages; - } - get keys() { return this._keys; } diff --git a/src/js/main.js b/src/js/main.js index ba820e7..9c4ff0b 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -51,7 +51,6 @@ $(function() { chat.log('WARNING: Your browser is not in incognito mode!', {error: true}); }); } - chat.log(moment().format('MMMM Do YYYY, h:mm:ss a'), {info: true}); darkwire.updateUsername(username).then((socketData) => { chat.chatPage.show(); @@ -194,16 +193,11 @@ $(function() { }); let audioSwitch = $('input.sound-enabled').bootstrapSwitch(); - let autoEmbedImages = $('input.auto-embed-files').bootstrapSwitch(); audioSwitch.on('switchChange.bootstrapSwitch', function(event, state) { darkwire.audio.soundEnabled = state; }); - autoEmbedImages.on('switchChange.bootstrapSwitch', (event, state) => { - darkwire.autoEmbedImages = state; - }); - function handleMessageSending() { let message = chat.inputMessage; let cleanedMessage = cleanInput(message.val()); diff --git a/src/js/window.js b/src/js/window.js index 90f1df5..f972fa1 100644 --- a/src/js/window.js +++ b/src/js/window.js @@ -30,11 +30,14 @@ export default class WindowHandler { } enableFileTransfer() { - if (this.fileHandler.isSupported) { + if (!this.fileHandler.isSupported) { $('#send-file').click((e) => { e.preventDefault(); $('#fileInput').trigger('click'); }); + } else { + $('#send-file').remove(); + $('#fileInput').remove(); } } diff --git a/src/public/style.css b/src/public/style.css index 9c4d41c..606e38b 100644 --- a/src/public/style.css +++ b/src/public/style.css @@ -207,6 +207,7 @@ textarea { bottom: 0; width: 100%; padding-bottom: 10px; + height: 60px; } .inputMessage{ @@ -214,7 +215,7 @@ textarea { color: white !important; border: none; border-top: 1px solid #282828; - height: 60px; + // height: 60px; outline: none; width: 100%; padding: 10px 75px 10px 10px; @@ -227,7 +228,7 @@ textarea { position: fixed; bottom: 0px; right: 0px; - padding: 22px; + padding: 15px; cursor: pointer; } diff --git a/src/views/index.mustache b/src/views/index.mustache index 0d79750..0e10cc6 100644 --- a/src/views/index.mustache +++ b/src/views/index.mustache @@ -103,8 +103,6 @@
Sound

-
Auto-embed images?
-