Created
March 26, 2012 15:16
-
-
Save sergey-tihon/2205810 to your computer and use it in GitHub Desktop.
preview fetching
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FST_PreviewRequests = []; | |
function FST_RegisterDocPreviewFetch(a) { | |
ULShpi: ; | |
FST_PreviewRequests.push(a) | |
} | |
var gTotReq = 0, | |
gTotReqSent = 0; | |
function FST_StartDocPreviewFetch(b, c) { | |
ULShpi: ; | |
gTotReq = c; | |
for (var a = 0; a < b; a++) FST_DocPreviewFetch() | |
} | |
function FST_DocPreviewFetch() { | |
ULShpi: ; | |
if (FST_PreviewRequests.length > 0 && gTotReqSent < gTotReq) { | |
FST_PreviewRequests.shift().invoke(); | |
gTotReqSent++ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment