From 4cc29f77f3d27c24aa4f91cf36f09a92c4b8edcd Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 18 Feb 2022 10:53:11 -0500 Subject: [PATCH] fix: remove client-side logic to add `mobile-side-menu` option to user settings page --- public/persona.js | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/public/persona.js b/public/persona.js index 2749c7c..54e5b2a 100644 --- a/public/persona.js +++ b/public/persona.js @@ -379,33 +379,6 @@ $(document).ready(function () { in: config.searchDefaultInQuick, }, }); - - - // add a checkbox in the user settings page - // so users can swap the sides the menus appear on - - function setupSetting() { - if (ajaxify.data.template['account/settings'] && !document.getElementById('persona:menus:legacy-layout')) { - require(['translator'], function (translator) { - translator.translate('[[persona:mobile-menu-side]]', function (translated) { - $('
') - .appendTo('#content .account > .row > div:first-child') - .find('input') - .prop('checked', Storage.getItem('persona:menus:legacy-layout', 'true')) - .change(function (e) { - if (e.target.checked) { - Storage.setItem('persona:menus:legacy-layout', 'true'); - } else { - Storage.removeItem('persona:menus:legacy-layout'); - } - }); - }); - }); - } - } - - $(window).on('action:ajaxify.end', setupSetting); - setupSetting(); }); }