script/play-resources.js: suppress exceptions

avoid error warning popups in IE
This commit is contained in:
Astro 2011-11-16 15:07:41 +01:00
parent 9f63788098
commit b19e96f976
1 changed files with 5 additions and 0 deletions

View File

@ -95,6 +95,7 @@ function addPlayer(container, res) {
}
$(document).ready(function() {
try {
/* Iterate over all resources in HTML output */
$('.resource').each(function() {
var resource = { href: $(this).find('a').attr('href'),
@ -126,6 +127,10 @@ $(document).ready(function() {
var player = addButton(liEl, res);
}
});
} catch (x) {
if (console && console.error)
console.error(x);
}
});
function canPlay(type) {