Loading TODO +0 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ tests test in other browsers and add note to README maximum size of a haste fix any annoying visual quirks make twitter posting an option add FAVICON # shared version only Loading static/application.js +6 −3 Original line number Diff line number Diff line Loading @@ -53,13 +53,14 @@ haste_document.prototype.save = function(data, callback) { ///// represents the paste application var haste = function(appName) { var haste = function(appName, options) { this.appName = appName; this.baseUrl = window.location.href; // since this is loaded first this.$textarea = $('textarea'); this.$box = $('#box'); this.$code = $('#box code'); this.configureShortcuts(); this.options = options; }; // Set the page title - include the appName Loading @@ -84,7 +85,9 @@ haste.prototype.fullKey = function() { text += '^s - save<br>'; text += '^n - new<br>'; text += '^d - duplicate<br>'; if (this.options.twitter) { text += '^t - twitter'; } $('#key').html(text); }; Loading Loading @@ -175,7 +178,7 @@ haste.prototype.configureShortcuts = function() { _this.duplicateDocument(); } // ^T for redirecting to twitter else if (_this.doc.locked && evt.ctrlKey && evt.keyCode == 84) { else if (_this.options.twitter && _this.doc.locked && evt.ctrlKey && evt.keyCode == 84) { evt.preventDefault(); window.open('https://twitter.com/share?url=' + encodeURI(_this.baseUrl + _this.doc.key)); } Loading static/index.html +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ <script type="text/javascript"> $(function() { // Set up var app = new haste('haste'); var app = new haste('haste', { twitter: true }); // Handle pops window.onpopstate = function(evt) { var path = evt.target.location.pathname; Loading Loading
TODO +0 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ tests test in other browsers and add note to README maximum size of a haste fix any annoying visual quirks make twitter posting an option add FAVICON # shared version only Loading
static/application.js +6 −3 Original line number Diff line number Diff line Loading @@ -53,13 +53,14 @@ haste_document.prototype.save = function(data, callback) { ///// represents the paste application var haste = function(appName) { var haste = function(appName, options) { this.appName = appName; this.baseUrl = window.location.href; // since this is loaded first this.$textarea = $('textarea'); this.$box = $('#box'); this.$code = $('#box code'); this.configureShortcuts(); this.options = options; }; // Set the page title - include the appName Loading @@ -84,7 +85,9 @@ haste.prototype.fullKey = function() { text += '^s - save<br>'; text += '^n - new<br>'; text += '^d - duplicate<br>'; if (this.options.twitter) { text += '^t - twitter'; } $('#key').html(text); }; Loading Loading @@ -175,7 +178,7 @@ haste.prototype.configureShortcuts = function() { _this.duplicateDocument(); } // ^T for redirecting to twitter else if (_this.doc.locked && evt.ctrlKey && evt.keyCode == 84) { else if (_this.options.twitter && _this.doc.locked && evt.ctrlKey && evt.keyCode == 84) { evt.preventDefault(); window.open('https://twitter.com/share?url=' + encodeURI(_this.baseUrl + _this.doc.key)); } Loading
static/index.html +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ <script type="text/javascript"> $(function() { // Set up var app = new haste('haste'); var app = new haste('haste', { twitter: true }); // Handle pops window.onpopstate = function(evt) { var path = evt.target.location.pathname; Loading