[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linterna-magica-commit] [173] Fixes video switching at the front page o
From: |
Ivaylo Valkov |
Subject: |
[linterna-magica-commit] [173] Fixes video switching at the front page of The Onion. |
Date: |
Mon, 01 Aug 2011 19:05:32 +0000 |
Revision: 173
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=173
Author: valkov
Date: 2011-08-01 19:05:32 +0000 (Mon, 01 Aug 2011)
Log Message:
-----------
Fixes video switching at the front page of The Onion. See support #107708.
Ticket Links:
------------
http://savannah.gnu.org/support/?107708
Modified Paths:
--------------
trunk/src/lm_site_theonion.js
trunk/src/lm_xhr.js
Modified: trunk/src/lm_site_theonion.js
===================================================================
--- trunk/src/lm_site_theonion.js 2011-08-01 17:59:38 UTC (rev 172)
+++ trunk/src/lm_site_theonion.js 2011-08-01 19:05:32 UTC (rev 173)
@@ -101,7 +101,7 @@
}
var self = this;
- var click_function = function(ev)
+ this.theonion_click_wrapper_function = function(ev)
{
var el = this;
var od = object_data;
@@ -114,7 +114,8 @@
for (var i=0,l=buttons.length; i<l; i++)
{
var li = buttons[i];
- li.addEventListener("click", click_function, true);
+ li.addEventListener("click",
+ this.theonion_click_wrapper_function, true);
}
}
@@ -174,7 +175,12 @@
var onion_data = eval("("+client.responseText+")");
object_data.link = onion_data.video_url;
- this.capture_theonion_clip_change(object_data);
+ // Only the first extracted object should add this.
+ if (!this.theonion_click_wrapper_function)
+ {
+ this.capture_theonion_clip_change(object_data);
+ }
+
return object_data;
}
Modified: trunk/src/lm_xhr.js
===================================================================
--- trunk/src/lm_xhr.js 2011-08-01 17:59:38 UTC (rev 172)
+++ trunk/src/lm_xhr.js 2011-08-01 19:05:32 UTC (rev 173)
@@ -113,13 +113,14 @@
{
if (client.readyState == 4 && client.status == 200)
{
+ var host = window.location.hostname;
+
// Remove marked video_id as being retrieved already.
if (this.requested_ids[object_data.video_id+host])
{
delete this.requested_ids[object_data.video_id+host];
}
- var host = window.location.hostname;
var url;
var mime= "video/flv";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [linterna-magica-commit] [173] Fixes video switching at the front page of The Onion.,
Ivaylo Valkov <=