Full Date format for Youtube

Show full upload dates in DD/MM/YYYY HH:MMam/pm format with improved performance

這裡只顯示彼此間有代碼差異的版本。 顯示所有版本。

  • v1.1.2 2025-04-03

    Correction of author name

  • v1.1.1 2025-04-03

    YouTube Date Format Script: Improvements and Changes

    Overview

    The "Full Date format for YouTube" userscript has been updated to address several issues that were causing it to fail with YouTube's current layout. This document explains the changes made and how they improve script functionality.

    Major Improvements

    1. Enhanced Video ID Extraction

    What changed: Added support for more URL formats, better fragment handling, and error handling to prevent script crashes if a URL is in an unexpected format.

    2. Improved DOM Element Selection

    What changed: Completely reworked selectors to match YouTube's current DOM structure and organized them into a more maintainable format.

    3. Robust Metadata Date Insertion

    What changed: Instead of blindly targeting the second span, the script now intelligently finds the best place to insert the date by looking for view count elements.

    4. Comprehensive Debugging System

    What changed: Added a debugging system that can be toggled on to help diagnose issues without cluttering the console during normal operation.

    5. Better Page Navigation Handling

    What changed: Added more reliable URL change detection to properly handle YouTube's single-page application navigation.

    6. Improved Date Formatting

    What changed: Added validation to check if the date is valid before proceeding, and wrapped the function in a try-catch to prevent script crashes.

    7. Multiple Processing Attempts

    What changed: Added multiple processing attempts at different times to catch elements as they load asynchronously.

    Other Enhancements

    1. Error Handling: Added try-catch blocks in critical functions to prevent script crashes.
    2. Visual Styling: Added spacing to the date display (holder.style.marginLeft = '4px').
    3. Cleaner Code Organization: Restructured code for better maintainability.
    4. Performance Optimization: Improved caching and prevented unnecessary reprocessing.
    5. Memory Management: Maintained cleanup of old cache entries to prevent memory leaks.
  • v0.4.5 2024-11-13
  • v0.4 2024-11-01