Download all ushareit files in browser

Press F12 in ushareit page in IE/firefox/chrome, paste the below code in 'console' tab inputs, and press enter, the 'download all' button will be add in the web page.

//run the script in browser console
var $downloadButton= $("<button type='button' class='btn btn-danger'>DOWNLOAD.THEM.ALL</button>"); 
$downloadButton.on("click",function(event) {
var folderName = "/";
var i=1;
$("#path li").each(function(){
  if(i>1)
    folderName += $(this).text()+'/';
  i++
});
$("#listing tr").each(function(){
  if($(this).find('button').attr('class')!='btn btn-default btn-xs button-open'){
    var fileName = $(this).find("p[class='edit']").text();
    var absolutePath = window.location.href+"download?path=" + encodeURIComponent(folderName+fileName);
    var trHtml = "<td class='column-name'>"+"<a href=\"" + absolutePath + "\">"+absolutePath+"</a>"+"</td>";
    $(this).append(trHtml);
  }
});
});
$("div[class='btn-toolbar']").append($downloadButton);

function frameuse(){
document.body.innerHTML='sss';
}

Untitled.png
Untitled2.png

标签: none

添加新评论