In my Google Chrome extension content script I have the following:
jQuery(document).ready(function() { var player = document.getElementById(\'player\');
Use defer.