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

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

[linterna-magica-commit] [20] Merge the fix for bugs #32866 from trunk t


From: Ivaylo Valkov
Subject: [linterna-magica-commit] [20] Merge the fix for bugs #32866 from trunk to 0.0.9 branch.
Date: Wed, 23 Mar 2011 13:55:50 +0000

Revision: 20
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=20
Author:   valkov
Date:     2011-03-23 13:55:50 +0000 (Wed, 23 Mar 2011)
Log Message:
-----------
Merge the fix for bugs #32866 from trunk to 0.0.9 branch.

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

Modified Paths:
--------------
    branches/0.0.9/src/lm_xhr.js

Property Changed:
----------------
    branches/0.0.9/


Property changes on: branches/0.0.9
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:6,9,11,13
   + /trunk:6,9,11,13,19

Modified: branches/0.0.9/src/lm_xhr.js
===================================================================
--- branches/0.0.9/src/lm_xhr.js        2011-03-23 13:52:11 UTC (rev 19)
+++ branches/0.0.9/src/lm_xhr.js        2011-03-23 13:55:50 UTC (rev 20)
@@ -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]