diff --git a/views/new-post.php b/views/new-post.php index 9f2ffca..65c86f0 100644 --- a/views/new-post.php +++ b/views/new-post.php @@ -47,6 +47,14 @@ + +
@@ -438,6 +446,13 @@ $(function(){ saveNoteState(); }); + // Easter egg: press ctrl+shift+c to reveal a content type selection + $(document).bind('keydown', function(e){ + if(e.keyCode == 67 && e.ctrlKey && e.shiftKey) { + $("#content-type-selection").removeClass("hidden"); + } + }); + }); function refreshPhotoPreviews() { @@ -730,6 +745,11 @@ $(function(){ } } + if(!$("#content-type-selection").hasClass("hidden")) { + entry['p3k-content-type'] = $("#note_content_type").val(); + formData.append('p3k-content-type', $("#note_content_type").val()); + } + // Need to append a placeholder field because if the file size max is hit, $_POST will // be empty, so the server needs to be able to recognize a post with only a file vs a failed one. // This will be stripped by Quill before it's sent to the Micropub endpoint