After making these changes, you need to reload the extension:
- Open Chrome Extensions page (chrome://extensions/)
- Find "ClassPicker"
- Click "Inspect views: service worker"
- Or toggle it off and back on
- Navigate to https://classpass.com
- Search for classes in your area (e.g., "Yoga")
- Open the extension side panel by clicking the extension icon
- Open the browser console (F12 or Right-click → Inspect → Console tab)
You should see these messages in the console:
- ✅ "ClassPicker extension loaded"
- ✅ "ClassPicker extension ready"
- ✅ "[ClassPicker] Found X class elements on page"
- In the side panel, select a max cost (e.g., "10 credits")
- Select a minimum duration (e.g., "60 min")
- Click "Apply Filters"
What to look for in console:
- "Message received: {type: 'APPLY_FILTERS', filters: {maxCost: 10, minDuration: 60}}"
- "Applying filters: {maxCost: 10, minDuration: 60}"
- "Checking credits: X against max: 10"
- "Checking duration: Y against min: 60"
- "Filtered results: X shown, Y hidden"
After applying filters:
- Classes over 10 credits should be hidden
- Classes under 60 minutes should be hidden
- Only classes ≤10 credits AND ≥60 minutes should remain visible
- You should see a purple notification in the top-right corner
- Click "Clear Filters" button
- All classes should reappear
- Console should show: "Clearing filters"
Problem: No console logs appear
- Make sure you're on classpass.com
- Try refreshing the page after loading the extension
Problem: "Found 0 class elements"
- The page structure might be different
- In the console, type:
document.querySelectorAll('li')to see if li elements exist - Look at the HTML structure and report back what you see
Problem: Elements found but not filtering
- Check if credits/duration are being extracted
- Look for console logs showing "Checking credits: null" (means extraction failed)
Problem: Extension not sending messages
- Check side panel console (right-click extension icon → Inspect)
- Look for errors about permissions or tabs
Run these in the browser console (on classpass.com) to debug:
// Check what elements the extension finds
document.querySelectorAll('li[class*="reservable"]').length
// Check if credits are visible in the page
document.body.innerHTML.includes('credits')
// Manually test credit extraction on first class
const firstClass = document.querySelector('li');
console.log(firstClass.textContent);- ✅ Shows: 5 credit class, 10 credit class
- ❌ Hides: 11 credit class, 15 credit class, 20 credit class
- ✅ Shows: 60 min class, 75 min class, 90 min class
- ❌ Hides: 30 min class, 50 min class, 55 min class
- ✅ Shows: Only classes that are ≤10 credits AND ≥60 minutes
- ❌ Hides: Everything else
- Max Cost: Now shows all values 1-100 (instead of just 5, 10, 15, etc.)
- Duration: Changed to "Minimum Duration" - shows classes >= selected value
- Element Detection: Improved to find ClassPass's list items (li elements)
- Debugging: Added console logs to help identify issues
If you're still having issues, please check the console and share:
- The console output when you click "Apply Filters"
- A sample of the HTML from a class listing (right-click a class → Inspect)
For more information, see the main README.