Loading static/application.css +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ textarea { color: #999; font-size: 13px; font-family: monospace; line-height: 1.3em; } #key em { Loading static/application.js +23 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,26 @@ haste.prototype.setTitle = function(ext) { document.title = title; }; // Show the light key haste.prototype.lightKey = function() { var text = ''; text += '<em>' + this.appName + '</em>'; text += '^s - save<br>'; text += '^n - new'; $('#key').html(text); }; // Show the full key haste.prototype.fullKey = function() { var text = ''; text += '<em>' + this.appName + '</em>'; text += '^s - save<br>'; text += '^n - new<br>'; text += '^d - duplicate<br>'; text += '^t - twitter'; $('#key').html(text); }; // Remove the current document (if there is one) // and set up for a new one haste.prototype.newDocument = function(hideHistory) { Loading @@ -77,6 +97,7 @@ haste.prototype.newDocument = function(hideHistory) { window.history.pushState(null, this.appName, '/'); } this.setTitle(); this.lightKey(); this.$textarea.show('fast', function() { this.focus(); }); Loading @@ -94,6 +115,7 @@ haste.prototype.loadDocument = function(key) { title += ' - ' + ret.language; } _this.setTitle(title); _this.fullKey(); _this.$textarea.val('').hide(); _this.$box.show(); } Loading Loading @@ -123,6 +145,7 @@ haste.prototype.lockDocument = function() { title += ' - ' + ret.language; } _this.setTitle(title); _this.fullKey(); window.history.pushState(null, _this.appName + '-' + ret.key, '/' + ret.key); _this.$textarea.val('').hide(); _this.$box.show(); Loading static/index.html +1 −8 Original line number Diff line number Diff line Loading @@ -32,14 +32,7 @@ <body> <div id="key"> <em>haste</em> ^s - save<br> ^n - new<br> ^d - duplicate<br> ^t - tweet </div> <div id="key"></div> <pre id="box" style="display:none;"><code></code></pre> <textarea spellcheck="false" style="display:none;"></textarea> Loading Loading
static/application.css +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ textarea { color: #999; font-size: 13px; font-family: monospace; line-height: 1.3em; } #key em { Loading
static/application.js +23 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,26 @@ haste.prototype.setTitle = function(ext) { document.title = title; }; // Show the light key haste.prototype.lightKey = function() { var text = ''; text += '<em>' + this.appName + '</em>'; text += '^s - save<br>'; text += '^n - new'; $('#key').html(text); }; // Show the full key haste.prototype.fullKey = function() { var text = ''; text += '<em>' + this.appName + '</em>'; text += '^s - save<br>'; text += '^n - new<br>'; text += '^d - duplicate<br>'; text += '^t - twitter'; $('#key').html(text); }; // Remove the current document (if there is one) // and set up for a new one haste.prototype.newDocument = function(hideHistory) { Loading @@ -77,6 +97,7 @@ haste.prototype.newDocument = function(hideHistory) { window.history.pushState(null, this.appName, '/'); } this.setTitle(); this.lightKey(); this.$textarea.show('fast', function() { this.focus(); }); Loading @@ -94,6 +115,7 @@ haste.prototype.loadDocument = function(key) { title += ' - ' + ret.language; } _this.setTitle(title); _this.fullKey(); _this.$textarea.val('').hide(); _this.$box.show(); } Loading Loading @@ -123,6 +145,7 @@ haste.prototype.lockDocument = function() { title += ' - ' + ret.language; } _this.setTitle(title); _this.fullKey(); window.history.pushState(null, _this.appName + '-' + ret.key, '/' + ret.key); _this.$textarea.val('').hide(); _this.$box.show(); Loading
static/index.html +1 −8 Original line number Diff line number Diff line Loading @@ -32,14 +32,7 @@ <body> <div id="key"> <em>haste</em> ^s - save<br> ^n - new<br> ^d - duplicate<br> ^t - tweet </div> <div id="key"></div> <pre id="box" style="display:none;"><code></code></pre> <textarea spellcheck="false" style="display:none;"></textarea> Loading