>>567 これでどうですか
// YoutubeDL.js ver. 0.5+mod by alice0775
document.getElementsByTagName('head')[0].innerHTML.match(/watch_fullscreen[?]video_id=([-\w]+).*?&t=([-\w]+)/m);
var id = RegExp.$1;
var t = RegExp.$2;
var url = '
http://youtube.com/get_video?video_id=' + id + '&t=' + t;
var title = document.getElementById('vidTitle') || document.getElementById('video_title') ;
title.innerHTML = '<a href="' + url + '" id="xxx">' + title.textContent + '</a>';
document.getElementById("xxx").addEventListener("click",function(event){save(event,url,title.textContent);},false);
function save(event,url,title){
if(event.button !=0) return;
event.stopPropagation();
event.preventDefault();
const IO_SERVICE = chromeWindow.Components.classes['@mozilla.org/network/io-service;1']
.getService(chromeWindow.Components.interfaces.nsIIOService);
url = IO_SERVICE.newURI(url, null, null);
//ファイルピッカーを使って保存先ファイルを決定
var fp = chromeWindow.Components.classes['@mozilla.org/filepicker;1']
.createInstance(chromeWindow.Components.interfaces.nsIFilePicker);
fp.init(window, "Save Screenshot As", fp.modeSave);
fp.appendFilters(fp.filterImages);
fp.defaultExtension = "flv";
fp.defaultString = title+'.flv';
if ( fp.show() == fp.returnCancel || !fp.file ) return;
//nsIWebBrowserPersist を使ってファイルへ保存
var wbp = chromeWindow.Components.classes['@mozilla.org/embedding/browser/nsWebBrowserPersist;1']
.createInstance(chromeWindow.Components.interfaces.nsIWebBrowserPersist);
wbp.saveURI(url, null, null, null, null, fp.file);
}