{{logo}}
diff --git a/customize.dist/terms.html b/customize.dist/terms.html
index 4cc2c4b1b..e4e4e1e2a 100644
--- a/customize.dist/terms.html
+++ b/customize.dist/terms.html
@@ -20,13 +20,7 @@
-
diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js
index 87b039e4d..6dffadb97 100644
--- a/www/common/cryptpad-common.js
+++ b/www/common/cryptpad-common.js
@@ -923,6 +923,88 @@ define([
return button;
};
+ // Create a button with a dropdown menu
+ // input is a config object with parameters:
+ // - container (optional): the dropdown container (span)
+ // - text (optional): the button text value
+ // - options: array of {tag: "", attributes: {}, content: "string"}
+ //
+ // allowed options tags: ['a', 'hr', 'p']
+ var createDropdown = common.createDropdown = function (config) {
+ if (typeof config !== "object" || !isArray(config.options)) { return; }
+
+ var allowedTags = ['a', 'p', 'hr'];
+ var isValidOption = function (o) {
+ if (typeof o !== "object") { return false; }
+ if (!o.tag || allowedTags.indexOf(o.tag) === -1) { return false; }
+ return true;
+ };
+
+ // Container
+ var $container = $(config.container);
+ if (!config.container) {
+ $container = $('', {
+ 'class': 'dropdown-bar'
+ });
+ }
+
+ // Button
+ var $button = $('
+