Last active
December 15, 2016 06:46
-
-
Save EITANINOMIYA/e92d17eace6fa961dbdc8e472e8a3ab4 to your computer and use it in GitHub Desktop.
【javascript】ツイートを削除する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*################################################# | |
# ブラウザのコンソール上でhttps://twitter.com/を開いて実行 | |
# 一括で削除する場合に便利 | |
#################################################*/ | |
$(".js-stream-item").each(function() { | |
var authenticity_token = $(".authenticity_token").val(); | |
var data_s = { | |
"_method" : "DELETE", | |
"authenticity_token" : authenticity_token, | |
"id" : $(this).attr("data-item-id") | |
}; | |
$.ajax({ | |
"type" : "POST", | |
"dataType" : "json", | |
"url" : "https://twitter.com/i/tweet/destroy", | |
"data" : data_s | |
}).done(function(response) { | |
console.log(response) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment