Skip to content

Commit 835a51a

Browse files
rainerstudiosclaude
andcommitted
Fix service worker errors and improve Buff163 visibility
Manifest.json changes: - Add missing 'alarms' permission for chrome.alarms.create() - Add missing 'notifications' permission for chrome.notifications.create() - Fixes service worker registration error (status code 15) Buff163Integration improvements: - Reposition display below float info for better visibility - Increase container padding and border thickness - Enhance font sizes for prices and labels (15px price, 13px arbitrage) - Add box shadow for better visual separation - Improve "View on Buff163" link styling with hover animation - Make display more prominent and easier to read 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 3ef432a commit 835a51a

2 files changed

Lines changed: 47 additions & 24 deletions

File tree

manifest.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"128": "icons/icon128.png"
1212
},
1313
"permissions": [
14-
"storage"
14+
"storage",
15+
"alarms",
16+
"notifications"
1517
],
1618
"host_permissions": [
1719
"https://steamcommunity.com/*",

src/buff163Integration.js

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,23 @@ class Buff163Integration {
204204
// Create price display
205205
const priceDisplay = this.createPriceDisplay(buffData, steamPrice, arbitrage);
206206

207-
// Find appropriate container
208-
const priceContainer = listingElement.querySelector('.market_listing_price');
209-
if (priceContainer) {
210-
priceContainer.appendChild(priceDisplay);
207+
// Find float display container first (insert after float info for better visibility)
208+
const floatDisplay = listingElement.querySelector('.cs2-float-display, .float-display');
209+
if (floatDisplay) {
210+
// Insert after float display
211+
floatDisplay.parentNode.insertBefore(priceDisplay, floatDisplay.nextSibling);
212+
} else {
213+
// Fallback: Find item name block and insert after it
214+
const itemNameBlock = listingElement.querySelector('.market_listing_item_name_block');
215+
if (itemNameBlock) {
216+
itemNameBlock.parentNode.insertBefore(priceDisplay, itemNameBlock.nextSibling);
217+
} else {
218+
// Last resort: append to price container
219+
const priceContainer = listingElement.querySelector('.market_listing_price');
220+
if (priceContainer) {
221+
priceContainer.appendChild(priceDisplay);
222+
}
223+
}
211224
}
212225
}
213226

@@ -284,12 +297,15 @@ class Buff163Integration {
284297
style.id = 'buff163-integration-styles';
285298
style.textContent = `
286299
.buff163-price-display {
287-
margin-top: 8px;
288-
padding: 10px;
289-
background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
290-
border: 1px solid rgba(255, 107, 107, 0.3);
291-
border-radius: 6px;
292-
font-size: 11px;
300+
margin: 10px 0;
301+
padding: 12px;
302+
background: linear-gradient(135deg, rgba(255, 107, 107, 0.15) 0%, rgba(255, 107, 107, 0.08) 100%);
303+
border: 2px solid rgba(255, 107, 107, 0.4);
304+
border-radius: 8px;
305+
font-size: 12px;
306+
box-shadow: 0 2px 8px rgba(255, 107, 107, 0.15);
307+
width: 100%;
308+
box-sizing: border-box;
293309
}
294310
295311
.buff163-header {
@@ -305,9 +321,9 @@ class Buff163Integration {
305321
}
306322
307323
.buff163-label {
308-
font-weight: 600;
324+
font-weight: 700;
309325
color: #ff6b6b;
310-
font-size: 11px;
326+
font-size: 13px;
311327
}
312328
313329
.mock-badge {
@@ -330,23 +346,24 @@ class Buff163Integration {
330346
.buff163-price {
331347
font-weight: 700;
332348
color: #ff6b6b;
333-
font-size: 13px;
349+
font-size: 15px;
334350
}
335351
336352
.buff163-price-usd {
337353
color: #a1a1aa;
338-
font-size: 11px;
354+
font-size: 13px;
355+
font-weight: 600;
339356
}
340357
341358
.buff163-arbitrage {
342359
display: flex;
343360
align-items: center;
344-
gap: 6px;
345-
padding: 4px 8px;
346-
border-radius: 4px;
347-
margin-bottom: 6px;
348-
font-weight: 600;
349-
font-size: 11px;
361+
gap: 8px;
362+
padding: 6px 10px;
363+
border-radius: 6px;
364+
margin-bottom: 8px;
365+
font-weight: 700;
366+
font-size: 13px;
350367
}
351368
352369
.buff163-arbitrage.high-profit {
@@ -406,14 +423,18 @@ class Buff163Integration {
406423
.buff163-link {
407424
color: #ff6b6b;
408425
text-decoration: none;
409-
font-weight: 600;
410-
font-size: 11px;
411-
transition: color 0.2s;
426+
font-weight: 700;
427+
font-size: 12px;
428+
transition: all 0.2s;
429+
display: inline-flex;
430+
align-items: center;
431+
gap: 4px;
412432
}
413433
414434
.buff163-link:hover {
415435
color: #ff5252;
416436
text-decoration: underline;
437+
transform: translateX(2px);
417438
}
418439
419440
.buff163-volume {

0 commit comments

Comments
 (0)