[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linterna-magica-commit] [245] Fixes for Vimeo.
From: |
Ivaylo Valkov |
Subject: |
[linterna-magica-commit] [245] Fixes for Vimeo. |
Date: |
Sun, 29 Jan 2012 16:44:40 +0000 |
Revision: 245
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=245
Author: valkov
Date: 2012-01-29 16:44:40 +0000 (Sun, 29 Jan 2012)
Log Message:
-----------
Fixes for Vimeo. Fixed loading with flash plugin installed. Fixed CSS
displacement.
Modified Paths:
--------------
trunk/src/lm_create_video_object.js
trunk/src/lm_forbidden_objects.js
trunk/src/lm_site_vimeo.js
Modified: trunk/src/lm_create_video_object.js
===================================================================
--- trunk/src/lm_create_video_object.js 2012-01-29 08:53:17 UTC (rev 244)
+++ trunk/src/lm_create_video_object.js 2012-01-29 16:44:40 UTC (rev 245)
@@ -267,7 +267,7 @@
// Add link after the object/embed
// this.set_priority() has set this.priority
// to self if there is no plugin
- if (this.plugin_is_installed || site_html5_player)
+ if (this.plugin_is_installed || site_html5_player)
{
toggle_plugin =
this.create_toggle_plugin_link("link-not-in-header", id,
@@ -277,7 +277,13 @@
if (this.plugin_is_installed && !site_html5_player)
{
- before = this.get_flash_video_object(id).nextSibling;
+ // Vimeo with Flash plugin installed crashes on
+ // this.get_flash_video_object(id).nextSibling stating
+ // this.get_flash_video_object(id) is null. This prevents
+ // it.
+ before = ( this.get_flash_video_object(id) &&
+ this.get_flash_video_object(id).nextSibling) ?
+ this.get_flash_video_object(id).nextSibling : null;
}
else if (site_html5_player)
{
Modified: trunk/src/lm_forbidden_objects.js
===================================================================
--- trunk/src/lm_forbidden_objects.js 2012-01-29 08:53:17 UTC (rev 244)
+++ trunk/src/lm_forbidden_objects.js 2012-01-29 16:44:40 UTC (rev 245)
@@ -31,7 +31,7 @@
// For example objects that have video id but are not the
// video object (ads and other)
LinternaMagica.prototype.skip_objects =
- [ "brozar[a-z0-9]+_add_scroll",
+ [ "brozar[a-z0-9]+_.*_scroll",
"flashRateObject", "VideoCharts",
// Facebook iframes in blip.tv
"^f[0-9]+[a-z]+",
Modified: trunk/src/lm_site_vimeo.js
===================================================================
--- trunk/src/lm_site_vimeo.js 2012-01-29 08:53:17 UTC (rev 244)
+++ trunk/src/lm_site_vimeo.js 2012-01-29 16:44:40 UTC (rev 245)
@@ -357,5 +357,46 @@
"5px", "important");
}
+ // The previousSibling of the Linterna Magica div is a mysterious
+ // div (stays white) with class="s bu" that has height set to
+ // 100%. This displaces LM. This div should hold the SWF object,
+ // but it is missing.
+
+ var lm = document.getElementById("linterna-magica-"+
+ object_data.linterna_magica_id);
+
+ if (lm)
+ {
+ var div_sbu = lm.previousSibling;
+ if (/HTMLDiv/i.test(div_sbu) &&
+ div_sbu.hasAttribute("class") &&
+ /s bu/i.test(div_sbu.getAttribute("class")) &&
+ !site_html5_player)
+ {
+ div_sbu.parentNode.removeChild(div_sbu);
+ }
+ }
+
return false;
}
+
+// Sometimes IceCat renders two Linterna Magica
+// players. The following tries to prevent it.
+LinternaMagica.prototype.sites["vimeo.com"].
+ process_duplicate_object_before_xhr =
+function(object_data)
+{
+ this.log("LinternaMagica.sites.process_duplicate_object_before_xhr:\n"+
+ "Removing/hiding duplicate object ",1);
+
+ this.hide_flash_video_object(object_data.linterna_magica_id,
+ object_data.parent);
+
+ return false;
+}
+
+LinternaMagica.prototype.sites["vimeo.com"].
+ skip_video_id_extraction = function()
+{
+ return null;
+}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [linterna-magica-commit] [245] Fixes for Vimeo.,
Ivaylo Valkov <=