Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Console hack to approve all (remaining) Kartra membership comments.
- * Author: Brian Katzung <[email protected]>
- * 1) Open the comments moderation.
- * 2) Reject any unwanted comments.
- * 3) Copy and paste below this comment into the browser console
- * and press the enter key to approve all remaining comments.
- * 4) Repeat (1) and (2), then enter approveAll() if you want to approve
- * all of another membership's comments.
- */
- let appLinks;
- function approveAll (reload = true) {
- if (reload) {
- appLinks = $('a.approve_link').toArray();
- if (!appLinks.length || confirm('Approve ' + appLinks.length + ' comments?')) approveAll(false);
- } else {
- let link = appLinks.shift();
- if (link) {
- link.click();
- setTimeout(() => approveAll(false), 500);
- }
- document.title = 'Remaining: ' + appLinks.length;
- }
- }
- approveAll();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement