summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2018-03-05 10:12:55 -0800
committerAaron Parecki <aaron@parecki.com>2018-03-05 10:12:55 -0800
commitdfa7811da30f6f887812ac6eca34bd6603465099 (patch)
tree1238609d126b00ba46f1ee20c8d84dc34687577f
parent6b62bf3396f742e7ff2a529d608f7e85aeee7a46 (diff)
keyboard shortcut to switch to markdown
-rw-r--r--views/new-post.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/views/new-post.php b/views/new-post.php
index 65c86f0..a2ec757 100644
--- a/views/new-post.php
+++ b/views/new-post.php
@@ -12,7 +12,7 @@
</div>
<div class="reply-context hidden">
<div class="reply-author">
- <img src="" width="48" class="author-img">
+ <img src="" width="48" class="author-img">
</div>
<div class="reply-content">
<img src="" class="post-img hidden">
@@ -218,7 +218,7 @@
position: relative;
overflow: hidden;
- display: inline-block;
+ display: inline-block;
}
#photo-previews img {
position: absolute;
@@ -320,7 +320,7 @@ function restoreNoteState() {
} else {
activateTokenField();
}
- });
+ });
}
function expandReplySection() {
@@ -446,11 +446,16 @@ $(function(){
saveNoteState();
});
- // Easter egg: press ctrl+shift+c to reveal a content type selection
$(document).bind('keydown', function(e){
+ // Easter egg: press ctrl+shift+c to reveal a content type selection
if(e.keyCode == 67 && e.ctrlKey && e.shiftKey) {
$("#content-type-selection").removeClass("hidden");
}
+ // Easter egg: press ctrl+shift+m to switch to markdown
+ if(e.keyCode == 77 && e.ctrlKey && e.shiftKey) {
+ $("#content-type-selection select").val("text/markdown");
+ $("#content-type-selection").removeClass("hidden");
+ }
});
});
@@ -879,7 +884,7 @@ $(function(){
if($("#note_in_reply_to").val() != "") {
$("#note_in_reply_to").change();
} else {
- restoreNoteState();
+ restoreNoteState();
}
});