Extract ChatGPT session token for iOS 15 legacy app with one-click floating button
這裡只顯示彼此間有代碼差異的版本。 顯示所有版本。
# Changelog## Version 1.0.1 (2025-01-29)### 🔧 Bug Fixes & Improvements**Critical Fix - Secure Cookie Access:**- ✅ **Fixed `__Secure-` cookie detection** - Enhanced cookie parsing to handle browser security restrictions- ✅ **Multi-method token extraction** - Added regex-based fallback when `document.cookie` doesn't expose secure cookies- ✅ **Improved error handling** - Better detection and reporting of cookie access limitations**Enhanced User Experience:**- ✅ **Smart fallback notifications** - When auto-extraction fails, displays clear manual steps with exact DevTools navigation- ✅ **Extended notification timing** - Manual instruction notifications stay visible for 10 seconds (vs 4 seconds for regular messages)- ✅ **Visual feedback improvements** - Button changes to 📋 clipboard icon when manual extraction is needed- ✅ **Multi-line notification support** - Better formatting for complex instruction messages**Technical Improvements:**- ✅ **Enhanced logging verbosity** - More detailed cookie examination process in console- ✅ **Robust regex parsing** - Secondary extraction method using pattern matching for secure cookies- ✅ **Context-aware timeouts** - Different notification durations based on message complexity- ✅ **Graceful degradation** - Script continues to function even when automatic extraction fails**Browser Compatibility:**- ✅ **Chrome `__Secure-` cookie handling** - Addresses restrictions on secure cookie access via JavaScript- ✅ **Cross-browser security compliance** - Works within browser security constraints while maximizing functionality---## Version 1.0.0 (2025-01-29)### 🎉 Initial Release**Core Features:**- ✅ One-click ChatGPT session token extraction- ✅ Floating 🔑 button UI with smooth animations- ✅ Smart clipboard integration with automatic fallback- ✅ Toast notification system for user feedback- ✅ Visual success indicators (button turns green with checkmark)- ✅ Support for both `chatgpt.com` and `chat.openai.com`**Technical Implementation:**- ✅ Robust cookie parsing for `__Secure-next-auth.session-token`- ✅ Modern Clipboard API with legacy `document.execCommand` fallback- ✅ Duplicate button prevention system- ✅ Comprehensive error handling and user messaging- ✅ CSS animations and transitions for polished UX**Developer Features:**- ✅ Verbose console logging for debugging- ✅ Detailed operation tracking and error reporting- ✅ Clean code structure with comprehensive comments- ✅ MIT license for open source compatibility**UI/UX Design:**- ✅ Non-intrusive floating button (bottom-right, 60px)- ✅ Gradient background with hover effects- ✅ 4-second auto-dismiss notifications- ✅ Token length validation and preview in logs- ✅ Smooth scale animations on interaction**iOS 15 Optimization:**- ✅ Perfect compatibility with ChatGPTWebV15 app workflow- ✅ Streamlined token extraction process (replaces 5-step manual process)- ✅ Immediate clipboard readiness for mobile app pasting- ✅ Success confirmation with token character count**Browser Compatibility:**- ✅ Modern browsers with Clipboard API support- ✅ Legacy browser support via fallback methods- ✅ Cross-platform compatibility (Mac, Windows, Linux)- ✅ Mobile browser support for responsive design---### 🔮 Planned Features for Future Versions- **v1.2.0**: Auto-refresh token detection for expired sessions- **v1.3.0**: Multiple token format support for different ChatGPT variants - **v1.4.0**: Keyboard shortcuts for power users- **v1.5.0**: Custom button positioning and themes- **v1.6.0**: Token validation and expiry warnings---**Installation Note:** Requires Tampermonkey, Greasemonkey, or compatible userscript manager.**Compatibility:** Tested on Chrome, Firefox, Safari, and Edge browsers.**Known Issues (v1.0.1):** Some browsers may restrict access to `__Secure-` cookies via JavaScript. In these cases, the script provides detailed manual extraction instructions.