mirror of
https://github.com/toptal/haste-server.git
synced 2024-11-23 12:06:02 +01:00
Merge branch 'raw_icon'
This commit is contained in:
commit
347ba57ad3
@ -140,9 +140,9 @@ textarea {
|
||||
#box2 .function.enabled.duplicate { background-position: -79px center; }
|
||||
#box2 .function.enabled.duplicate:hover { background-position: -79px bottom; }
|
||||
|
||||
#box2 .function.link { background-position: -116px top; }
|
||||
#box2 .function.enabled.link { background-position: -116px center; }
|
||||
#box2 .function.enabled.link:hover { background-position: -116px bottom; }
|
||||
#box2 .function.raw { background-position: -116px top; }
|
||||
#box2 .function.enabled.raw { background-position: -116px center; }
|
||||
#box2 .function.enabled.raw:hover { background-position: -116px bottom; }
|
||||
|
||||
#box2 .function.twitter { background-position: -153px top; }
|
||||
#box2 .function.enabled.twitter { background-position: -153px center; }
|
||||
|
@ -88,7 +88,6 @@ haste_document.prototype.save = function(data, callback) {
|
||||
|
||||
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');
|
||||
@ -124,7 +123,7 @@ haste.prototype.lightKey = function() {
|
||||
|
||||
// Show the full key
|
||||
haste.prototype.fullKey = function() {
|
||||
this.configureKey(['new', 'duplicate', 'twitter', 'link']);
|
||||
this.configureKey(['new', 'duplicate', 'twitter', 'raw']);
|
||||
};
|
||||
|
||||
// Set the key up for certain things to be enabled
|
||||
@ -293,6 +292,17 @@ haste.prototype.configureButtons = function() {
|
||||
_this.duplicateDocument();
|
||||
}
|
||||
},
|
||||
{
|
||||
$where: $('#box2 .raw'),
|
||||
label: 'Just Text',
|
||||
shortcut: function(evt) {
|
||||
return evt.ctrlKey && evt.shiftKey && evt.keyCode === 82;
|
||||
},
|
||||
shortcutDescription: 'control + shift + r',
|
||||
action: function() {
|
||||
window.open('/raw/' + _this.doc.key);
|
||||
}
|
||||
},
|
||||
{
|
||||
$where: $('#box2 .twitter'),
|
||||
label: 'Twitter',
|
||||
|
2
static/application.min.js
vendored
2
static/application.min.js
vendored
File diff suppressed because one or more lines are too long
@ -50,6 +50,7 @@
|
||||
<div class="save function"></div>
|
||||
<div class="new function"></div>
|
||||
<div class="duplicate function"></div>
|
||||
<div class="raw function"></div>
|
||||
<div class="twitter function"></div>
|
||||
</div>
|
||||
<div id="box3" style="display:none;">
|
||||
|
Loading…
Reference in New Issue
Block a user