From f76b50943095bf96fdf5fd32aad775bb5ebc421f Mon Sep 17 00:00:00 2001 From: calzoneman Date: Tue, 30 Apr 2013 11:15:03 -0500 Subject: [PATCH] Pressing enter on media URL queues next --- package.json | 2 +- server.js | 2 +- www/assets/js/client.js | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c3445db1..5a3f9bcf 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Calvin Montgomery", "name": "CyTube", "description": "Online media synchronizer and chat", - "version": "1.5.1", + "version": "1.5.2", "repository": { "url": "http://github.com/calzoneman/sync" }, diff --git a/server.js b/server.js index c67c721f..23ffa9c7 100644 --- a/server.js +++ b/server.js @@ -9,7 +9,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -const VERSION = "1.5.1"; +const VERSION = "1.5.2"; var fs = require("fs"); var Logger = require("./logger.js"); diff --git a/www/assets/js/client.js b/www/assets/js/client.js index 20ab3f7c..5eb74724 100644 --- a/www/assets/js/client.js +++ b/www/assets/js/client.js @@ -161,7 +161,7 @@ setInterval(function() { sendVideoUpdate(); }, 5000); -$("#queue_end").click(function() { +function queueEnd() { var urls = $("#mediaurl").val().split(","); for(var i = 0; i < urls.length; i++) { if(!urls[i].trim()) @@ -178,6 +178,12 @@ $("#queue_end").click(function() { type: type }); } +} +$("#queue_end").click(queueEnd); +$("#mediaurl").keydown(function(ev) { + if(ev.keyCode == 13) { + queueEnd(); + } }); $("#queue_next").click(function() {