Skip to content

Commit

Permalink
firefox fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sxtxixtxcxh committed Feb 22, 2012
1 parent 52980e3 commit b7dc550
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@


<script>
$(function(){
var youtube = new YouTube();

var userForm = document.getElementById('usernameForm');
Expand All @@ -121,6 +122,7 @@
});

document.getElementById('videoContainer').innerHTML = embeds;

$('#videoContainer .videoThumb').click(function(){
var videoId = $(this)[0].id;
var $container = $(this).parent();
Expand All @@ -130,8 +132,7 @@
};



usernameForm.onsubmit = function(){
$(userForm).submit(function(){
var username = document.getElementById('youtube_username').value;
if(username){
youtube.videoFeed({
Expand All @@ -140,10 +141,10 @@
document.getElementById('youtube_username').blur();
}
return false;
};
});


searchForm.onsubmit = function(){
$(searchForm).submit(function(){
var query = document.getElementById('youtube_query').value;
var searchSort = document.getElementById('searchSort').value;
if(query){
Expand All @@ -154,12 +155,12 @@
document.getElementById('youtube_query').blur();
}
return false;
};
});

document.getElementById('searchSort').onchange = function(){
searchForm.onsubmit();
$(searchForm).submit();
};

});
</script>
</body>
</html>

0 comments on commit b7dc550

Please sign in to comment.