YouTube Title Adder

By Smiths Last update Jan 20, 2012 — Installed 14,683 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 18 posts, 9 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
J Smith User

any idea why this script doesnt work in opera?

 
BorisTheBrave User

I recommend adding the following lines directly before the if ((link.innerHTML ... part.

var w=videoname[1].toLowerCase().split(/\s*\b\s*/);
var v=link.innerHTML.replace(/<[^>]+>/gi,"").toLowerCase().split(/\s*\b\s*/).filter(function(t){return t.length>2});
if(v.filter(function(t){return w.indexOf(t)!=-1}).length/v.length>0.5) return;

This checks if the link already has the correct name, and then doesn't change it if it does. I have mine set up to change the 'mouseover' text regardless.

 
Smiths Script's Author

It looks like those pages need to be added to the exclude list. What's the URL of a favorites page?

I don't use YouTube really (hence my hatred of blind links), and definitely don't use it enough to have an account and page on it... so I just exclude pages that affect me.

you can add in the excluded pages under greasemonkey...manage user scripts... and select the YouTube Title Adder and click "Add" under the "the following sites are excluded..." box.

 
jtr3030 User

Here are some screenshots that might help explain:

Before installation:

http://img136.imageshack.us/img136/1060/ytfavs8...

http://img50.imageshack.us/img50/8118/ytsubs888...

http://img136.imageshack.us/img136/679/ytvid888...

After:

http://img136.imageshack.us/img136/4059/ytvid99...

http://img50.imageshack.us/img50/2336/ytsubs999...

http://img50.imageshack.us/my.php?image=ytfavs9...

 
jtr3030 User

I wanted to use it on YouTube. The problem is that the "Subscriptions", "My Videos", and "Favorites" pages only show half the title or so for each video, so you never know what each video actually is before clicking on it. They don't even have a hover feature. That's the main reason this script interested me.

Then when you watch a YouTube video on the YouTube site, there are links to other videos and all the titles get appended to and the whole page is a huge mess. You can barely read the comments or anything.

I've tried messing with the script but I'm programming illiterate so I broke it. I'll try again though.

Do you know if there is a way to just extend the file name rather than append to it? Or maybe erase the original file name at least partially and just view the appendage?

 
Smiths Script's Author

{ link.innerHTML = '' + link.innerHTML + " (YT: " + videoname[1] + ")"; }

That is how it outputs after a link. You can play with that for formatting.

As far as showing up for "many links on the site", I am not sure what you mean. You may just want to add an exclusion in Greasemonkey for specific sites if it's a bother.

Right now, it excludes:
// @exclude http://*.youtube.com/*
// @exclude http://youtube.com/*
// @exclude http://*.google.*/search?*

 
jtr3030 User

Is there any way I can remove the first part of the title and just display the "(YT:" part? Then is there anyway I can remove the "(YT:" part so just the title appears?

Also, the "(YT:" links are appended to many links on the site and the page is filled with them.

I really want something like this - I even made a forum post about it - but this is much too buggy.

 
Barnfish User

Also stopped working for me. I tried uninstall/reinstall, still not working.

 
rargy User

Hmm, it recently stopped working for me. Not sure if it's the scripts problem or my own.

 
bl_nk Scriptwright

Unbelievable! Thank you!!!

 
Smiths Script's Author

You can comment out the line:
link.innerHTML = '' + link.innerHTML + " (YT: " + videoname[1] + ")"; with a // to avoid the innerHTML changing, then it'll just modify the title.
I'll see what making the identifier exclude images that are links to a video (like a Youtube button on Fark, for example) does.

 
bl_nk Scriptwright

I am loving this script!

However it also adds titles to image links which tends to mess up the layout of pages. It would be a really nice addition to make the YT titles optionally show only in mouse-over tips - for text links too :)

Just my two cents :]

 
Smiths Script's Author

You know, doing all these scripts I never caught on to changing the Title = having to uninstall old one (since I just upload the script by pasting the source code from my machine).

I apologize to all for having to uninstall/reinstall. I'll keep it titled as "1.2" from now on, even if i make changes.

Thanks for the heads up!

 
bl_nk Scriptwright

Yes you were right, didn't notice any change in load times.

You shouldn't change the name of the script though, makes upgrading more complicated as users have to uninstall the previous version.

 
Smiths Script's Author

You'd be surprised how it really doesn't.

 
bl_nk Scriptwright

I bet this damages pageloads a lot

 
Bloigen User

Inspired idea and great work.

Highly recommended to all reading this page.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel