Skip to content

Commit 4a6d418

Browse files
committed
Add: Activate watchlist button integration
- Load watchlistButton.js in manifest content_scripts - Call watchlistButton.display() after float display is created - Adds '👁️ Add to Watchlist' button to all items with float data Users can now add items to their SteamLedger watchlist directly from Steam!
1 parent 5464681 commit 4a6d418

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

content.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1205,8 +1205,13 @@ function initializeInventoryChecker() {
12051205
}
12061206

12071207
itemElement.appendChild(floatDisplay);
1208+
1209+
// Add watchlist button if available
1210+
if (window.watchlistButton) {
1211+
window.watchlistButton.display(floatDisplay, floatData);
1212+
}
12081213
},
1209-
1214+
12101215
getWearName(floatValue) {
12111216
if (floatValue < 0.07) return 'Factory New';
12121217
if (floatValue < 0.15) return 'Minimal Wear';

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"https://steamcommunity.com/id/*/tradehistory",
4545
"https://steamcommunity.com/profiles/*/tradehistory"
4646
],
47-
"js": ["lib/marketIntelligence.js", "lib/inventoryEnhancer.js", "src/infiniteScroll.js", "src/buff163Integration.js", "src/item3DPreview.js", "src/tradeProtectionDisplay.js", "src/floatRarityDisplay.js", "src/multiMarketPricing.js", "content.js"],
47+
"js": ["lib/marketIntelligence.js", "lib/inventoryEnhancer.js", "src/infiniteScroll.js", "src/buff163Integration.js", "src/item3DPreview.js", "src/tradeProtectionDisplay.js", "src/floatRarityDisplay.js", "src/multiMarketPricing.js", "src/watchlistButton.js", "content.js"],
4848
"css": ["styles/main.css", "styles/inventory.css"],
4949
"run_at": "document_idle"
5050
}

0 commit comments

Comments
 (0)