Skip to content

Instantly share code, notes, and snippets.

@mangege
Created February 9, 2017 08:09
Show Gist options
  • Save mangege/ab4729db3177d3b084f5da7a53cd89e4 to your computer and use it in GitHub Desktop.
Save mangege/ab4729db3177d3b084f5da7a53cd89e4 to your computer and use it in GitHub Desktop.
百度网盘转存. 每次选中50个文件,自动手动点保存后再运行选择下50个文件.
var chkLen = jQuery('.module-list .list-view-item.item-active').length;
var startPosition = -1;
if (chkLen > -1) {
startPosition = Number(jQuery('.module-list .list-view-item.item-active:last').attr('_position'));
}
jQuery('.module-list .list-view-item.item-active .checkbox').click()
var count = 0;
jQuery('.module-list .list-view-item').each(function(idx){
var _this = jQuery(this);
var position = Number(_this.attr('_position'));
if (position <= startPosition) {
return;
}
count += 1;
if (count > 50) {
return false;
}
_this.find('.checkbox').click();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment