<html>
<head>
<script src="//cdnjs.cloudflare.com/ajax/libs/knockout/3.0.0/knockout-min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<a href="https://github.com/n11/mongo-cli-nodejs"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a>
<h1>Chat <button data-bind=" visible: !email(), click: openIdPopup" title="change in console openid='another provider' if you need">Sign in</button><span data-bind="visible: !!email()"><b data-bind="text: email"></b> <button data-bind="click: logout">Logout</button></span></h1>
<form data-bind='submit: add'>
<button type="submit" >add a room</button><input data-bind="value:roomToAdd">
</form>
<div id=chats data-bind="foreach: chats">
<div class="chat">
<div class="top">
<b data-bind="text: $data.room" class='msg'></b> <a href='#' data-bind='click: $data.rem'>remove</a>
</div>
<form class="top" style="margin: 20px 2px 2px;" data-bind="submit: $data.postNew">
<input data-bind="value: $data.msg">
<input data-bind="value: $data._canRead, visible:!!$parent.email()" placeholder="share with (emails)" title="share with (emails)">
<button type="submit">Send</button>
</form>
<div class="middle">
<ul data-bind="foreach: $data.items">
<li><span data-bind="message: $data.msg"></span>
<span data-bind="text: $data._canRead?($data._canRead.length?'- ':'')+$data._canRead.join(', '):''" class='msg'></span>
<span><a href='#' data-bind='click: $parent.remove'>delete</a></span></li>
</ul>
</div>
</div>
</div>
</body>
</html>
Output
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |