Last active
December 27, 2018 11:57
-
-
Save 0leynik/3bd2cf8e01c8ca8aa48848a99f7a05e1 to your computer and use it in GitHub Desktop.
This file contains 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
(function(){ | |
'use strict'; | |
if (!confirm('Delete?')) return; | |
//posts | |
//var deletePostLink = document.body.querySelectorAll('a.ui_actions_menu_item[onclick^="wall.deletePost"]'); | |
//gifts | |
// var deletePostLink = document.body.querySelectorAll('a.gift_delete[onclick^="Gifts.deleteGift"]'); | |
//videos | |
//var deletePostLink = document.body.querySelectorAll('div.video_thumb_action_delete[onclick^="return Video.onVideoDelete"]'); | |
//docs | |
// var deletePostLink = document.body.querySelectorAll('div.docs_action_icon[onclick^="return Docs.deleteItem"]'); | |
//likes | |
var deletePostLink = document.body.querySelectorAll('a.like_btn[onclick^="Likes.toggle"]'); | |
for (var i = 0; i < deletePostLink.length; i++) | |
{ | |
deletePostLink[i].click(); | |
} | |
alert('Deleted ' + deletePostLink.length); | |
}()); | |
//audios | |
// 1 | |
var script= document.createElement("script"); | |
script.src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js",script.type="text/javascript", | |
document.getElementsByTagName("head")[0].appendChild(script); | |
// 2 | |
jQuery('.audio_row').each(function(i,el){ | |
var audio = $(this).data('audio'), | |
$hash = audio[13].split('/'); | |
$.ajax({ | |
url: "https://vk.com/al_audio.php", | |
method: "POST", | |
data: { | |
act: 'delete_audio', | |
aid: audio[0], | |
al: 1, | |
hash: $hash[3], | |
oid: audio[1], | |
restore:1 | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment