Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
HTML5: Dirty hack to allow IE to parse YouTubeRSS JSON object which u…
…ses "default" which should be a reserved word although Chrome and Firefox don't seem to care!!

git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@519 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
JohnSmith-LT committed Nov 19, 2012
1 parent f9bda7b commit 3ef173c
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -28,8 +28,10 @@
resultsHolder = '<div><p>No results returned!!</p></div>'; // ** Need to take this from the language file
} else {
$.each(data.data.items, function (index, item) {
// item.player.default breaks IE so this is a workaround
var safePlayer = JSON.parse(JSON.stringify(item.player).replace('"default"', '"standard"'));
resultsHolder += '<div><img src="' + item.thumbnail.sqDefault + '" />';
resultsHolder += '<p><a target="_blank" href="' + item.player.default + '">' + item.title + '</a></p></div>';
resultsHolder += '<p><a target="_blank" href="' + safePlayer.standard + '">' + item.title + '</a></p></div>';
});
}
$resultsHolder
Expand Down

0 comments on commit 3ef173c

Please sign in to comment.