Permalink
Browse files

Fixed startIndex not being correct, now stops loading after all pages…

… found
  • Loading branch information...
1 parent a5bf54c commit 5bb88d7e51559f83b8b2572472debb924e387106 @spmason committed Apr 8, 2012
Showing with 6 additions and 2 deletions.
  1. +1 −0 bookmarklet.js
  2. +5 −2 src/player.js
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -7,7 +7,7 @@
],
$container, $ul,
links = [],
- startIndex = 2,
+ startIndex = 0,
depsLoaded = 0;
function play(url){
@@ -43,6 +43,7 @@
}
function loadLinks(doc, index){
+ var linksBefore = links.length;
doc.find('a[href*="soundcloud.com"]').each(function(){
var $a = $(this),
href = $a.attr('href').toLowerCase(),
@@ -65,7 +66,9 @@
fontSize: 11
});
- loadOtherPages(doc);
+ if(linksBefore < links.length){
+ loadOtherPages(doc);
+ }
}
function loadOtherPages(doc){

0 comments on commit 5bb88d7

Please sign in to comment.