From 17a0dd2a76ea7bc55adde2ec1b0d2c27ee2ca46f Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Fri, 13 Oct 2017 13:32:55 -0700 Subject: [PATCH] Elide long usernames in injected code --- scripts/system/html/js/marketplacesInject.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js index fc16eae8bf..0f4fe58586 100644 --- a/scripts/system/html/js/marketplacesInject.js +++ b/scripts/system/html/js/marketplacesInject.js @@ -193,6 +193,11 @@ var navbarBrandElement = document.getElementsByClassName('navbar-brand')[0]; var purchasesElement = document.createElement('a'); var dropDownElement = document.getElementById('user-dropdown'); + + $('#user-dropdown').find('.username')[0].style = "max-width:80px;white-space:nowrap;overflow:hidden;" + + "text-overflow:ellipsis;display:inline-block;position:relative;top:4px;"; + $('#user-dropdown').find('.caret')[0].style = "position:relative;top:-3px;"; + purchasesElement.id = "purchasesButton"; purchasesElement.setAttribute('href', "#"); purchasesElement.innerHTML = "My Purchases";