linterna-magica-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linterna-magica-commit] [340] Better fix for YouTube.


From: Ivaylo Valkov
Subject: [linterna-magica-commit] [340] Better fix for YouTube.
Date: Sat, 08 Dec 2012 13:18:50 +0000

Revision: 340
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=340
Author:   valkov
Date:     2012-12-08 13:18:49 +0000 (Sat, 08 Dec 2012)
Log Message:
-----------
Better fix for YouTube. Bugs #37881.

Ticket Links:
------------
    http://savannah.gnu.org/bugs/?37881

Modified Paths:
--------------
    trunk/src/lm_site_youtube.js

Modified: trunk/src/lm_site_youtube.js
===================================================================
--- trunk/src/lm_site_youtube.js        2012-12-07 19:14:26 UTC (rev 339)
+++ trunk/src/lm_site_youtube.js        2012-12-08 13:18:49 UTC (rev 340)
@@ -385,10 +385,12 @@
        embed_id= embed_id[embed_id.length-1];
     }
 
+    var p = this.get_first_element_by_class("flash-player");
+    p = p ? p : this.get_first_element_by_class("html5-player");
+
+
     if (!width || !height)
     {
-       var p = this.get_first_element_by_class("player-root");
-
        height = p ? p.clientHeight : null;
        width  = p ? p.clientWidth : null;
     }
@@ -440,7 +442,7 @@
        linterna_magica_id =
            this.mark_flash_object("extracted-from-script");
 
-       object_data.parent =  this.get_first_element_by_class("player-root");
+       object_data.parent =  p;
     }
 
     object_data.linterna_magica_id = linterna_magica_id;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]