|
233 | 233 | return; |
234 | 234 | } |
235 | 235 |
|
236 | | - LoadQuickSellInformation( element, commodityID, abortController.signal ); |
| 236 | + LoadQuickSellInformation( element, commodityID, description, asset,abortController.signal ); |
237 | 237 | } ); |
238 | 238 | } |
239 | 239 |
|
|
246 | 246 | /** |
247 | 247 | * @param {HTMLElement} element |
248 | 248 | * @param {string} commodityID |
| 249 | + * @param {any} description |
| 250 | + * @param {any} asset |
249 | 251 | * @param {AbortSignal} signal |
250 | 252 | */ |
251 | | - function LoadQuickSellInformation( element, commodityID, signal ) |
| 253 | + function LoadQuickSellInformation( element, commodityID, description, asset, signal ) |
252 | 254 | { |
253 | 255 | const histogramParams = new URLSearchParams(); |
254 | 256 | histogramParams.set( 'country', window.g_rgWalletInfo.wallet_country ); |
|
432 | 434 | rows[ 0 ].after( row ); |
433 | 435 | } |
434 | 436 | } |
| 437 | + |
| 438 | + if( description.commodity ) |
| 439 | + { |
| 440 | + const params = new URLSearchParams(); |
| 441 | + params.set( 'appid', asset.appid ); |
| 442 | + params.set( 'contextid', asset.contextid ); |
| 443 | + params.set( 'items[]', window.GetMarketHashName( description ) ); |
| 444 | + |
| 445 | + const multiSellBtn = document.createElement( 'a' ); |
| 446 | + multiSellBtn.className = 'steamdb_multi_sell'; |
| 447 | + multiSellBtn.href = `https://steamcommunity.com/market/multisell?${params.toString()}`; |
| 448 | + multiSellBtn.textContent = i18n.inventory_sell_multiple; |
| 449 | + element.append( multiSellBtn ); |
| 450 | + } |
435 | 451 | } |
436 | 452 |
|
437 | 453 | element.classList.add( 'steamdb_quicksell_visible' ); |
|
0 commit comments