Files
memory-infrastructure-palace/code
FragginWagon 1944b43af8 feat: implement multi-state tournament querying for Challonge API v2.1
- Add tournament-query.js utility with queryAllTournaments() and helper functions
  * Makes 3 parallel API calls (pending, in_progress, ended states)
  * Uses Promise.all() to wait for all requests
  * Deduplicates results by tournament ID using Map
  * Replaces invalid state: 'all' parameter (API doesn't support 'all' value)

- Implement 5 convenience functions:
  * queryAllTournaments() - Query all states with custom options
  * queryUserTournaments() - Query user's tournaments (shorthand)
  * queryCommunityTournaments() - Query community tournaments
  * queryActiveTournaments() - Query pending + in_progress only
  * queryCompletedTournaments() - Query ended tournaments only
  * queryTournamentsByStates() - Query custom state combinations

- Update ChallongeTest.vue to use queryAllTournaments()
  * Replace invalid state: 'all' with proper multi-state query
  * Now correctly fetches tournaments from all states
  * Update console logging to show all 3 states being queried

- Add comprehensive TOURNAMENT_QUERY_GUIDE.md documentation
  * Explains the problem and solution
  * API reference for all functions
  * Implementation details and performance notes
  * Testing instructions
  * Future enhancement ideas
2026-01-28 18:10:29 +00:00
..
2026-01-26 16:43:01 -05:00
2026-01-26 16:43:01 -05:00
2026-01-26 16:43:01 -05:00

Code Section

Development workspace for bookmarklets, experiments, and scratch code.

🔖 Bookmarklets

Browser-based JavaScript utilities. See bookmarklets/README.md for full documentation.

Quick Start

  1. Write regular JavaScript in bookmarklets/ (use comments, modern syntax)
  2. Run: npm run bookmarklet -- code/bookmarklets/your-file.js
  3. Paste clipboard contents into browser bookmark URL

Example

/**
 * My Bookmarklet
 * Does something cool
 */

const elements = document.querySelectorAll('a');
elements.forEach(el => {
  el.style.backgroundColor = 'yellow';
});

alert(`Highlighted ${elements.length} links!`);

The generator automatically removes comments, minifies, and wraps in IIFE format.

🛠️ Utils

Build tools and generators:

  • bookmarkletMaker.js - Converts JS files to bookmarklets
    • Removes comments
    • Minifies code
    • Wraps in javascript:(function(){...})(); format
    • Copies to clipboard
  • git/ - Git-related utilities
    • updateReadme.js - Auto-generate README documentation from code comments

🗄️ Junk Drawer

Miscellaneous code, scripts, and work-in-progress items that don't fit elsewhere:

  • handleCCOMention.js - Custom mention handler
  • scrape.js - Web scraping utilities
  • P!P/ - Pokémon Play! Program role documentation
  • Various work-in-progress scripts and notes

This folder is for temporary storage and experimentation. Move items to appropriate folders as they mature.

🧪 Scratchpad

Experiment with code organized by language. Use this for:

  • Testing new ideas
  • Prototyping features
  • Learning new concepts
  • Code snippets for other projects

Running Code

  • Python: Cmd+Shift+P → "Code Runner: Run Code"
  • JavaScript: Same as above (uses Node.js)
  • TypeScript: Install ts-node globally first

📄 Templates

Reusable code templates and boilerplate:

  • function-template.js - Function with ES module exports
  • class-template.js - Class definition with methods
  • module-template.js - Multi-export module pattern
  • Common patterns and structures

Note: All templates use ES modules (import/export). See package.json with "type": "module".

💡 Tips

  • Use // TODO: comments for tracking work
  • Bookmark important code sections
  • Test in scratchpad before moving to bookmarklets
  • Keep snippets small and focused

Remember: This is your experimental playground. Break things, learn, iterate!