Skip to content

Latest commit

 

History

History
275 lines (204 loc) · 8.73 KB

File metadata and controls

275 lines (204 loc) · 8.73 KB

YouTube Keystrokes Blocker v4.3 Release Notes

Release Date: January 23, 2026 Version: 4.3 Status: Stable ✅

Related: See v4.2 Release Notes for previous release documentation


🎯 Overview

Version 4.3 represents a significant step forward in stability, user experience, and compatibility. This release introduces enhanced settings management, improved hotkey detection, better UI feedback, and crucial infrastructure updates for seamless distribution.


✨ New Features

1. Smart Settings Reloading

  • Added getSettings() helper function for real-time settings synchronization
  • Settings are now fetched fresh on every keystroke (not cached)
  • Changes take effect immediately without requiring page reload
  • Better handling of simultaneous setting modifications

2. Enhanced Hotkey Detection

  • Improved Spacebar Detection: Now handles both Space code and " " key value
  • Case-Insensitive F/M Keys: Properly detects both uppercase and lowercase F/M keys
  • More robust key event handling across different keyboard layouts

3. Visual Feedback in Settings

  • Save Button Confirmation: Button changes to green "Saved!" text on save
  • Automatic Reset: Button text and color revert after 1 second
  • Better UX: Users can clearly see when settings are being persisted
  • Delayed Close: Modal closes after 500ms to show confirmation

4. Multi-Selector Button Injection

  • Implemented fallback selector system for button injection
  • Now tries multiple container selectors:
    • ytd-menu-renderer #top-level-buttons-computed (primary)
    • ytd-menu-renderer #menu-top-level-buttons (fallback 1)
    • ytd-menu-renderer #flexible-item-buttons (fallback 2)
    • Dynamic ID-based queries (fallback 3-4)
  • Better compatibility with YouTube's varying UI structures

5. Aggressive Retry Logic

  • Added periodic injection attempts (every 500ms)
  • Tries up to 30 times (15 second window)
  • Gracefully stops retrying after button is successfully injected
  • Prevents duplicate button creation

6. Tampermonkey Menu Fallback

  • Added GM_registerMenuCommand as a user-accessible fallback
  • Users can access settings from Tampermonkey menu even if button doesn't appear
  • Improves accessibility for edge cases

🔧 Technical Improvements

Settings Management

// Before: Settings were cached, changes didn't reflect immediately
settings.disableNumericKeys = true; // Static

// After: Fresh settings fetched on each keystroke
const currentSettings = getSettings(); // Dynamic

Hotkey Detection

// Before: Limited key detection
if (settings.disableSpacebar && e.code === "Space")

// After: Comprehensive key detection
if (currentSettings.disableSpacebar && (e.code === "Space" || e.key === " "))

Button Injection

// Before: Single selector, would fail if YouTube changed DOM
const container = document.querySelector("ytd-menu-renderer #top-level-buttons-computed");

// After: Multiple selectors with fallback chain
const containers = [selector1, selector2, selector3, selector4].filter(Boolean)[0];

🔄 Browser & Distribution Updates

Manifest Updates

  • Manifest Version: 1.0 → 3.0 (modern Chrome extension standard)
  • Compatibility Declarations: Added explicit browser support
    • Firefox ≥ 60 ✅
    • Chrome ≥ 70 ✅
    • Opera ≥ 57 ✅
    • Edge ≥ 79 ✅
    • Safari ≥ 13 (metadata)
    • Vivaldi ≥ 2.0 (metadata)
    • Brave ≥ 1.0 (metadata)

URL Updates

  • Download URL: Changed from Greasy Fork auto-update to GitHub raw content
    • https://raw.githubusercontent.com/Life-Experimentalist/Youtube-Keystrokes-Blocker/main/disable-yt-hotkeys.user.js
  • Update URL: Changed for better reliability and faster propagation
  • Benefits: Faster updates, better version control, direct GitHub integration

🐛 Bug Fixes

