Complete Tutorial JS bulk delete blog blog's Park

Park first to think of blog essays is deleted blog? ? Internet search down all scripts are the same as 2333, it was forced to Tucao today's blog, reproduced everywhere. The scripts are found around the following lines, probably because of the revision reasons, delete each one will need to manually confirm? ? Reproduced so much, we did not find a solution, simply mess with their own hands.

$('tr').each(function(){
        if($(this).attr('id')!=null){
            var s = $(this).attr('id').slice(9);
            console.info ( "Deleting:" + s);
            deletePost(s);
    }
    window.location.reload();

 

Deeply felt better things are self-inflicted. Park whim to try blog, blog migration at the point of CDSN, move those not regret it a year ago, brush those algorithms questions, what really I do not want to go to the classification of the 23333, and then delete it, What? Batch can not be deleted? ? Hundreds of articles can not manually delete it. As a Jike who must be able to steal lazy to steal.

So start looking script, bug23333 first attempt JS, toss waited a long time and even feel a bit of fun?

Well, no bullshit o (╥﹏╥) o

Into my blog - after> management, access management background, switch back to the old version

Then press F12 (or right-checking)

Console selection, enter the following code to enter.

 
var jq = document.createElement('script');
jq.src = "https://code.jquery.com/jquery-3.3.1.min.js";  /* Include any online jquery library you need */
document.getElementsByTagName('head')[0].appendChild(jq);

Then enter, delete the original script each one will pop up a confirmation box? ? Then I improved at the original script, automatically confirms that there each time you enter the following code can automatically delete the page.

Re-enter it in the console.

$('tr').each(function(){
        if($(this).attr('id')!=null){
            var s = $(this).attr('id').slice(9);
            console.info ( "Deleting:" + s);
            deletePost(s);
        }
    var realConfirm=window.confirm;
    window.confirm=function(){
        window.confirm=realConfirm;
        return true;
        };
    });
window.location.reload();

reference:

https://cloud.tencent.com/developer/article/1194952

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/brielleqqqqqqjie/p/12001491.html