docs: 更新 CLAUDE.md 添加代码风格和随机播放逻辑说明
- 添加项目使用 Tab 缩进的说明 - 添加随机播放模式的详细逻辑说明 - 说明 shuffleList 和 currentIndex 的关系 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
		
							parent
							
								
									ae2d8875ad
								
							
						
					
					
						commit
						5be5b4812f
					
				
							
								
								
									
										13
									
								
								CLAUDE.md
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								CLAUDE.md
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -83,6 +83,12 @@ npm run qc                 # Alias for quality-check
 | 
			
		|||
- **URL Refresh Logic**: Checks resource availability before playback/preload
 | 
			
		||||
- **Cache Invalidation**: Automatic cleanup when resource URLs change
 | 
			
		||||
 | 
			
		||||
### Shuffle/Random Play Logic
 | 
			
		||||
- **shuffleList**: Array storing the shuffled order of original list indices
 | 
			
		||||
- **currentIndex**: In shuffle mode, this is the index within shuffleList
 | 
			
		||||
- **Accessing current song**: `list[shuffleList[currentIndex]]` in shuffle mode
 | 
			
		||||
- **getNextIndex**: Returns the actual list index of the next song to play
 | 
			
		||||
 | 
			
		||||
## File Structure Notes
 | 
			
		||||
 | 
			
		||||
### `/src/utils/`
 | 
			
		||||
| 
						 | 
				
			
			@ -99,6 +105,13 @@ npm run qc                 # Alias for quality-check
 | 
			
		|||
- **content.js**: Injects the Vue app into target websites
 | 
			
		||||
- **background.js**: Extension background script
 | 
			
		||||
 | 
			
		||||
## Code Style and Formatting
 | 
			
		||||
 | 
			
		||||
### Indentation
 | 
			
		||||
- **This project uses Tab indentation (not spaces)**
 | 
			
		||||
- Ensure all code edits maintain consistent Tab indentation
 | 
			
		||||
- When editing files, preserve the existing Tab character formatting
 | 
			
		||||
 | 
			
		||||
## Development Considerations
 | 
			
		||||
 | 
			
		||||
### Extension Context
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user