diff --git a/lib/routes.js b/lib/routes.js index 04b18634..3e13c6a2 100644 --- a/lib/routes.js +++ b/lib/routes.js @@ -43,6 +43,7 @@ module.exports = function (app) { // Set up the routes. app.get('/', binHandler.getDefault); + app.get('/gist/*', binHandler.getDefault); app.post('/', binHandler.getFromPost); // Login/Create account. diff --git a/package.json b/package.json index e4289a9f..c0dd2054 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "name": "jsbin", "description": "Collaborative JavaScript Debugging App", "main": "./lib/app", - "version": "3.0.17", + "version": "3.0.18", "preferGlobal": "true", "homepage": "http://jsbin.com", "bin": "./bin/jsbin", diff --git a/public/css/style.css b/public/css/style.css index 8abbe310..f77a49d2 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1113,6 +1113,11 @@ details li, .details li { width: 260px; } +.modal a { + color: yellow; + text-shadow: none; +} + #login, #register { position: absolute; right: -10px; diff --git a/public/js/chrome/app.js b/public/js/chrome/app.js index e18018ce..1dfc0e7d 100644 --- a/public/js/chrome/app.js +++ b/public/js/chrome/app.js @@ -10,7 +10,7 @@ if (/gist\/\d+/.test(window.location.pathname) && (!sessionStorage.getItem('java if (editors.ready) { loadGist(); } else { - editors.onReady = loadGist; + $document.on('jsbinReady', loadGist); } } diff --git a/public/js/editors/keycontrol.js b/public/js/editors/keycontrol.js index bb260917..f2b94c33 100644 --- a/public/js/editors/keycontrol.js +++ b/public/js/editors/keycontrol.js @@ -5,11 +5,11 @@ var keyboardHelpVisible = false; var customKeys = objectValue('jsbin.settings.keys') || {}; -$('#disablekeys').attr('checked', customKeys.disabled ? true : false).change(function () { +$('#enablealt').attr('checked', customKeys.useAlt ? true : false).change(function () { if (!jsbin.settings.keys) { jsbin.settings.keys = {}; } - jsbin.settings.keys.disabled = this.checked; + jsbin.settings.keys.useAlt = this.checked; }); if (!customKeys.disabled) $body.keydown(keycontrol); @@ -38,8 +38,8 @@ if (/macintosh|mac os x/.test(ua)) { // var closekey = $.browser.platform == 'mac' ? 167 : 192; if (!customKeys.disabled) $document.keydown(function (event) { - var includeAltKey = event.altKey, //customKeys.useAlt ? event.altKey : true, - closekey = customKeys.closePanel ? customKeys.closePanel : 192 + var includeAltKey = customKeys.useAlt ? event.altKey : true, + closekey = customKeys.closePanel ? customKeys.closePanel : 192, $history = $('#history'); if (event.ctrlKey) event.metaKey = true; @@ -103,7 +103,7 @@ function keycontrol(event) { var codePanel = { css: 1, javascript: 1, html: 1}[panel.id], hasRun = false; - var includeAltKey = event.altKey; //objectValue('jsbin.settings.keys.usealt') ? event.altKey : true; + var includeAltKey = customKeys.useAlt ? event.altKey : true; // these should fire when the key goes down if (event.type == 'keydown') { diff --git a/public/js/editors/libraries.js b/public/js/editors/libraries.js index 2c4684d9..2009ada0 100644 --- a/public/js/editors/libraries.js +++ b/public/js/editors/libraries.js @@ -127,8 +127,8 @@ var libraries = [ "group": "Prototype" }, { - "url": "http://yui.yahooapis.com/3.7.3/build/yui/yui-min.js", - "label": "YUI 3.7.3", + "url": "http://yui.yahooapis.com/3.8.0/build/yui/yui-min.js", + "label": "YUI 3.8.0", "group": "YUI" }, { diff --git a/public/js/render/console.js b/public/js/render/console.js index aa37f2c1..f8ae5a9c 100644 --- a/public/js/render/console.js +++ b/public/js/render/console.js @@ -414,7 +414,7 @@ var exec = document.getElementById('exec'), underscore: 'http://documentcloud.github.com/underscore/underscore-min.js', rightjs: 'http://rightjs.org/hotlink/right.js', coffeescript: 'http://jashkenas.github.com/coffee-script/extras/coffee-script.js', - yui: 'http://yui.yahooapis.com/3.7.3/build/yui/yui-min.js' + yui: 'http://yui.yahooapis.com/3.8.0/build/yui/yui-min.js' }, body = document.getElementsByTagName('body')[0], logAfter = null, diff --git a/public/js/render/render.js b/public/js/render/render.js index 5cd5a7fb..58b56f72 100644 --- a/public/js/render/render.js +++ b/public/js/render/render.js @@ -44,7 +44,7 @@ function getPreparedCode(nojs) { re = { docReady: /\$\(document\)\.ready/, shortDocReady: /\$\(function/, - console: /(^.|\b)console\./g, + console: /(^.|\b)console\.(\S+)/g, script: /<\/script/ig, code: /%code%/, title: /(.*)<\/title>/i, @@ -131,9 +131,9 @@ function getPreparedCode(nojs) { // redirect console logged to our custom log while debugging if (re.console.test(source)) { if (jsbin.panels.panels.console.visible) { - source = source.replace(re.console, 'window.top._console.'); + source = source.replace(re.console, 'window.top._console.$2'); } else { - source = source.replace(re.console, 'window.top.console.'); + source = source.replace(re.console, 'window.top.console.$2'); } } diff --git a/views/index.html b/views/index.html index 93c02548..41b10867 100644 --- a/views/index.html +++ b/views/index.html @@ -286,11 +286,11 @@ Include alerts, prompts & confirm boxes">Run with JS</button> </thead> <tbody> <tr> - <td>ctrl + alt + [panel num]</td> + <td>ctrl + [panel num]</td> <td>Show nth panel</td> </tr> <tr> - <td>ctrl + alt + §<br />(or `)</td> + <td>ctrl + §<br />(or `)</td> <td>Hide focused panel</td> </tr> <tr> @@ -330,8 +330,8 @@ Include alerts, prompts & confirm boxes">Run with JS</button> <td>Unindents selected lines</td> </tr> - <tr><td colspan="2"><br>JS Bin also supports <a href="https://github.com/sergeche/zen-coding" target="_blank">Emmet/Zen Coding</a> shortcuts (except tab key)</td></tr> - <tr><td colspan="2"><br><input type="checkbox" id="disablekeys"> Disable all keyboard shortcuts <small>(refresh required)</small></td></tr> + <tr><td colspan="2"><small><br>JS Bin also supports <a href="https://github.com/sergeche/zen-coding" target="_blank">Emmet/Zen Coding</a> shortcuts (except tab key)</small></td></tr> + <tr><td colspan="2"><small><br><input type="checkbox" id="enablealt"> <label for="enablealt">Use "cmd + alt + key" instead of "cmd + key" (refresh required)</label></small></td></tr> </tbody> </table> </div>