HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/thread-self/root/usr/share/doc/elinks-data/examples/smjs/google_video.js
/* 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, vs) {
	if (!cached.uri.match(/^http:\/\/video.google.com\/videoplay/))
		return true;

	var re = /(?:videoUrl(?:\\u003d|=))(.*?)\&/;
	var match = cached.content.match(re);
	var url = unescape(match[1]);
	var meta = '<meta http-equiv="refresh" content="1; url=' + url + '" />';

	cached.content = cached.content.replace(/<head>/, "<head>" + meta);

	return true;
}
elinks.preformat_html_hooks.push(load_google_video);