[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linterna-magica-commit] [415] Fixed support for Dailymotion when flash
From: |
Ivaylo Valkov |
Subject: |
[linterna-magica-commit] [415] Fixed support for Dailymotion when flash plugin is present. |
Date: |
Mon, 29 Jul 2013 20:11:44 +0000 |
Revision: 415
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=415
Author: valkov
Date: 2013-07-29 20:11:43 +0000 (Mon, 29 Jul 2013)
Log Message:
-----------
Fixed support for Dailymotion when flash plugin is present. See bugs #39564 and
r412.
Revision Links:
--------------
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=412
Ticket Links:
------------
http://savannah.gnu.org/bugs/?39564
Modified Paths:
--------------
trunk/src/lm_site_dailymotion.js
Modified: trunk/src/lm_site_dailymotion.js
===================================================================
--- trunk/src/lm_site_dailymotion.js 2013-07-28 20:24:48 UTC (rev 414)
+++ trunk/src/lm_site_dailymotion.js 2013-07-29 20:11:43 UTC (rev 415)
@@ -123,14 +123,10 @@
return false;
}
-LinternaMagica.prototype.sites["dailymotion.com"].skip_video_id_extraction =
-function ()
+LinternaMagica.prototype.sites["dailymotion.com"].skip_link_extraction =
+function()
{
- // Can't extract video_id from script when flash is not
- // isntalled. The video id is always the pathname.
- var extracted_data = new Object();
- extracted_data.video_id = window.location.pathname;
- return extracted_data;
+ return false;
}
LinternaMagica.prototype.sites["dailymotion.com"].
@@ -162,9 +158,23 @@
{
var client = args.client;
var object_data = args.object_data;
- object_data.linterna_magica_id =
- this.mark_flash_object("extracted-from-script");
+ // With flash plugin installed there might be a DOM object that
+ // holds the flash player
+ var dom_object = document.getElementById("video_player_main");
+
+ if (dom_object)
+ {
+ object_data.linterna_magica_id =
+ this.mark_flash_object(dom_object);
+ }
+ else
+ {
+ object_data.linterna_magica_id =
+ this.mark_flash_object("extracted-from-script");
+
+ }
+
// !this.plugin_is_installed is removed so it could work when
// plugin is installed and HTML5 is active.
if (!object_data.linterna_magica_id &&
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [linterna-magica-commit] [415] Fixed support for Dailymotion when flash plugin is present.,
Ivaylo Valkov <=