2005-10-23

Show links to embedded media user script

I can't recall how often I've looked up the URL of an embedded video or Flash file in the HTML source or page info (Firefox). So I wrote a Greasemonkey user script to add a link to the embedded media.

0.4

  • Improved positioning using the positioning method I used in my select element filter user script.
  • embed tags nested in an object tag now overwrite the object tag.
  • You can now exclude embedded media by mime type. This method is more reliable than excluding extensions.
  • The link is now inserted above the embedded media. When the embedded media was placed in a popup window the link sometimes wasn't visible.

0.3

Improved positioning and improved extension detection.

0.2

You can now exclude media by extension and I've added some basic styling.

11 comments:

Anonymous said...

Afaik you can also use Adblock. It shows a Adblock tab on the embedded object with the URL. Didn't use FF for some time, but just checked it and that was indeed the extension I had.

Anonymous said...

I never thought of that, and I have got the thing (Adblock Plus) installed...

Anonymous said...

http://adblock.mozdev.org/

Anonymous said...

Love the script, however I cannot seem to get it correctly working with Filecabi.net media selections; any suggestions or changes I could make to the script to get it working would be greatly appreciated.

Anonymous said...

There are more sites where the script currently doesn't work. Please report them and I'll give them a look.

Anonymous said...

Any chance we can get a test site to test this script on?

I don't think it works for break.com. All we need to do is put in the extension into the script right?

Anonymous said...

I made my own version of a Add Link!
It works on those pages mentioned. I sent it to Jasper to be validated, maybe he can put it on his page.
If you want it tell me where to put it, or I could just publish it on userscripts.org.

Me Email

Jasper said...

Just tested this script on both break.com and filecabi.net and it works fine.

On filecabi.net you need to copy the link location and open the URL from your media player however. That's because filecabi.net isn't sending the correct mime type.

Anonymous said...

How comes this script doesnt work on http://frankklepacki.com/ there is an audio player at the bottom of that site, how can I use this script to get the url links?

Jasper said...

@HarpsS1ngh: that's because it's a Flash application. You can get the Flash location if you like, but then you need to change the filter expression:

var excludeRe = /flash/i; // exclude media types that match this expression

to

var excludeRe = /^$/i; // exclude media types that match this expression

Anonymous said...

Yourfilehost has added a phpscript that is unfortunately included in the link that your script creates.

Think you could fix it? Basically search and delete this:

postroll.php?vidlink=

Here is an example video:
http://www.yourfilehost.com/postroll.php?vidlink=http://38.101.8.12/dl/37a4d57f728d9cb827c07506d9dddf17/45a3adf0/video/fighter_jet_crash.wmv