Skip to content

Instantly share code, notes, and snippets.

@dlai0001
Last active December 20, 2015 17:18
Show Gist options
  • Save dlai0001/6167561 to your computer and use it in GitHub Desktop.
Save dlai0001/6167561 to your computer and use it in GitHub Desktop.
YAHOO.util.Connect.asyncRequest("GET",
"/services/library/json/?action=getLibraryFiles&status=P",
{ success: function(o) {
var response = JSON.parse( o.responseText);
var fileList = response.list.filter( function(item) {
return item.batch == "N";
});
var fileEntry = fileList.filter( function(item) {
return item.fileName == "2013-08-06_11.50.39_testfile_vuPk.txt";
})[0];
var fileIndex = fileList.indexOf(fileEntry);
window.__WTF_targetFileIndex = fileIndex;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment