mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
This commit is contained in:
commit
cda61d0176
@ -2,13 +2,15 @@
|
||||
* from the front page or the search page, and the video will automatically
|
||||
* be loaded. */
|
||||
function load_google_video(cached) {
|
||||
if (cached.uri.match(/^http:\/\/video.google.com\/videoplay/)) {
|
||||
var re;
|
||||
re = /(<object data="\/googleplayer.swf\?videoUrl=)(.*?)(\&)/;
|
||||
var uri = cached.content.match(re)[2];
|
||||
if (!cached.uri.match(/^http:\/\/video.google.com\/videoplay/))
|
||||
return true;
|
||||
|
||||
if (uri) elinks.location = unescape(uri);
|
||||
}
|
||||
var re = /(<object data="\/googleplayer.swf\?videoUrl=)(.*?)(\&.*?<\/object>)/;
|
||||
var match = cached.content.match(re);
|
||||
var url = unescape(match[2]);
|
||||
var meta = '<meta http-equiv="refresh" content="1; url=' + url + '" />';
|
||||
|
||||
cached.content = cached.content.replace(/<head>/, "<head>" + meta);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user