diff --git a/static/js/feature_flags.js b/static/js/feature_flags.js index 9672aa0bea..be945d6346 100644 --- a/static/js/feature_flags.js +++ b/static/js/feature_flags.js @@ -48,6 +48,7 @@ exports.clicking_notification_causes_narrow = page_params.staging || is_customer _.contains(['customer25.invalid'], page_params.domain); exports.experimental_background = page_params.staging || _.contains(['mit.edu'], page_params.domain); +exports.full_width = page_params.staging; exports.show_digest_email_setting = page_params.staging; diff --git a/static/js/ui.js b/static/js/ui.js index 1847058712..da9c2211cf 100644 --- a/static/js/ui.js +++ b/static/js/ui.js @@ -851,6 +851,17 @@ exports.switchBackground = function (homecolor, narrowcolor) { return ("Background has been changed"); }; +/* This method allows an advanced user to use the console + * to switch the application to span full width of the browser. + */ +exports.switchToFullWidth = function () { + $("#full-width-style").remove(); + $('head').append(''); + return ("Switched to full width"); +}; + /* END OF EXPERIMENTS */ $(function () { @@ -1624,6 +1635,10 @@ $(function () { exports.switchBackground(); } + if (feature_flags.full_width) { + exports.switchToFullWidth(); + } + // initialize other stuff composebox_typeahead.initialize(); search.initialize();