[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linterna-magica-commit] [32] Fixes the web log element visibility in if
From: |
Ivaylo Valkov |
Subject: |
[linterna-magica-commit] [32] Fixes the web log element visibility in iframes/ objects for remotely embedded clips |
Date: |
Tue, 05 Apr 2011 09:32:41 +0000 |
Revision: 32
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=32
Author: valkov
Date: 2011-04-05 09:32:40 +0000 (Tue, 05 Apr 2011)
Log Message:
-----------
Fixes the web log element visibility in iframes/objects for remotely embedded
clips
Modified Paths:
--------------
trunk/src/lm_constructors.js
Modified: trunk/src/lm_constructors.js
===================================================================
--- trunk/src/lm_constructors.js 2011-04-04 19:46:09 UTC (rev 31)
+++ trunk/src/lm_constructors.js 2011-04-05 09:32:40 UTC (rev 32)
@@ -30,6 +30,36 @@
// Linterna Mágica constructor
function LinternaMagica(params)
{
+ // FIXME: This might be used in a frame and after the object is
+ // replaced, everithing else to be removed leaving only the
+ // video. This way it might be possible to play videos from remote
+ // sites in Epiphany (no GM_ API and xmlHttpReqeust is restricted to
+ // the same origin).
+
+ var w = null;
+
+ // GNU IceCat and other version of Firefox with Greasemonkey
+ try
+ {
+ w = unsafeWindow;
+ }
+ catch(e)
+ {
+ w = window;
+ }
+
+ if (w.top != w.self)
+ {
+ this.log("LinternaMagica.constructor:\n"+
+ "Skipping (i)frame with address: "+
+ window.location,1);
+ return null;
+ }
+
+ // The code above should be executed before the web logger
+ // element. Otherwise it is created and visible in iframes and
+ // objects that are used to embed clips in remote sites.
+
this.debug_level = params.debug;
if (this.debug_level && params.log_to == "web")
@@ -60,32 +90,6 @@
this.log_to = "console";
}
- // FIXME: This might be used in a frame and after the object is
- // replaced, everithing else to be removed leaving only the
- // video. This way it might be possible to play videos from remote
- // sites in Epiphany (no GM_ API and xmlHttpReqeust is restricted to
- // the same origin).
-
- var w = null;
-
- // Firefox adn forks in Greasemonkey
- try
- {
- w = unsafeWindow;
- }
- catch(e)
- {
- w = window;
- }
-
- if (w.top != w.self)
- {
- this.log("LinternaMagica.constructor:\n"+
- "Skipping (i)frame with address: "+
- window.location,1);
- return null;
- }
-
// Skip ted.com at the front page. With Gnash installed the flash
// object is created. The flashvars attrubute value is 24 KB
// (kilo*bytes*) and Firefox and forks block
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [linterna-magica-commit] [32] Fixes the web log element visibility in iframes/ objects for remotely embedded clips,
Ivaylo Valkov <=