Permalink
Browse files

Fixed issue with Rhapsody player on Safari

  • Loading branch information...
1 parent 9cdca87 commit 395541d573c11e8dd0f8ec45ae699b31a71f1fdb @cgravolet cgravolet committed May 12, 2012
Showing with 9 additions and 2 deletions.
  1. +9 −2 extension/js/scroblr-injection.js
View
11 extension/js/scroblr-injection.js
@@ -225,7 +225,11 @@ if (!isJango || isJangoPlayer) {
host = 'pandora';
}
else if (window.location.hostname.toLowerCase().indexOf('rhapsody') >= 0) {
- host = 'rhapsody';
+ // Rhapsody has several iframes, need to check to make sure it's
+ // the main window
+ if ($('#container').length) {
+ host = 'rhapsody';
+ }
}
else if (window.location.hostname.toLowerCase().indexOf('turntable') >= 0) {
host = 'turntable';
@@ -283,7 +287,10 @@ if (!isJango || isJangoPlayer) {
}
- init();
+ // Initialize on document ready
+ $(function () {
+ init();
+ });
return {

0 comments on commit 395541d

Please sign in to comment.