From: Luigi Pinca Date: Fri, 1 Mar 2013 18:29:45 +0000 (+0100) Subject: updated jQuery to version 1.9.1 X-Git-Url: https://git.saalbach.dev/?a=commitdiff_plain;h=dd481568a3d1de6d69672e280570fa09b1ed4299;p=binbsis50.git updated jQuery to version 1.9.1 --- diff --git a/package.json b/package.json index 73c53fd..1022196 100644 --- a/package.json +++ b/package.json @@ -24,5 +24,5 @@ "start": "node app.js" }, "subdomain": "binb", - "version": "0.3.5-11" + "version": "0.3.5-12" } diff --git a/public/js/app.js b/public/js/app.js index d1d7df1..4017f6b 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -957,14 +957,12 @@ setVariables(); DOM.modal.modal({keyboard:false, show:false, backdrop:'static'}); DOM.togglechat.click(hideChat); - if ($.browser.mozilla) { - // Block ESC button in firefox (breaks socket connections) - $(document).keypress(function(event) { - if(event.keyCode === 27) { - return false; - } - }); - } + // Prevent Firefox from closing the websocket connection if the ESC key is pressed + $(document).keydown(function(e) { + if (e.keyCode === 27) { + e.preventDefault(); + } + }); socket = io.connect(uri, {'reconnect':false}); socket.on('connect', function() { jplayer = $('#player').jPlayer({ diff --git a/public/js/home.js b/public/js/home.js index e1c9083..98c56ee 100644 --- a/public/js/home.js +++ b/public/js/home.js @@ -1,12 +1,10 @@ (function() { - if ($.browser.mozilla) { - // Block ESC button in firefox (breaks socket connections). - $(document).keypress(function(event) { - if(event.keyCode === 27) { - return false; - } - }); - } + // Prevent Firefox from closing the websocket connection if the ESC key is pressed + $(document).keydown(function(e) { + if (e.keyCode === 27) { + e.preventDefault(); + } + }); $.get('/artworks', function(data) { $('.thumbnail').each(function(index) { var i = index * 6; diff --git a/views/layout.jade b/views/layout.jade index 3f780ff..293ed12 100644 --- a/views/layout.jade +++ b/views/layout.jade @@ -48,7 +48,7 @@ html span.footer-info Powered by block media block scripts - script(src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js") + script(src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js") script(src="/static/js/bootstrap.min.js") script var uvOptions = {}; diff --git a/views/leaderboards.jade b/views/leaderboards.jade index 53b7899..b73a8d3 100644 --- a/views/leaderboards.jade +++ b/views/leaderboards.jade @@ -49,5 +49,5 @@ block sections .loading-block block scripts - script(src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js") + script(src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js") script(src="/static/js/leaderboards.js")