From 089d2b715f30e0161a60b1eaa650a5ccef29b4fb Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Tue, 16 Jul 2024 14:22:19 +0300 Subject: [PATCH] Use flexbox for the buttons --- code.user.js | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/code.user.js b/code.user.js index 40b6347..d1f3689 100644 --- a/code.user.js +++ b/code.user.js @@ -2157,26 +2157,28 @@ var showMiscOptions = appId == 753; var TF2 = appId == 440; - var sellButtons = $('
' + - 'Sell All Items' + - 'Sell All Duplicate Items' + - '' + - '' + + var sellButtons = $('
' + + 'Sell All Items' + + 'Sell All Duplicate Items' + + '' + + '' + (showMiscOptions ? - 'Sell All Cards' + - '
' + - '' + - 'Turn All Duplicate Items Into Gems' + - '' + + 'Sell All Cards' + + '' : '') + - (TF2 ? 'Sell All Crates' : '') + + (TF2 ? 'Sell All Crates' : '') + '
'); var reloadButton = $('Reload Inventory'); - $('#inventory_logos')[0].style.height = 'auto'; + const logo = $('#inventory_logos')[0]; + logo.style.height = 'auto'; + logo.style.maxHeight = 'unset'; $('#inventory_applogo').hide(); // Hide the Steam/game logo, we don't need to see it twice. $('#inventory_applogo').after(logger); @@ -3678,7 +3680,8 @@ '.inventory_item_price { top: 0px;position: absolute;right: 0;background: #3571a5;padding: 2px;color: white; font-size:11px; border: 1px solid #666666;}' + '.separator-large {display:inline-block;width:6px;}' + '.separator-small {display:inline-block;width:1px;}' + - '.separator-btn-right {margin-right:12px;}' + + '.see_inventory_buttons {display:flex;flex-wrap:wrap;gap:10px;}' + + '.see_inventory_buttons > .see_inventory_buttons {flex-basis: 100%;}' + '.pagination { padding-left: 0px; }' + '.pagination li { display:inline-block; padding: 5px 10px;background: rgba(255, 255, 255, 0.10); margin-right: 6px; border: 1px solid #666666; }' + '.pagination li.active { background: rgba(255, 255, 255, 0.25); }');