From 9f226e4cd21841cd248ba0458346495340ce49ab Mon Sep 17 00:00:00 2001 From: Allen Rabinovich Date: Wed, 4 Dec 2013 09:54:45 -0700 Subject: [PATCH] Add a background switcher function. (imported from commit a9bd0403637c5da04d93c0ff5e1dd0272238f0a6) --- static/js/ui.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/static/js/ui.js b/static/js/ui.js index dad03096a5..dcaf99758e 100644 --- a/static/js/ui.js +++ b/static/js/ui.js @@ -830,6 +830,29 @@ exports.collapse_recipient_group = function (row) { current_msg_list.select_id(message_ids[0]); }; +/* EXPERIMENTS */ + +/* This method allows an advanced user to use the console + * to switch to a different pair of backgrounds for home + * view and narrowed view. It either defaults to a specific + * pair of colors, or allows the user to specify them. + */ +exports.switchBackground = function (homecolor, narrowcolor) { + homecolor = homecolor || "#ffffff"; + narrowcolor = narrowcolor || "#effcff"; + $("#white-background-style").remove(); + $('head').append(''); + return ("Background has been changed"); +}; + +/* END OF EXPERIMENTS */ + $(function () { // NB: This just binds to current elements, and won't bind to elements // created after ready() is called.