V1.1 complete
Ajax calls quantity tracking is back.
This commit is contained in:
parent
88bb8c2e40
commit
f7f919e5c4
1 changed files with 7 additions and 1 deletions
|
|
@ -138,6 +138,7 @@ var pdApp = {
|
|||
num_individual: 0,
|
||||
submission_pages: 0,
|
||||
comment_pages: 0,
|
||||
ajax_calls: 0,
|
||||
after: false
|
||||
};
|
||||
|
||||
|
|
@ -194,6 +195,7 @@ var pdApp = {
|
|||
},
|
||||
checkSubmitted: function () {
|
||||
pdApp.process.updateDisplay();
|
||||
pdApp.processInfo.ajax_calls ++;
|
||||
$.ajax({
|
||||
url: 'https://www.reddit.com/user/'+pdApp.config.user+'/submitted/.json'+(pdApp.processInfo.after ? '?after='+pdApp.processInfo.after : '')
|
||||
}).then(function(resp) {
|
||||
|
|
@ -212,6 +214,7 @@ var pdApp = {
|
|||
},
|
||||
checkSearch: function () {
|
||||
pdApp.process.updateDisplay();
|
||||
pdApp.processInfo.ajax_calls ++;
|
||||
$.ajax({
|
||||
url: 'https://www.reddit.com/search.json?q=author%3A'+pdApp.config.user+(pdApp.processInfo.after ? '&after='+pdApp.processInfo.after : '')
|
||||
}).then(function(resp) {
|
||||
|
|
@ -235,6 +238,7 @@ var pdApp = {
|
|||
},
|
||||
checkComments: function () {
|
||||
pdApp.process.updateDisplay();
|
||||
pdApp.processInfo.ajax_calls ++;
|
||||
$.ajax({
|
||||
url: 'https://www.reddit.com/user/'+pdApp.config.user+'/comments/.json'+(pdApp.processInfo.after ? '?after='+pdApp.processInfo.after : '')
|
||||
}).then(function(resp) {
|
||||
|
|
@ -292,6 +296,7 @@ var pdApp = {
|
|||
if (!settings.saved || item.data.saved === false) {
|
||||
if (!settings.mod || !item.data.distinguished) {
|
||||
if ((edited === false && settings['comments-edit']) && (item.kind === 't1' || item.data.is_self)) {
|
||||
pdApp.processInfo.ajax_calls ++;
|
||||
$.ajax({
|
||||
url: 'https://www.reddit.com/api/editusertext',
|
||||
method: 'post',
|
||||
|
|
@ -313,6 +318,7 @@ var pdApp = {
|
|||
console.error(resp);
|
||||
});
|
||||
} else if (settings['comments'] || settings['submissions']) {
|
||||
pdApp.processInfo.ajax_calls ++;
|
||||
$.ajax({
|
||||
url: 'https://www.reddit.com/api/del',
|
||||
method: 'post',
|
||||
|
|
@ -348,7 +354,7 @@ var pdApp = {
|
|||
done: function () {
|
||||
window.pd_processing = false;
|
||||
$('#pd__central .processing').html('');
|
||||
$('#pd__central .processing').append('<p>Completed after making a ton calls to the reddit servers.</p>');
|
||||
$('#pd__central .processing').append('<p>Completed after making '+pdApp.processInfo.ajax_calls+' calls to the reddit servers.</p>');
|
||||
$('#pd__central .processing').append('<p>If you need to re run the script, just click the bookmarklet again!</p>');
|
||||
document.title = $('#header-bottom-right .user a').first().text()+' | Power Delete Suite';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue