The Greasemonkey script given below creates a hyperlink on the top of the webpage to save YouTube and other online video's on local machine. Just follow the below steps:
1. Install Greasemonkey Extension for Firefox.
2. Go to Website for which you want to download the video.
3. Install this script:
Code:
// ==UserScript==
var download_url = 'http://website_name/link_of_video';
var playerDiv = document.getElementById('movie_player');
var t_id = playerDiv.src.match(/t=([^(\&|$)]*)/)[1];
var url_vars = window.location.href.split("?")[1];
var video_id = url_vars.match(/v=([^(\&|$)]*)/)[1];
var video_url = download_url + video_id + '&t=' + t_id;
// add banner with download link
var my_banner = document.createElement("div");
my_banner.innerHTML = '<div style="border-bottom: 1px solid #CCCCCC; margin-bottom: 10px; font-size: small; background-color: #FF0000; color: #FFFFFF;">' +
'<p style="margin:0px;padding: 5px;text-align:center;">' +
'<a href="' + video_url + '" style="color:#FFFFFF; font-weight:bold; font-size:10px;">"Save As" to download Flash video</a>' +
'</p></div>';
document.body.insertBefore(my_banner, document.body.firstChild);
document.body.style.margin = '0px';
4. Refresh web browser page to see "Save As" link
Bookmarks