Updated - January 2, 2021 at 1:52 pm
Sometimes, for one reason or another, we need to delete all posts from the VKontakte wall
. Previously, this could be done in the settings in one click.
But some time ago, the VKontakte administration abandoned such a move, citing the fact that attackers, having hacked an account, would delete all the most important things using this technique:
Deleting one entry at a time is also not an option. Too long, especially if you have been running the page for several years:
But there is still a way out of this situation. Doing this is much easier than deleting a VKontakte message.
How to delete posts from a VKontakte wall
The first method is unstable , since the script slows down with the new design.
1. Go to your VKontakte page.
2. Enter the script into the address bar of your browser.
java***script:var h = document.getElementsByClassName("ui_actions_menu _ui_menu");
var i = 0;function del_wall(){var fn_str = h .getElementsByTagName(“a”)[0].onclick.toString();
var fn_arr_1 = fn_str.split(“{“); var fn_arr_2 = fn_arr_1[1].split(";"); eval(fn_arr_2[0]);if(i == h.length){clearInterval(int_id)}else{i++}};var int_id=setInterval(del_wall,500); 3. Remove the asterisks *** and press the Enter key.
Immediately after these steps, all your posts on the wall will be deleted automatically.
By the way, now you can hide all posts in the archive of VK posts. And you don't need to delete anything. Just a couple of simple steps (see article).
How to offer news in public
The “Suggest news” function is not present in all communities, but only in public pages. This function is not available in groups, so administrators who plan to conduct an open dialogue with subscribers register public pages. If you want to receive posts from users, an existing VK group must first be transferred to public.
Any member of the public can use the “Suggest news” function. Those who want to publish their entry in the group (as all communities were previously called) must first join it. Suggested entries from outside users will not be accepted. People can join open public groups instantly, but to join a closed public group, you must first submit an application for consideration.
After joining, just follow a few simple steps:
- go to the main page of the public;
- find the “Suggest news” button (it is located above the news feed) and click on it;
- in the window that opens, write the text of the message; if desired, you can add an image, audio file, video, survey (icons are located under the window for entering text);
- click the “This is an advertisement” button if the message is of a selling nature (you will need to pay for the publication or further discuss this issue with the public administration);
- Click the “Suggest news” button.
The proposed post will be sent for review by the public management if such a function is installed in it. The speed of publication depends on the administration's work schedule. If the text or other content of an entry contradicts the law or the group’s own rules, it will be rejected.
Some public sites allow instant publication without prior verification. But this option does not give users the right to violate the requirements of the administration. All posts will be checked by moderators and inappropriate entries will be deleted. In certain cases, the user may even be blocked for gross violation of the rules.
You can offer an entry or submit an ad on VKontakte both from a computer and from a mobile device (tablet or smartphone). In this case, it does not matter at all through which application the user accessed the social network. You can publish news instantly from anywhere in the world, if only there were Internet.
For community members, being able to suggest a post is very rewarding. They can share their thoughts, ask for advice, or make an ad for selling unwanted items. What benefits does the public receive from this VKontakte function? Let's take a closer look:
- a live group in which subscribers have the opportunity not only to communicate in comments, but also to publish their messages, arouses greater interest among users;
- by publishing posts, the community is filled with interesting, unique and diverse content;
- In sales, exchange or advice groups, the ability for subscribers to publish posts is required, because this is the only way they can put their ad or question up for discussion.
It often happens that old, dying public pages exist only due to the fact that subscribers periodically publish their posts. In this way, live communication is maintained between the participants, and the group turns into something reminiscent of home gatherings or a forum.
Deleting all posts on the VKontakte wall
The second method works flawlessly in 2021 , but you will have to paste the code many times if you have a large number of records:
1. We scroll through some of our notes on the wall. For a quick effect, hold down space or end.
2. Anywhere on the page, right-click on the mouse and select “View code” (in some browsers it is called differently, for example, “Examine element”).
3. Next, open the “Console” tab, enter the code described below and press the Enter key.
(function () { 'use strict'; if (!confirm('Delete all posts from the wall?')) return; var deletePostLink = document.body.querySelectorAll('a.ui_actions_menu_item[onclick^="wall.deletePost"] '); for (var i = 0; i < deletePostLink.length; i++) { deletePostLink
.click(); } alert(deletePostLink.length + ' posts deleted'); }());
4. We confirm the deletion and wait until the wall is cleaned.
- Now we scroll further through the entries, insert the code and delete them;
Three scripts for deleting all posts from a VKontakte group
Sometimes it becomes necessary to clear the wall of a group or public page of all or most posts. Such a need may arise, for example, if the owner decided to radically change the theme of the group. The VKontakte service allows you to delete posts only one at a time. Even if there are a hundred posts in a group, it is inconvenient. How to delete all posts if there are five thousand of them? For this purpose, there are JavaScript scripts that allow you to automate this tedious process.
1. Script for deleting all posts of a group.
The first script allows you to completely delete all posts of a group. To do this, go to your group and scroll the wall as low as possible. Then you need to go to the console by pressing the f12 (either the right mouse button and the menu item “View code” or “Examine element”, depending on the browser). In Chrome it looks like this.
After that, copy the script below and paste it into your console:
(function () { 'use strict'; if (!confirm('Delete all posts from the wall?')) return; var deletePostLink = document.body.querySelectorAll('a.ui_actions_menu_item[onclick^="wall.deletePost"] '); for (var i = 0; i < deletePostLink.length; i++) { deletePostLink .click(); } alert(deletePostLink.length + ' posts deleted'); }());
When the browser asks you to confirm the action, accept it. After this, if you have scrolled the group wall far, far down, be patient to wait for the cleanup to finish.
2. Script to delete all posts except the top few.
Suppose you changed the topic of the group and already created several posts, and only then decided to delete your old posts. The second script allows you to leave new posts safe and sound, you just have to count their number.
Go to the group (no need to scroll down the wall), then to the browser console and copy the following code there:
var test = false, offset = 50, pause = 1, count = 0;function itit() {offset = prompt('Number of first records to keep.\nMake sure there are more than the specified number on the page' , 50);pause = prompt('Pause in seconds before requests (we recommend 1-10)', 1);test = confirm("Do you confirm that you want to delete all records in the group/page?\nExcept for the first “+offset+”\ n\nYou can monitor the process in the console (F12 > console).\nTo stop deleting, just close the page.");document.querySelectorAll('#wall_more_link')[0].click();scrollingTest()}function scrollingTest( ) {document.querySelectorAll('#wall_more_link')[0].click();var posts = document.querySelectorAll('div._post');console.log('Preload posts', posts.length, 'from' , offset*2);if(posts.length < offset*2) {setTimeout(function(){scrollingTest() }, 1500);} else {setTimeout(function(){removePost();}, 1500);} }function removePost(){document.body.scrollTop = 9999999;if(test == true) {count++;var post = document.querySelectorAll('div._post')[offset];if(post) {console.log( 'deleting a post with id '+post.id);post.scrollIntoView();post.querySelector('[onclick*=»deletePost"]').click();if(count > 10) {console.log(' Clicking on the "show more" button');count = 0;document.querySelectorAll('#wall_more_link')[0].click();}setTimeout(function(){post.remove();removePost();}, pause * 1000);} else {alert('It looks like the posts have ended or the script needs to be restarted');}}}itit();
When the dialog box appears, enter in the line the number of top messages you want to leave and click OK.
Then, in the second dialog box, select the time in seconds before the requests, after, in the third dialog box, confirm the action. You can monitor the execution of the procedure in the console. If you want to stop the process of deleting posts, just close the tab with the group or the browser window. There is only one drawback of this script - it is too leisurely.
3. Script for deleting all posts based on a given criterion.
If the first two scripts worked only on the main page of a group or public page, the third script works with a selection of posts. Here he is:
(function () { 'use strict'; if (!confirm('Delete all posts from the wall?')) return; var deletePostLink = document.body.querySelectorAll('a.ui_actions_menu_item[onclick^="wall.deletePost"] '); for (var i = 0; i < deletePostLink.length; i++) { deletePostLink.click(); } alert(deletePostLink.length + ' posts deleted'); }());
To apply it, let's search by group. To do this, you need to follow the “Community Posts” link.
A. Deleting posts by keyword.
Let’s assume that the VKontakte group was previously dedicated to cats, and now to cars. In this case, we first search for the word “cats”, and then scroll the page with the search results as far down as possible, go to the console and enter the script into the command line.
Ready! All posts with cats have been deleted.
B. Deleting posts older than a certain date.
This option will be useful if you remember at least approximately the day when you, for example, changed the theme of the group, or decided to delete all those entries that you made when you were too young. Let's say you want to delete all records that are older than August 31, 2021. Follow the link “Community Posts” and go to search for posts - the link is in the menu on the right.
Now in the search bar we see a calendar icon. That's what we need.
Set the desired date.
Now you need to scroll the search results as low as possible, open the console, enter the third script into it and confirm the action.
Share link:
Related posts:
Deleting tweets using archive
Elegant Twitter Link in Blog
How to set up a blog RSS feed
How to delete someone else's comment
It is worth understanding that someone else's comment can only be deleted where you have certain authority. That is, for example, in a photo that is on your page or in your community. Other people's comments are deleted like this:
- Let's open a photo or post with someone else's comment.
- Let's move the cursor over the comment that we want to delete. A small cross will appear.
- Click on the cross that appears. After this, the message “ Comment deleted ” will appear.
On android
On Android devices, other people's comments are deleted like this:
- Let's open the photo on which you want to delete the comment.
- Click on the comments icon located at the bottom center. After that, we will be shown all the comments under the photo.
- We click on someone else’s comment that we don’t need. A window with three options will appear in the center of the screen.
- Click on the “ Delete ” column. After this, in place of the erased comment, the line “ Comment deleted ” will appear. And also the words “ Restore ” and “ Complain ”.
On iPhone
The method for deleting comments is exactly the same as above. You need to follow a few simple steps:
- Let's go to the comments section of the photo under which you need to delete someone else's statement.
- Click on the comment area. A window will appear in which we will need the column “ Delete comment».
- Click on this line. After this, someone else's comment will simply be deleted. In our case, there will be no comments left under the photo.