YouTube Shorts Auto Closer

Automatically closes YouTube Shorts pages after daily limit

目前为 2025-03-07 提交的版本。查看 最新版本

作者
se7
评分
0 0 0
版本
1.0
创建于
2025-03-07
更新于
2025-03-07
大小
9.5 KB
许可证
MIT
适用于

# YouTube Shorts Daily Time Limiter

A userscript that helps you manage your YouTube Shorts viewing time by setting a daily limit of 40 minutes!

## Features

- 🕒 **Daily Time Limit**: Set maximum viewing time for YouTube Shorts
- 📊 **Time Tracking**: Persistent tracking across browser sessions
- 🔄 **Auto Reset**: Automatically resets counter at midnight
- ⚠️ **Smart Warnings**: Get notified before limit is reached
- 🎯 **Precise Tracking**: Only counts actual viewing time

## 🎮 How It Works

### Daily Limit
- Tracks total viewing time per day
- Automatically closes shorts when 40-minute limit is reached
- Resets counter at midnight
- Persists across browser sessions and refreshes

### Warning System
- Shows warning notification 10 seconds before closing
- Displays countdown before auto-close
- Warning appears when approaching daily limit

## ⚙️ Technical Details

### Storage
- Uses browser's local storage for persistence
- Stores:
- Daily viewing time
- Last access date
- Session state

### Time Tracking
- Only counts active viewing time
- Pauses when:
- Leaving shorts section
- Switching to different tabs
- Browser is minimized

### Browser Support
- Works with all major browsers:
- Chrome
- Firefox
- Edge
- Safari

## 🔧 Configuration

To modify the daily time limit, edit the following constant in the script:

```javascript
const DAILY_LIMIT_MINUTES = 40; // Change to desired minutes
```

## 🔒 Privacy

- All data is stored locally in your browser
- No external data collection
- No tracking or analytics

## 📄 License

MIT License - Feel free to modify and share!

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址