From bd0551b22076b82a6d49e9f7a2b2e0c90a1b2326 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 05 Feb 2016 07:25:27 -0500
Subject: [PATCH] Secure also downloads of addressbook exports, managesieve script exports and Enigma keys exports

---
 plugins/userinfo/userinfo.js |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/plugins/userinfo/userinfo.js b/plugins/userinfo/userinfo.js
new file mode 100644
index 0000000..5b9c942
--- /dev/null
+++ b/plugins/userinfo/userinfo.js
@@ -0,0 +1,18 @@
+/* Show user-info plugin script */
+
+if (window.rcmail) {
+  rcmail.addEventListener('init', function() {
+    // <span id="settingstabdefault" class="tablink"><roundcube:button command="preferences" type="link" label="preferences" title="editpreferences" /></span>
+    var tab = $('<span>').attr('id', 'settingstabpluginuserinfo').addClass('tablink');
+
+    $('<a>').attr('href', rcmail.env.comm_path + '&_action=plugin.userinfo')
+      .text(rcmail.get_label('userinfo', 'userinfo'))
+      .click(function(e) { return rcmail.command('plugin.userinfo', '', this, e); })
+      .appendTo(tab);
+
+    // add button and register command
+    rcmail.add_element(tab, 'tabs');
+    rcmail.register_command('plugin.userinfo', function() { rcmail.goto_url('plugin.userinfo') }, true);
+  })
+}
+

--
Gitblit v1.9.1