FYTE /Fast YouTube Embedded/ Player

Hugely improves load speed of pages with lots of embedded Youtube videos by instantly showing clickable and immediately accessible placeholders, then the thumbnails are loaded in background. Optionally a fast simple HTML5 direct playback (720p max) can be selected if available for the video.

To są wersje tego skryptu, gdzie kod został zaktualizowany. Pokaż wszystkie wersje.

  • v2.15.1 21-01-2025

    fix formatting of duration

  • v2.15.0 27-12-2024

    stop iframes via location + native cover fit

  • v2.14.0 26-11-2024

    improve reliability: don't use expando as some sites break it

  • v2.13.2 11-06-2024

    fix autoplay, exclude pikabu.ru

  • v2.13.1 26-05-2024

    speed up hasChildWindow

  • v2.13.0 26-05-2024

    fix video card in google search

  • v2.12.19 12-05-2024

    lazy db init, idle if no frames, fix cover url

  • v2.12.18 22-03-2024

    fix indexedDB auto clean-up

  • v2.12.17 10-10-2023

    switch from localStorage to indexedDB to improve page load performance

  • v2.12.16 19-08-2023
    • fix errors for trustedTypes and YTlistener
    • custom rules in GM storage (use your userscript manager editor for storage)
    • minify cache data
    • reveal iframe earlier on error
  • v2.12.15 27-06-2022

    tampermonkey compat

  • v2.12.14 26-06-2022

    typo

  • v2.12.13 26-06-2022

    fix object embeds

  • v2.12.12 10-03-2022

    google search fullcard video fix

  • v2.12.11 07-10-2021

    video card in google search

  • v2.12.10 22-07-2021

    use watch page since get_video_info is gone

  • v2.12.9 12-07-2021

    show reason when non-playable

  • v2.12.8 18-06-2021

    fix get_video_info

  • v2.12.7 18-01-2021 reset paddings/margins
  • v2.12.6 20-12-2020 fix video card on google.com
  • v2.12.5 09-07-2020 fix fullscreen button
  • v2.12.4 16-06-2020 fix google search video card
  • v2.12.3 08-05-2020 only override fullscreen button if frame is reachable
  • v2.12.2 04-05-2020 src may be null
  • v2.12.1 27-04-2020 restore the missing comma in known titles; use onvolumechange
  • v2.12.0 19-04-2020 rewrite to ES2017 + don't exit full screen upon seeking in timeline + show timestamp in storyboard
  • v2.11.0 25-03-2020 typo
  • v2.11.0 24-03-2020 support invidio.us player
  • v2.10.1 21-02-2020 skip already deleted nodes
  • v2.10.0 30-01-2020 various fixes
  • v2.9.18 19-12-2019 preserve CSS transform
  • v2.9.17 12-08-2019 decode youtube signature
  • v2.9.16 12-08-2019 fix video info parser
  • v2.9.15 27-07-2019 skip nodes with position:fixed and "YouTube on Hover Preview"
  • v2.9.14 27-07-2019 only recreate the YT fullscreen button if there's a parent FYTE instance (which may not be the case if the user excluded the site manually)
  • v2.9.13 18-06-2019 correctly pause/unpause on click in Chrome
  • v2.9.12 24-03-2019 force-enable the fullscreen button
  • v2.9.11 05-01-2019 don't recheck frames/objects take 2
  • v2.9.10 05-01-2019 don't recheck frames/objects
  • v2.9.8 27-11-2018 allow fullscreen and autoplay in new Chrome
  • v2.9.7 20-10-2018
  • v2.9.6 20-10-2018
  • v2.9.5 16-10-2018
  • v2.9.4 08-12-2017
  • v2.9.3 07-12-2017 fix videos on play.google.com
  • v2.9.2 19-11-2017 fix resizing of a pinned player
  • v2.9.1 18-11-2017 intercept videos on reddit comment pages
  • v2.9.0.5 22-09-2017 strip "v=" in invalid links like "/embed/v="
  • v2.9.0.4 26-08-2017 also process data-src attributes
  • v2.9.0.3 25-08-2017 reset CSS transform
  • v2.9.0.2 19-08-2017 fix fullscreen
  • v2.9.0.1 17-08-2017 workaround for chrome cssText property bug
  • v2.9.0 14-08-2017
  • v2.8.9 12-08-2017
  • v2.8.8 24-07-2017 process videos on developers.google.com
  • v2.8.7 12-07-2017 don't add span element for duration if it's unknown
  • v2.8.6 11-07-2017 autocleanup cache; show fps
  • v2.8.5 07-06-2017 clarify video quality option via tooltip
  • v2.8.4 06-06-2017 Add default video quality option
  • v2.8.3 27-05-2017 prevent double activation of iframe player
  • v2.8.2 23-05-2017
  • v2.8.1 22-05-2017
  • v2.8.0 08-04-2017 fix https://greasyfork.org/en/forum/discussion/21433/
  • v2.7.9 31-01-2017 Fix occasional double-fetching of storyboard thumbnails
  • v2.7.8 31-01-2017 Handle CSS columns to calc the dimensions
  • v2.7.7 07-12-2016 Expand the parent-eating rule to check paddingTop on the parent element itself like https://jakearchibald.com/2016/fun-hacks-faster-content/
  • v2.7.6 24-10-2016 fix theverge videos
  • v2.7.5 17-10-2016 Skip playlist embeds
  • v2.7.4 03-10-2016 exclude some google+ iframes used in youtube's notifications
  • v2.7.3 07-09-2016 Don't try to process non-youtube videos, don't get unneeded info for autoplayed videos
  • v2.7.1 12-08-2016 Fix the first click-to-pin in iframe mode
  • v2.7.0 08-08-2016 edit description
  • v2.6.9 07-08-2016 Don't start dragndrop off the control bar
  • v2.6.8 07-08-2016 Chrome hack to restore autofullscreened iframes
  • v2.6.7 07-08-2016 Delayed cover image display for autoplayed videos
  • v2.6.6 07-08-2016 Keep centering when sizemode=original
  • v2.6.5 07-08-2016 typo
  • v2.6.4 07-08-2016 Cache titles and other info
  • v2.6.3 07-08-2016 Middle-click starts fullscreen playback
  • v2.6.2 06-08-2016 Don't animate background when autoplaying
  • v2.6.1 04-08-2016 Process more OBJECT embeds
  • v2.6.0 04-08-2016 Fix: clicking the title should open a youtube page
  • v2.5.9 03-08-2016 Fix stacking on the bottom, don't stack on self.
  • v2.5.8 03-08-2016 Drag'n'drop zone may be the original placeholder. Add 9gag.
  • v2.5.7 02-08-2016 Add drag'n'drop pinning, make 'pinnable' On, Hide, Off. Show shadow under corner-pinned videos.
  • v2.5.6 01-08-2016 Add transparent corner pins option. TL nanodedup
  • v2.5.5 31-07-2016 Corner pins fade-in/out on hover. Inject styles only if processed videos are present.
  • v2.5.4 31-07-2016 Actually use the 'pinnable' option
  • v2.5.3 31-07-2016 Move pinned directly played videos on top
  • v2.5.2 31-07-2016 Improve the description
  • v2.5.1 31-07-2016 Corner pinning. Fixup: properly cleanup adopted CSS in FF.
  • v2.5.0 31-07-2016 Correctly set title link width. Fix on-resize timer, speedup the adjustment. Parse video size more reliably. Add storyboard element only when data is obtained. Display storyboard thumb to the left of mouse cursor
  • v2.4.9 30-07-2016 Keep display:inline as display:inline-block. Reuse image preloader. Storyboard fixup when part index = 0
  • v2.4.8 30-07-2016 Storyboard click jumps to corresponding time. Spinner fixups. Correctly override existing url params.
  • v2.4.7 29-07-2016 Fix storyboard preview. Show spinner while loading storyboard pic under cursor.
  • v2.4.6 29-07-2016 Show full length storyboard (seekbar preview)
  • v2.4.5 28-07-2016 Compatibility with pre-47 Firefox
  • v2.4.4 28-07-2016 Don't intercept Youtube Link Title
  • v2.4.3 27-07-2016 Fix youtu.be links, add reddit videos. Don't adopt original margin. FF rounding bug fix. Constrain min-width and min-height. Fix embedly's youtube.com%2Fembed.
  • v2.4.2 26-07-2016 Prioritize per-site rules. Work around FF's buggy getElementsByTagName, getComputedStyle. Move our rules to the end of HEAD to increase CSS specificity
  • v2.4.1 26-07-2016 fixup for 'prevent parent clipping'
  • v2.4.0 25-07-2016 Per-site rules (pikabu.ru added). Embed the icon as data url. Code cosmetics.
  • v2.3.9 25-07-2016 Consume parents of retardedly positioned videos. Fade-in black background color from transparent.
  • v2.3.8 25-07-2016 fixup: check googvid.length
  • v2.3.7 25-07-2016 Speedup page loading: reduce time spent in MutationObserver 5x times
  • v2.3.5 24-07-2016 Process autoplay=1 videos
  • v2.3.4 24-07-2016 Add translations: Russian
  • v2.3.3 23-07-2016 Original size mode: never remove parent elements
  • v2.3.2 22-07-2016 Keep parent element if it has a class name or id; strip 'overflow:hidden' from parent chain
  • v2.3.1 22-07-2016 Remove +0.49
  • v2.3.0 21-07-2016 Don't round width and height to integer
  • v2.2.8 21-07-2016 fixup
  • v2.2.7 21-07-2016 Fixed: fresh install
  • v2.2.6 21-07-2016 Process disqus comments, force fullscreen when inside nested iframes
  • v2.2.5 20-07-2016 Inaccessible video background #888
  • v2.2.4 20-07-2016 Gray out inaccessible video placeholders
  • v2.2.3 20-07-2016 Replace 'watch?v=' with 'embed/' when loading iframe player
  • v2.2.2 20-07-2016 Missing ;
  • v2.2.1 19-07-2016 fixup: getComputedStyle is implemented differently in Chrome and Firefox
  • v2.2.0 19-07-2016 Keep some attributes of custom positioned videos
  • v2.1.9 19-07-2016 Fixup of option buttons click
  • v2.1.8 19-07-2016 fixup for google results top video
  • v2.1.7 19-07-2016 Don't force custom size to a multiple of 10
  • v2.1.6 18-07-2016 Google results: process top video match
  • v2.1.5 18-07-2016 Make video player size equal to the FYTE container, so it's autostretched when container size changes
  • v2.1.4 17-07-2016 Adjust height to keep proportions when desired player width is constrained by page layout
  • v2.1.3 15-07-2016 Limit storyboard thumbnail height to 33%
  • v2.1.2 15-07-2016 Force visibility of Play button
  • v2.1.1 15-07-2016 fixup: infinite loop
  • v2.1 15-07-2016 Storyboard thumbnails. Faster title fetching. Fix 'Original' size mode
  • v2.0.2 11-07-2016 fixup: FF options size selector
  • v2.0.1 11-07-2016 fixup: allow click-to-play before video info is fetched
  • v2.0 11-07-2016 Custom size options. Use !important for all CSS. Raise CSS specificity for video/iframe by inlining the styles
  • v1.5.5 10-07-2016 fixed some issues with 4:3 embeds, [x]resize now keeps the clicked video's center at a relatively same window position
  • v1.5.4 09-07-2016 Use the actual aspect ratio of video to display the thumbnails, add "Safe" option, autoresize videos when browser window size changes
  • v1.5 30-06-2016 Show video title and duration on thumbnails
  • v1.4.4 11-03-2016 Replace entire OBJECT element
  • v1.4.3 04-02-2016 Adjust thumbnail size on DOMContentLoaded
  • v1.4.2 18-01-2016 fixup tooltip text
  • v1.4.1 18-01-2016 fixup: remove "debugger" call
  • v1.4 18-01-2016 Fix options behavior. Autopause other videos when a new video starts to play.
  • v1.3.3 18-01-2016 Support @connect-src
  • v1.3.2 19-12-2015 Rename
  • v1.3.1 19-12-2015 No preemptive fade-out on HTML5 video
  • v1.3 19-12-2015 Fix playback on new Youtube videos + fade-out
  • v1.2.3 10-11-2015 don't process non-video embeddings like that on last.fm
  • v1.2.2 10-11-2015 fix positioning via !important
  • v1.2.1 08-11-2015 increase specificity
  • v1.2 24-10-2015 +option Play directly
  • v1.1.2 12-10-2015 update to setMutationHandler
  • v1.1.1 25-08-2015
  • v1.1.0 13-05-2015 fixup
  • v1.0.9 13-05-2015 override site's padding and margin for thumbnail elements
  • v1.0.8 12-05-2015 Remember volume, show option [x] resize to fit
  • v1.0.7 29-04-2015 explicitly set the fonts of the links
  • v1.0.6 27-04-2015 process old flash EMBEDs too
  • v1.0.5 27-04-2015 fixup
  • v1.0.4 27-04-2015 HTML5 mode: show a title on hover with a link to watch on youtube
  • v1.0.3 24-04-2015 don't break frames with autoplay=1
  • v1.0.2 17-04-2015 Add '?' to iframe src if needed
  • v1.0.1 17-04-2015 HTML5 player: better stream selection, should play hd720 by default
  • v1.0 16-04-2015