mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
Add a rewrite rule for video.google.com to automatically play videos
From the file: Play videos at video.google.com with minimal niggling. Just follow the link from the front page or the search page, and the video will automatically be loaded.
This commit is contained in:
parent
46ba880e47
commit
bb866498a1
15
contrib/smjs/google_video.js
Normal file
15
contrib/smjs/google_video.js
Normal file
@ -0,0 +1,15 @@
|
||||
/* Play videos at video.google.com with minimal niggling. Just follow the link
|
||||
* 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 (uri) elinks.location = unescape(uri);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
elinks.preformat_html_hooks.push(load_google_video);
|
Loading…
x
Reference in New Issue
Block a user