From fe774bce4860904103d88b0d9ae48a9889b98208 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Wed, 29 Jun 2016 20:06:07 -0400 Subject: [PATCH] self-destruct works to Fix #48 --- static/js/websockets.js | 8 ++++++++ templates/index.tmpl | 2 ++ 2 files changed, 10 insertions(+) diff --git a/static/js/websockets.js b/static/js/websockets.js index 996e6a2..12d4e37 100644 --- a/static/js/websockets.js +++ b/static/js/websockets.js @@ -87,4 +87,12 @@ $(document).ready(function() { // updateText(); updateInterval = setInterval(updateText, pollToGetNewestCopyInterval); } + + + $('.postselfdestruct').click(function(event) { + event.preventDefault(); + $('#emit_data').val("self-destruct\n\n"+currentText()); + doneTyping(); + }); + }); diff --git a/templates/index.tmpl b/templates/index.tmpl index 16bb1ce..fa9a5b5 100644 --- a/templates/index.tmpl +++ b/templates/index.tmpl @@ -119,6 +119,7 @@
  • Encrypt
  • Lock
  • +
  • Self-dstruct
  • Erase
  • @@ -240,6 +241,7 @@ + $('.postlock').click(function(event) { var pass1 = ""; var pass2 = "";