minor improvements I made to the /hack/ pad last night

pull/1/head
ansuz 9 years ago
parent 9f0cc4ed64
commit 284da6a4e9

@ -58,7 +58,7 @@ define([
window.alert("Server Connection Lost"); window.alert("Server Connection Lost");
}; };
var rt = Realtime.start(config); var rt = window.rt = Realtime.start(config);
var cursor = Cursor($textarea[0]); var cursor = Cursor($textarea[0]);
@ -114,13 +114,20 @@ define([
} }
} }
// simulate a keypress so the event goes through..
// prevent default behaviour for tab // prevent default behaviour for tab
e.preventDefault(); e.preventDefault();
rt.bumpSharejs();
break;
default: default:
break; break;
} }
}); });
$textarea.on('change', function () {
rt.bumpSharejs();
});
$run.click(function (e) { $run.click(function (e) {
e.preventDefault(); e.preventDefault();
var content = $textarea.val(); var content = $textarea.val();

Loading…
Cancel
Save