/* Play videos at YouTube with minimal niggling. Just load the page for a video, * and the video will automatically be loaded. */ function load_youtube(cached, vs) { if (!cached.uri.match(/http:\/\/(?:www\.)?youtube\.com\/(?:watch(?:\.php)?)?\?v=(?:[^&]+).*/)) return true; var params_match = cached.content.match(/player2\.swf\?([^"]+)"/); if (!params_match) return true; var url = 'http://www.youtube.com/get_video?' + params_match[1]; var meta = ''; cached.content = cached.content.replace(/
/, "" + meta); return true; } elinks.preformat_html_hooks.push(load_youtube); /* When one tries to follow a link to