YouTube Title Adder

By Smiths Last update Mar 15, 2013 — Installed 22,794 times.

Script Summary: Multiple Video Sizes with realtime switching supported, along with 3 different bandwidth modes! Unavailable video checking, LiveLeak support, version checking, inline embedding. YouTube's URL format means you click videos blindly. This appends the title of a YouTube link to the link in the referring page(see screens)

Version: 3.4.2

  • Finally fixed long-standing oversight on my part that did not even try to define the size of the expand/collapse icon. This led to some sites having some huge Plus/Minus pictures.
  • Per suggestion on script's forum (and something I made another script to do manually), this now will automatically append YT/LL titles to Twitter/Tweetdeck posts that use the "data-full/expanded" et al tags.
  • If tweets don't use those tags (some inline twitter things on certain websites always just use the URL shortener without any indication of what the real page is) I recommend My URL Unshortener script


  • FireFox 17 finally broke the metadata hack used for updates. So, time for using the 'approved' way.


  • Had to fix Medium Bandwidth mode. YouTube updated the mobile site.


  • Fixed error with LiveLeak and other permissions errors as this gets propered up


  • Embedded Videos for some reason were not stopping anymore when collapsed, which was annoying. Fixed that.
  • Updated embed code to disable keyboard controls, since they were interfering with browsing a page while a video was being shown.


  • Quick fix for people who decide to use the watch_popup url for YouTube links


  • Whoops, starting embedded video at certain time was broken. Fixed.
  • Set embedded player controls to slide away when video starts


  • Fixed embedded player not using latest version
  • Added new option to disable video annotations by default, since they can be annoying [enabled by default]
  • Added support for time-shifted playing in the embedded player, which was a "convert time to seconds and make it a parameter" thing


  • Added support for links that are "Time Jumped" to a specific time. Feature not available in the embedded player (by YouTube's design), but the actual link will maintain the URL structure if it is one of those "link to video but start it at this time" links

[d:12.16.11][u:Incredible Embeddable Update!
In addition to the new "Bandwidth Mode" from the last update, I've decided to add Multiple Video Sizes for the embedded videos

  • Realtime controls hover next to the "-" icon when you toggle an embedded video!
  • Also, 3 Options exist in the UserScript Commands menu (Small, Medium, Large) which allow you to choose the default size for embedded videos!
  • Also updated the embedded player to Version 3, in line with YouTube's current embed linking system

[d:12.14.11][u:Added New Option to Choose Bandwidth Mode

  • 3 Options in the UserScript Commands menu: Full, Medium, Lowest
  • Full is how it's been doing it: loading the actual URL and grabbing info.
  • Medium loads the mobile site, which does not contain as many specific error messages
  • Lowest grabs the meta using the YouTube API. There are barely any error messages returned via this API
  • Full is selected by default
Also updated stuff in updater/options windows/etc. that have been overlooked for a while and could actually have caused problems with other scripts/pages]

[d:11.17.11][u:Added support for appending error messages/detecting if a video is still available on YouTube.
If a video is unavailable, it'll tell you the reason and disable the embedding automatically.

Quick Update: YouTube puts HTML in their disabled messages, which can play hell with this. Quick fix to strip that.]

[d:10.25.11][u:Since I'm an avid Farker, I've noticed more videos from LiveLeak appearing on the Video Tab. So, I decided to add support for that site as well]

[d:8.16.11][u:Small AJAX tweak (why run on a timeout when you're a DOM insert method?), small fixes here and there to display (tooltip, options page, etc.)]

[d:7.08.11][u:Finally decided to play with querySelector and made this guy work on AJAX sites like Twitter! Same goodness, now with constant feeding :) Gonna call it 3.0 because of this. Thanks to Martii's AJAX guide @]

[d:6.17.11][u:First update in a while, but that link format is getting more popular and this was not even scanning for it]

[d:3.04.11][u:fixing this broke unicode/html titles. fixed that and added a check for age restricted video (doesn't bypass, though)]

[d:3.03.11][u:wtf youtube, way to break every link in this by changing your whole background code. Well, this is fixed.]

Further tweaks to the meta.js, should be done in a way that doesn't interfere with sites' layouts.

Using meta.js routines for script updating, which is apparently a lower-bandwidth method.

Fixed the no fullscreen button on embedded videos (YouTube altered embed code a bit). Also uses the no-cookie method for embedding now (YouTube calls it privacy mode).

Finally got around to fixing the whole embeddable/disabled thing.

Better online version checking implemented. Will automatically check for latest version. You can choose "Remind Me Later" to suppress the prompts for a little while. Clicking the shadowed area will suppress the prompts as well, but for a shorter duration than the button.

Fixed it messing up when titles contained apostrophes. YouTube used to escape those characters in the titles.

Over a year without updates needed. Then YouTube changes its layout. Quick changes to get it working again, but can be worked on... I think. Will see later, but at least it's working again.

Various fixes here and there with broken compatibility as the YouTube layout continues to change.

Found out that some URLs weren't working if they were not a direct YouTube link (like a FARK 'referred' link).
So, now this script just parses the 11-digit video code from a YouTube URL and fetches that, regardless of the parameters of the originating link.

Thanks to inspiration from the excellent Google Anonymizer Script, I made the settings be its own window, as opposed to toggling Greasemonkey menus. You can access the 3 options from "Tools...GreaseMonkey...User Scripts Commands...YouTube Title Adder Options".
Also, online version checking has been implemented!
In the above mentioned "YouTube Title Adder Options" window, it will check this page for the latest version of the script, and present a link in the options menu should one be available! (See Screens)
I think it'll work fine, but comment if it doesn't!

Please uninstall your old script, as I've changed the name to cease having that version # that's never changing.
Contains a fix for if an image link has a title already (like Fark's YouTube buttons), plus a better title adding method.

New Addition! Inline switchable embedding!
I got sick of wondering if a link will "pop" or not, and also just don't really enjoy loading YouTube's pages when I just want to see the video and be on my merry way... so, I added the ability to just click a small image button, placed next to the link, to show/hide the video while in the same page! It's unobtrusive, and the video will only load if you click the "show" button... so there's no page load slowdown!
If embedding is disabled for a video (like the samples on this page), you can click the icon to at least see the video thumbnail.
It can be toggled in the "User Script Commands"
See screen shots below!

Yet another fix... why can't layouts stay the same?

Updated to fix YouTube's removal of the "div" for a title, and placing it instead in the meta head. Should work again!

That was easy. Added the ability to toggle the titles on Text/Image links via the GreaseMonkey...User Script Commands... menu.

Doesn't append the innerHTML if the link is an image button (like on Fark). Test here:
This should have no text appended, but show you the video name when you mouseover:
This should be appended as per usual: Video
What I'd like to do next is make the selections have toggles, so you can set it to append text, do the mouseovers, etc. I'll get on that for the hell of it soon.

v1.2 - 9/29/07
Thanks to all who have downloaded this; it's my fastest propagating script yet. Please spread the word! I have discovered some YouTube videos apparently use a < div > to display the video title, so I had to put in an alternate fetching should the more popular header method return nothing.
In other words, I got Rick Roll'd on a Youtube link (that should tell you what the video is, btw), and was forced to update this script.
Also, contrary to a post below, this script really does not affect page loads at all. Before I did the exclusion of Google searches and YouTube's page, it would fetch titles for every video on those pages. Everything still loaded great!
Please leave any suggestions or requests in the comments, as I really am happy with how this script turned out.

v1 - 9/9/07 - Initial release
One pet peeve on the web for me is the format of YouTube's links being so obscure that you have no clue what the hell you're clicking on half the time.
This script goes through a page, seeks out the YouTube links, grabs the YouTube video's title, and appends the title to the link in the page. It bolds the title, italicizes the link, and modifies the title. No you have no excuse for not knowing what you're clicking on.




The above version is for legacy purposes, as the new version checking using metadata inside the script itself.