YouTube Favourites Search v0.04
Changelog:
- Fixed: Videos that are displayed as search results now have correct background colours (e.g. grey, white, grey, white)
Detailed Description:
This was a minor release with a simple fix to a problem I had found. Really it wasn't that big of a problem. Just when I removed videos from the list and left only the ones that matched the users search query sometimes you wouldn't have the same pattern of alternating colours that YouTube had in the first place (i.e. every even numbered video has a grey background, every odd numbered video has a white background).The fix was a simple one. A variable was defined and set to the CSS class "video even" which gives the movie a grey background. Then every time a movie is a successful match to the search query its CSS class would be changed to either "video even" if the previous one was "video odd" or "video odd" if the previous line was "video even".
//Variable decleration
var videoCSSClass = "video even";
//more code here...
//Remaining code
videos[i].setAttribute("class", videoCSSClass);
if (videoCSSClass == "video even")
{
videoCSSClass = "video odd";
}
else
{
videoCSSClass = "video even";
}
Thanks
YouTube Favourites Search Allows users to search their favoured YouTube videos from the Favourites page