Skip to content

Commit cfaf146

Browse files
committed
Remove redundant Buff163 integration causing CORS errors
The buff163Integration.js was old code that: - Tried to fetch directly from Buff163.com (causes CORS errors) - Was redundant - multiMarketPricing.js already gets Buff prices from our API - Caused console errors: 'Error fetching Buff163 price: TypeError: Failed to fetch' Changes: - Deleted src/buff163Integration.js - Removed from manifest.json content_scripts - Removed references in content.js Now all market prices (Buff163, Skinport, CS.MONEY) come from our own API endpoint: /api/price/{itemName} - no more CORS errors!
1 parent 126e1c8 commit cfaf146

3 files changed

Lines changed: 2 additions & 537 deletions

File tree

content.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,7 @@ async function trackItemPrice(itemElement, floatData) {
311311

312312
console.log(`📊 Tracking: ${itemName} - $${price} (Float: ${floatData.floatValue})`);
313313

314-
// Display Buff163 price if integration is available
315-
if (window.buff163Integration && itemName && price > 0) {
316-
await window.buff163Integration.displayBuff163Price(itemElement, itemName, price);
317-
}
314+
// Buff163 integration removed - prices now shown via multiMarketPricing.js
318315

319316
} catch (error) {
320317
console.error('Price tracking error:', error);
@@ -768,18 +765,6 @@ async function addFloatDisplay(itemElement, floatData) {
768765
// Track price history for market intelligence
769766
await trackItemPrice(itemElement, floatData);
770767

771-
// Display Buff163 price comparison if price available
772-
if (steamPrice && floatData.fullItemName && window.buff163Integration) {
773-
console.log('[CS2 Float] Calling Buff163 with:', {itemName: floatData.fullItemName, steamPrice});
774-
await window.buff163Integration.displayBuff163Price(itemElement, floatData.fullItemName, steamPrice);
775-
} else {
776-
console.log('[CS2 Float] Buff163 not called:', {
777-
hasSteamPrice: !!steamPrice,
778-
hasItemName: !!floatData.fullItemName,
779-
hasIntegration: !!window.buff163Integration
780-
});
781-
}
782-
783768
// Add 3D item preview if image URL is available
784769
if (floatData.imageUrl && window.item3DPreview) {
785770
window.item3DPreview.attachToListing(itemElement, floatData.imageUrl);

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"https://steamcommunity.com/id/*/tradehistory",
4747
"https://steamcommunity.com/profiles/*/tradehistory"
4848
],
49-
"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", "src/transactionMonitor.js", "src/inventorySync.js", "content.js"],
49+
"js": ["lib/marketIntelligence.js", "lib/inventoryEnhancer.js", "src/infiniteScroll.js", "src/item3DPreview.js", "src/tradeProtectionDisplay.js", "src/floatRarityDisplay.js", "src/multiMarketPricing.js", "src/watchlistButton.js", "src/transactionMonitor.js", "src/inventorySync.js", "content.js"],
5050
"css": ["styles/main.css", "styles/inventory.css"],
5151
"run_at": "document_idle"
5252
},

0 commit comments

Comments
 (0)