<html>
<head>
<script src="https://cdn.jsdelivr.net/momentjs/2.14.1/moment-with-locales.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Tveeder scroll back</title>
</head>
<body>
<form>
<h1>Tvrn back time</h1>
<p>
<strong>Generate tveeder scrollback links</strong>
</p>
<p>
Dates must be in the format yyyy-mm-dd hh:mm <strong>using 24 hour time</strong> in your local time zone.
</p>
<p>
<label for="from_date">From date </label>
<input id="from_date" />
</p>
<p>
<label for="to_date">To date</label>
<input id="to_date" />
</p>
<p>
<label for="channel">Channel</label>
<select id="channel">
<option value="560">ABC News 24</option>
<option value="561">ABC</option>
<option value="1589">Ten</option>
<option value="1072">Nine</option>
<option value="1328">Seven</option>
<option value="785">SBS 1</option>
<!--
<option value=""></option>
<option value=""></option>
<option value=""></option>
<option value=""></option>
-->
</select>
</p>
<p>
<button id="make_it">Generate tveeder link</button>
</p>
</form>
<p><a id="link" target="_blank">Click here</a></p>
</body>
</html>
var button = document.querySelector( '#make_it' );
var generateDates = function( event ) {
event.preventDefault();
var fromInput = document.querySelector( '#from_date' );
var toInput = document.querySelector( '#to_date' );
var channelInput = document.querySelector( '#channel' );
var linkElement = document.querySelector( '#link' );
var fromTime = moment( fromInput.value ).unix();
var toTime = moment( toInput.value ).unix();
var channel = channelInput.options[channelInput.selectedIndex].value;
var href = "http://www.tveeder.com/" +
channel + "/byrange/?from=" +
fromTime + "&to=" +
toTime;
linkElement.href = href;
};
button.addEventListener( 'click', generateDates );
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. |