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

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

[linterna-magica-commit] [418] Fixes bugs #39726.


From: Ivaylo Valkov
Subject: [linterna-magica-commit] [418] Fixes bugs #39726.
Date: Wed, 28 Aug 2013 20:27:32 +0000

Revision: 418
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=418
Author:   valkov
Date:     2013-08-28 20:27:13 +0000 (Wed, 28 Aug 2013)
Log Message:
-----------
Fixes bugs #39726. Displays a message about mixed content blocking in FF. 
Provides a liink to the clip without HTTPS.

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

Modified Paths:
--------------
    trunk/data/style/template.css
    trunk/src/lm_create_video_object.js

Modified: trunk/data/style/template.css
===================================================================
--- trunk/data/style/template.css       2013-07-30 21:49:41 UTC (rev 417)
+++ trunk/data/style/template.css       2013-08-28 20:27:13 UTC (rev 418)
@@ -47,10 +47,27 @@
 
 
 /* The message paragraph in the object */
-.linterna-magica p {
+.linterna-magica p,
+.linterna-magica-video-object-messages p {
     color:#ffffff !important
 }
 
+.linterna-magica-video-object-messages p a {
+    color: #bbbbbb !important;
+    text-decoration: underline !important;
+    font-style: none !important;
+}
+
+.linterna-magica-video-object-messages p {
+    padding-top: 10px;
+    padding-bottom: 10px;
+}
+
+.linterna-magica-video-object-messages {
+    overflow: auto !important;
+}
+
+
 .linterna-magica-web-log-header a,
 .linterna-magica a {
     outline: 0 !important;

Modified: trunk/src/lm_create_video_object.js
===================================================================
--- trunk/src/lm_create_video_object.js 2013-07-30 21:49:41 UTC (rev 417)
+++ trunk/src/lm_create_video_object.js 2013-08-28 20:27:13 UTC (rev 418)
@@ -73,6 +73,7 @@
     var container = document.createElement("div");
     var object_tag_wrapper = document.createElement("div");
     var object_tag = document.createElement("object");
+    var message_wrapper = document.createElement("div");
     var message = document.createElement("p");
     var param = document.createElement("param");
 
@@ -150,14 +151,69 @@
        object_tag.setAttribute("data", object_data.link);
     }
 
-    message.textContent = this._("Waiting for video plugin...");
-    message.style.setProperty("height", object_data.height+"px",
+    message.textContent = this._("Waiting for video plugin to load ...");
+    message_wrapper.setAttribute("class",
+                                "linterna-magica-video-object-messages");
+    message_wrapper.style.setProperty("height", object_data.height+"px",
                                 "important");
 
-    message.style.setProperty("width", object_data.width+"px",
+    message_wrapper.style.setProperty("width", object_data.width+"px",
                                 "important");
 
+    message_wrapper.appendChild(message);
 
+
+    // Firefox Mixed Content blocker
+    // https://savannah.nongnu.org/bugs/?39726
+    if(/https:/i.test(window.location.protocol) &&
+       /http:/i.test(object_data.link))
+    {
+       var message_mixed = document.createElement("p");
+       message_mixed.textContent =
+           this._("It seems that the page is serving mixed "+
+                  "content and Linterna M\u00e1gica "+
+                  "might not be able to play the video, because "+
+                  "of mixed content blocking.");
+
+       message_wrapper.appendChild(message_mixed);
+
+       var mixed_content = document.createElement("a");
+       mixed_content.textContent =
+           this._("Read about mixed content blocking in Firefox (forks and 
clones as well)");
+       mixed_content.setAttribute("href", 
+                      "https://blog.mozilla.org/tanvi/2013/04/10/"+
+                      "mixed-content-blocking-enabled-in-firefox-23/");
+
+       message_mixed = document.createElement("p");
+       message_mixed.appendChild(mixed_content);
+
+       message_wrapper.appendChild(message_mixed);
+
+
+       message_mixed = document.createElement("p");
+       var mixed_addon = document.createElement("a");
+       mixed_addon.setAttribute("href",
+                                "https://addons.mozilla.org/en-us/firefox/"+
+                                "addon/toggle-mixed-active-content/");
+
+       mixed_addon.textContent = this._("Check out the Toggle Mixed "+
+                                        "Active Content addon");
+
+       message_mixed.appendChild(mixed_addon);
+       message_wrapper.appendChild(message_mixed);
+
+       var no_https = document.createElement("a");
+       no_https.setAttribute("href",
+                             window.location.href.replace("https:", "http:"));
+
+       no_https.textContent = this._("View the page without encryption"+
+                                     " on your own risk");
+
+       message_mixed = document.createElement("p");
+       message_mixed.appendChild(no_https);
+       message_wrapper.appendChild(message_mixed);
+    }
+
     param.setAttribute("name", "autoplay");
     // Find if a clip is already playing.
     var started_clip = this.find_started_clip();
@@ -190,7 +246,7 @@
     param.setAttribute("value",  true);
     object_tag.appendChild(param);
 
-    object_tag.appendChild(message);
+    object_tag.appendChild(message_wrapper);
 
     object_tag_wrapper.appendChild(object_tag);
     container.appendChild(object_tag_wrapper);




reply via email to

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