- 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?
|
#
?
Jun 14, 2015 16:17
|
|
- Adbot
-
ADBOT LOVES YOU
|
|
#
?
Sep 11, 2024 00:33
|
|
- gary oldmans diary
- Sep 26, 2005
-
|
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 http://*.somethingawful.com
// @description Uses YT links to show thumbnails
// @include http://forums.somethingawful.com/*
// @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.
gary oldmans diary fucked around with this message at 22:53 on Aug 1, 2015
|
#
?
Jun 15, 2015 05:54
|
|
- SnowblindFatal
- Jan 7, 2011
-
|
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?
|
#
?
Jun 15, 2015 14:16
|
|
- gary oldmans diary
- Sep 26, 2005
-
|
Install the Greasemonkey Firefox add-on, restart Firefox, then you can save mine as a .js and drag it into the Firefox window and just click the Install this script on the site I linked for the other one.
Note that you don't have to change your SA settings and use my SA script for the other one to do what it does (though I much prefer using them both). Try it first by itself so you know what it does.
|
#
?
Jun 16, 2015 05:30
|
|
- SnowblindFatal
- Jan 7, 2011
-
|
Yeah, I got it now, thanks! Everything's working perfectly.
|
#
?
Jun 16, 2015 13:46
|
|