From 8391080201b8242929e8d8ff1a342059a4ec741a Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Wed, 25 Jan 2006 15:50:51 +0000 Subject: [PATCH 1/2] Reflow some logic in google_video.js. --- contrib/smjs/google_video.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/contrib/smjs/google_video.js b/contrib/smjs/google_video.js index c89d2adb..ed9770d9 100644 --- a/contrib/smjs/google_video.js +++ b/contrib/smjs/google_video.js @@ -2,13 +2,12 @@ * 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 = /( Date: Wed, 25 Jan 2006 15:52:19 +0000 Subject: [PATCH 2/2] Use refresh instead of elinks.location method. Instead of assigning the URI for the video to elinks.location, instead create a tag to automatically load the video. This way, the video will still be automatically loaded when the document is loaded from cache. --- contrib/smjs/google_video.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/contrib/smjs/google_video.js b/contrib/smjs/google_video.js index ed9770d9..f267941f 100644 --- a/contrib/smjs/google_video.js +++ b/contrib/smjs/google_video.js @@ -4,10 +4,13 @@ function load_google_video(cached) { if (!cached.uri.match(/^http:\/\/video.google.com\/videoplay/)) return true; - var re = /()/; + var match = cached.content.match(re); + var url = unescape(match[2]); + var meta = ''; + + cached.content = cached.content.replace(//, "" + meta); return true; }