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

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

[linterna-magica-commit] [19] Fix for bugs #32866


From: Ivaylo Valkov
Subject: [linterna-magica-commit] [19] Fix for bugs #32866
Date: Wed, 23 Mar 2011 13:52:12 +0000

Revision: 19
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=19
Author:   valkov
Date:     2011-03-23 13:52:11 +0000 (Wed, 23 Mar 2011)
Log Message:
-----------
Fix for bugs #32866

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

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

Modified: trunk/src/lm_xhr.js
===================================================================
--- trunk/src/lm_xhr.js 2011-03-21 08:28:45 UTC (rev 18)
+++ trunk/src/lm_xhr.js 2011-03-23 13:52:11 UTC (rev 19)
@@ -35,6 +35,7 @@
     // extract them from swf object data/src attribute
     var protocol = window.location.protocol;
     var host = window.location.host;
+    var location_href = window.location.href;
     var video_id = object_data.video_id;
     var address = null;
     var method ="GET";
@@ -122,8 +123,20 @@
     if (/youtube\.com/i.test(host) || 
        /youtube-nocookie\.com/i.test(host))
     {
-       address = "/watch?v="+video_id;
+       var uri_args = null;
+       // Some clips require &skipcontrinter=1. Other might require
+       // something else.
+       if (/&/i.test(location_href))
+       {
+           uri_args = location_href.split(/&/);
+           // This is the host and path (http://...). We do not need
+           // it.
+           delete uri_args[0];
+           uri_args = uri_args.join("&");
+       }
 
+       address = "/watch?v="+video_id +(uri_args ? ("&"+uri_args) : "");
+
        // Remove cookies and fetch page again. See "A note on
        // cookies".
        this.extract_cookies();




reply via email to

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