[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linterna-magica-commit] [342] Fixes the HD links list overlapping in Yo
From: |
Ivaylo Valkov |
Subject: |
[linterna-magica-commit] [342] Fixes the HD links list overlapping in YouTube's new interface. |
Date: |
Sun, 09 Dec 2012 08:30:25 +0000 |
Revision: 342
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=342
Author: valkov
Date: 2012-12-09 08:30:25 +0000 (Sun, 09 Dec 2012)
Log Message:
-----------
Fixes the HD links list overlapping in YouTube's new interface. Bugs
#37881.
Ticket Links:
------------
http://savannah.gnu.org/bugs/?37881
Modified Paths:
--------------
trunk/src/lm_interface_hd_links.js
trunk/src/lm_site_youtube.js
trunk/src/lm_sites.js
Modified: trunk/src/lm_interface_hd_links.js
===================================================================
--- trunk/src/lm_interface_hd_links.js 2012-12-08 13:22:22 UTC (rev 341)
+++ trunk/src/lm_interface_hd_links.js 2012-12-09 08:30:25 UTC (rev 342)
@@ -131,7 +131,11 @@
if (display)
{
hd_list.style.removeProperty("display");
-
+ var self = this;
+ this.call_site_function_at_position.apply(self,[
+ "post_show_hd_links_list",
+ window.location.hostname]);
+
var hd_list_blur_function = function(ev)
{
var timeout_function = function()
@@ -144,6 +148,9 @@
{
hd_list.style.setProperty("display",
"none", "important");
+ self.call_site_function_at_position.apply(self,[
+ "post_hide_hd_links_list",
+ window.location.hostname]);
}
element.removeEventListener("blur",
hd_list_blur_function,
@@ -160,6 +167,10 @@
else
{
hd_list.style.setProperty("display", "none", "important");
+ var self = this;
+ this.call_site_function_at_position.apply(self,[
+ "post_hide_hd_links_list",
+ window.location.hostname]);
}
}
return true;
Modified: trunk/src/lm_site_youtube.js
===================================================================
--- trunk/src/lm_site_youtube.js 2012-12-08 13:22:22 UTC (rev 341)
+++ trunk/src/lm_site_youtube.js 2012-12-09 08:30:25 UTC (rev 342)
@@ -663,3 +663,41 @@
return false;
}
+
+// Fixes the overlapping of the HD links list in YouTube's new design
+// See bug #37881
+// http://savannah.nongnu.org/bugs/?37881
+LinternaMagica.prototype.sites["youtube.com"].post_show_hd_links_list =
+function()
+{
+ var play_list= document.getElementById("watch7-playlist-tray-container");
+ if (play_list)
+ {
+ play_list.style.setProperty("display", "none", "important");
+ }
+
+ var side_bar= document.getElementById("watch7-sidebar");
+ if (side_bar)
+ {
+ side_bar.style.setProperty("display", "none", "important");
+ }
+}
+
+// Fixes the overlapping of the HD links list in YouTube's new design
+// See bug #37881
+// http://savannah.nongnu.org/bugs/?37881
+LinternaMagica.prototype.sites["youtube.com"].post_hide_hd_links_list =
+function()
+{
+ var play_list= document.getElementById("watch7-playlist-tray-container");
+ if (play_list)
+ {
+ play_list.style.removeProperty("display");
+ }
+
+ var side_bar= document.getElementById("watch7-sidebar");
+ if (side_bar)
+ {
+ side_bar.style.removeProperty("display");
+ }
+}
Modified: trunk/src/lm_sites.js
===================================================================
--- trunk/src/lm_sites.js 2012-12-08 13:22:22 UTC (rev 341)
+++ trunk/src/lm_sites.js 2012-12-09 08:30:25 UTC (rev 342)
@@ -314,6 +314,21 @@
return true;
}
+// Execute an action after the HD link list is shown.
+LinternaMagica.prototype.sites.__post_show_hd_links_list =
+function()
+{
+ return true;
+}
+
+// Execute an action after the HD link list is hidden.
+LinternaMagica.prototype.sites.__post_hide_hd_links_list =
+function()
+{
+ return true;
+}
+
+
// Check if site specific config and function exists and call it. If
// it doesn't, call the general/default function. A function returns
// false/null, if the calling function should exit/return after this
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [linterna-magica-commit] [342] Fixes the HD links list overlapping in YouTube's new interface.,
Ivaylo Valkov <=