Merge branch 'master' into upload-limit

This commit is contained in:
Tom Ashworth 2012-12-31 13:51:49 +00:00
commit 3c7a8f04f2
9 changed files with 23 additions and 17 deletions

View File

@ -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.

View File

@ -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",

View File

@ -1113,6 +1113,11 @@ details li, .details li {
width: 260px;
}
.modal a {
color: yellow;
text-shadow: none;
}
#login, #register {
position: absolute;
right: -10px;

View File

@ -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);
}
}

View File

@ -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') {

View File

@ -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"
},
{

View File

@ -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,

View File

@ -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>(.*)<\/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');
}
}

View File

@ -286,11 +286,11 @@ Include alerts, prompts &amp; 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 &amp; 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>