File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 3232 "matches" : [" *://*.steamcommunity.com/tradeoffer/*" ],
3333 "js" : [" src/lib/page_scripts/trade_offer.js" ],
3434 "css" : [" src/global.css" ]
35+ },
36+ {
37+ "matches" : [" *://*.steamcommunity.com/*/tradeoffers/*" ],
38+ "js" : [" src/lib/page_scripts/trade_offers.js" ],
39+ "css" : [" src/global.css" ]
3540 }
3641 ],
3742 "background" : {
Original file line number Diff line number Diff line change 1+ import { html } from 'lit' ;
2+
3+ import { CustomElement , InjectBefore , InjectionMode } from '../injectors' ;
4+ import { FloatElement } from '../custom' ;
5+ import '../common/ui/steam-button' ;
6+ import { cache } from 'decorator-cache-getter' ;
7+
8+ @CustomElement ( )
9+ @InjectBefore ( '.tradeoffer .tradeoffer_items_ctn' , InjectionMode . CONTINUOUS )
10+ export class ShowTradeOfferId extends FloatElement {
11+ @cache
12+ get tradeOfferID ( ) : string {
13+ const rawId = $J ( this ) . parent ( ) . attr ( 'id' ) ;
14+ if ( ! rawId ) {
15+ return '' ;
16+ }
17+
18+ return rawId . replace ( 'tradeofferid_' , '' ) ;
19+ }
20+
21+ async connectedCallback ( ) {
22+ super . connectedCallback ( ) ;
23+ }
24+
25+ render ( ) {
26+ return html ` < span > Trade Offer ID: ${ this . tradeOfferID } </ span > ` ;
27+ }
28+ }
Original file line number Diff line number Diff line change 1+ import { init } from './utils' ;
2+ import '../components/trade_offers/offer_id' ;
3+
4+ init ( 'src/lib/page_scripts/trade_offers.js' , main ) ;
5+
6+ function main ( ) { }
You can’t perform that action at this time.
0 commit comments