Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
SnowblindFatal
Jan 7, 2011
Hey, I know I used to have an addon (or maybe some script extension package?) that showed the title and a preview of video links posted wherever. I can't remember what it was, though, and google isn't producing too good results. Any help?

Adbot
ADBOT LOVES YOU

SnowblindFatal
Jan 7, 2011

gary oldmans diary posted:

In SA, I have the user option "Show video embedded in posts with the [video] tag?" set to No and use 2 scripts.
One I wrote to replace text Youtube links with thumbnails so I get the video preview without using the resources of an embedded player for every link (handy when the same video is quoted a dozen times on a single page.
code:
// ==UserScript==
// @name        SA YT Links Thumbed
// @namespace   [url]http://*.somethingawful.com[/url]
// @description Uses YT links to show thumbnails
// @include     [url]http://forums.somethingawful.com/*[/url]
// @version     0.1
// @grant       none
// ==/UserScript==

var vidList = document.getElementsByClassName('bbtag_video');

for (var i = 0; i < vidList.length; i++) {
    var p = /^.*youtube\.com\/watch\?v=([a-zA-Z0-9_-]{11}).*$/;
    var vidId = (vidList[i].innerHTML.match(p));
    if (vidId[1] == false) continue;
    var image = document.createElement('img');
    image.setAttribute('src', 'http://img.youtube.com/vi/' + vidId[1] + '/hqdefault.jpg');
    vidList[i].innerHTML = '';
    vidList[i].appendChild(image);
}
The other script is Youtube Link Title which embeds a floating video player (for numerous streaming sites) when you click a video link.

This setup works really well. Just the way I wanted it to.

Thanks! This seems exactly what I'm looking for. Too bad the link seems to be dead at the moment. I'll have to check it out later.

Where do you put these scripts to make them run automatically after page load?

SnowblindFatal
Jan 7, 2011
Yeah, I got it now, thanks! Everything's working perfectly.

  • Locked thread