[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linterna-magica-commit] [151] Changes for tasks #11216.
From: |
Ivaylo Valkov |
Subject: |
[linterna-magica-commit] [151] Changes for tasks #11216. |
Date: |
Thu, 21 Jul 2011 13:24:42 +0000 |
Revision: 151
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=151
Author: valkov
Date: 2011-07-21 13:24:41 +0000 (Thu, 21 Jul 2011)
Log Message:
-----------
Changes for tasks #11216. Added rules in the code for removing missing plugin
warnings. One runs at the end of the function, the other in the loop that
checks every node.
Ticket Links:
------------
http://savannah.gnu.org/task/?11216
Modified Paths:
--------------
branches/task-11216/src/lm_remove_plugin_install_warning.js
branches/task-11216/src/lm_site_bliptv.js
branches/task-11216/src/lm_site_clipovetecom.js
branches/task-11216/src/lm_sites.js
Modified: branches/task-11216/src/lm_remove_plugin_install_warning.js
===================================================================
--- branches/task-11216/src/lm_remove_plugin_install_warning.js 2011-07-20
19:20:20 UTC (rev 150)
+++ branches/task-11216/src/lm_remove_plugin_install_warning.js 2011-07-21
13:24:41 UTC (rev 151)
@@ -102,7 +102,6 @@
// video.fensko.com has ancor and text node that share
// the text. Leaving it is just irritating
-
if (/^a$/i.test(node.localName) &&
node.nextSibling &&
node.nextSibling.nodeType === 3 &&
@@ -121,29 +120,30 @@
}
}
- // FIXME Temporary fix for Blip.tv. Will replace the HTML5
- // player, otherwise two are visible. 14.06.2011 With the
- // changes in Blip.tv design and logic, I am unable to find
- // how to turn HTML5 and test this. I always get the flash
- // player.
- if (/blip\.tv/i.test(window.location.hostname))
+ var self = this;
+ var val = this.call_site_function_at_position.apply(self,[
+ "plugin_install_warning_loop",
+ window.location.hostname, node]);
+
+ if (val && typeof(val) != "boolean")
{
- if (node.parentNode)
- {
- node.parentNode.removeChild(node);
- }
+ // Useless for now. The place where it is used
+ // (lm_site_bliptv.js) just removes the node on condition.
+ node = val;
}
-
+
node = new_node;
}
- // Not a plugin warning, but the best place for this. Remove div
- // element blocking the new object.
+ var self = this;
+ var val = this.call_site_function_at_position.apply(self,[
+ "plugin_install_warning",
+ window.location.hostname, node]);
- if (/clipovete\.com/i.test(window.location.hostname))
+ if (val && typeof(val) != "boolean")
{
- var ads = document.getElementById('ads_video');
- if (ads)
- ads.parentNode.removeChild(ads);
+ // Useless for now. The place where it is used
+ // (lm_site_clipovetecom.js) does not change the node.
+ node = val;
}
}
Modified: branches/task-11216/src/lm_site_bliptv.js
===================================================================
--- branches/task-11216/src/lm_site_bliptv.js 2011-07-20 19:20:20 UTC (rev
150)
+++ branches/task-11216/src/lm_site_bliptv.js 2011-07-21 13:24:41 UTC (rev
151)
@@ -108,3 +108,20 @@
return result;
}
+
+LinternaMagica.prototype.sites["blip.tv"].plugin_install_warning_loop =
+function(node)
+{
+ // FIXME Temporary fix for Blip.tv. Will replace the HTML5
+ // player, otherwise two are visible. 14.06.2011 With the
+ // changes in Blip.tv design and logic, I am unable to find
+ // how to turn HTML5 and test this. I always get the flash
+ // player.
+ if (node.parentNode)
+ {
+ node.parentNode.removeChild(node);
+ }
+
+ return null;
+}
+
Modified: branches/task-11216/src/lm_site_clipovetecom.js
===================================================================
--- branches/task-11216/src/lm_site_clipovetecom.js 2011-07-20 19:20:20 UTC
(rev 150)
+++ branches/task-11216/src/lm_site_clipovetecom.js 2011-07-21 13:24:41 UTC
(rev 151)
@@ -49,3 +49,17 @@
{
return "http://storage.puiako.com/clipovete.com/videos/"+link +".flv";
}
+
+LinternaMagica.prototype.sites["blip.tv"].plugin_install_warning =
+function(node)
+{
+ // Not a plugin warning, but the best place for this. Remove div
+ // element blocking the new object.
+ var ads = document.getElementById('ads_video');
+ if (ads)
+ {
+ ads.parentNode.removeChild(ads);
+ }
+
+ return null;
+}
Modified: branches/task-11216/src/lm_sites.js
===================================================================
--- branches/task-11216/src/lm_sites.js 2011-07-20 19:20:20 UTC (rev 150)
+++ branches/task-11216/src/lm_sites.js 2011-07-21 13:24:41 UTC (rev 151)
@@ -202,12 +202,28 @@
return true;
}
+// Execute at the end of the code that removes text and image warnings
+// about missing flash plugin. See
+// lm_site_clipovetecom.js:plugin_install_warning.
+LinternaMagica.prototype.sites.__plugin_install_warning = function(node)
+{
+ return true;
+}
+
+// Run code before changing the checked DOM node to the next one in
+// the loop that removes text and image warnings about missing flash
+// plugin. See lm_site_bliptv.js:plugin_install_warning_loop
+LinternaMagica.prototype.sites.__plugin_install_warning_loop =
+function(node)
+{
+ return true;
+}
+
// LinternaMagica.prototype.sites.__extract_scripts_extract_when // Condition
? DM /ted?
// LinternaMagica.prototype.sites.__wait_before_inserting_object_from-script
// FB
// LinternaMagica.prototype.sites.__extract_swfobject_regex
// LinternaMagica.prototype.sites.__match_for_video_link
// LinternaMagica.prototype.sites.__keep_amps_in_video_link
-// LinternaMagica.prototype.sites.__process_plugin_install_warning
// LinternaMagica.prototype.sites.__prepare_xhr
// LinternaMagica.prototype.sites.__process_xhr_responce
// LinternaMagica.prototype.sites.__insert_object_after_xhr
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [linterna-magica-commit] [151] Changes for tasks #11216.,
Ivaylo Valkov <=