Settings Persistence

  • Fixed issue where spacebar setting wasn't properly initialized on first install
  • Added explicit undefined check for disableSpacebar on startup
  • Settings now persist correctly across browser restarts

Hotkey Blocking

  • Fixed inconsistent F/M key detection for different keyboard layouts
  • Improved capture of shift + < / > for speed control (now uses settings not currentSettings)
  • Better handling of frame skip keys (. and ,)

UI/UX

  • Fixed button appearing with incorrect styling in some edge cases
  • Improved modal animations and transitions
  • Better button text visibility in dark mode

📊 Metrics & Compatibility

File Size

  • Before: ~12.5 KB
  • After: ~13.5 KB (+1 KB)
  • Reason: Added retry logic and improved selectors

Performance

  • ✅ No impact on keystroke detection latency
  • ✅ Minimal CPU usage from retry logic (runs every 500ms)
  • ✅ Faster settings synchronization (fetched per-keystroke)

Browser Compatibility

Browser Version Status
Chrome 70+ ✅ Fully Supported
Firefox 60+ ✅ Fully Supported
Edge 79+ ✅ Fully Supported
Opera 57+ ✅ Fully Supported
Safari 13+ ✅ Supported
Vivaldi 2.0+ ✅ Supported
Brave 1.0+ ✅ Supported

📝 Code Changes Summary

Modified Files

  1. disable-yt-hotkeys.user.js

    • Version: 4.2 → 4.3
    • Lines changed: ~120
    • Key changes: Settings management, hotkey detection, button injection, UI feedback
  2. MANIFEST.json

    • Manifest version: 1.0 → 3.0
    • Version: 4.2 → 4.3
    • Added browser compatibility metadata
    • Updated download/update URLs
  3. README.md

    • Updated version badge
    • Updated file size badge (~13.5KB)
    • Simplified version history (moved to CHANGELOG)

🚀 Upgrade Instructions

For Users

  1. Greasy Fork: Automatic update will be delivered within 24 hours
  2. Manual Update: Visit Greasy Fork script page and click "Install this script"
  3. Tampermonkey/Violentmonkey: Check for updates in extension settings

For Developers

# Update your local version
git pull origin main

# Or check out the tag
git checkout tags/v4.3

🔄 Migration Guide

From v4.2

Fully Backward Compatible

  • Existing settings will be preserved
  • No user action required
  • Settings will load from localStorage automatically
  • One-time initialization for spacebar setting (if needed)

Breaking Changes

None - This is a fully compatible update


🐞 Known Issues & Limitations

Current Limitations

  1. Button injection delay: In rare cases, button may take a few seconds to appear on slow connections
    • Workaround: Settings accessible via Tampermonkey menu
  2. YouTube structure changes: If YouTube significantly restructures its player, button injection may fail temporarily
    • Workaround: Manual menu access available

Reported Issues (Fixed)

  • ✅ Spacebar setting not working on first install
  • ✅ F/M key detection inconsistent across keyboard layouts
  • ✅ Settings changes requiring page refresh

🙏 Credits & Contributors

  • Developer: VKrishna04
  • Organization: Life Experimentalist
  • Testers: Community users who reported issues
  • Tools: Tampermonkey, Greasy Fork, GitHub

📋 Quality Checklist

  • ✅ Code tested on latest Chrome
  • ✅ Code tested on latest Firefox
  • ✅ Settings persistence verified
  • ✅ Hotkey blocking verified
  • ✅ Button injection tested
  • ✅ UI animations verified
  • ✅ Documentation updated
  • ✅ Backward compatibility confirmed

🔗 Related Resources


📞 Support & Feedback


🎉 Thank You!

Thank you for using YouTube Keystrokes Blocker! Your support helps us continue improving this tool and creating more useful utilities for the community.

If you find this script helpful, please consider:

  • ⭐ Starring the repository
  • 📤 Sharing with friends
  • 💬 Providing feedback and suggestions
  • 🐛 Reporting any issues you find

Version 4.3 | Stable | Production ReadyReleased January 23, 2026