{"id":2319,"date":"2025-02-28T13:27:22","date_gmt":"2025-02-28T12:27:22","guid":{"rendered":"https:\/\/dan.thoeisen.dk\/hjem\/?p=2319"},"modified":"2025-02-28T13:27:25","modified_gmt":"2025-02-28T12:27:25","slug":"facebook-page-with-many-potential-spam","status":"publish","type":"post","link":"https:\/\/dan.thoeisen.dk\/hjem\/facebook-page-with-many-potential-spam\/","title":{"rendered":"Facebook page with many potential spam?"},"content":{"rendered":"\n<p>Do you also have a Facebook page that looks like this?<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/dan.thoeisen.dk\/hjem\/wp-content\/uploads\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"993\" height=\"160\" src=\"https:\/\/dan.thoeisen.dk\/hjem\/wp-content\/uploads\/image.png\" alt=\"\" class=\"wp-image-2320\" srcset=\"https:\/\/dan.thoeisen.dk\/hjem\/wp-content\/uploads\/image.png 993w, https:\/\/dan.thoeisen.dk\/hjem\/wp-content\/uploads\/image-300x48.png 300w, https:\/\/dan.thoeisen.dk\/hjem\/wp-content\/uploads\/image-768x124.png 768w\" sizes=\"auto, (max-width: 993px) 100vw, 993px\" \/><\/a><\/figure>\n\n\n\n<p>1. Download Tampermonkey for Firefox<\/p>\n\n\n\n<p><a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/tampermonkey\">https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/tampermonkey<\/a><\/p>\n\n\n\n<p>2. Create a new script<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/dan.thoeisen.dk\/hjem\/wp-content\/uploads\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"238\" height=\"248\" src=\"https:\/\/dan.thoeisen.dk\/hjem\/wp-content\/uploads\/image-1.png\" alt=\"\" class=\"wp-image-2322\"\/><\/a><\/figure>\n\n\n\n<p>3. Write this code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ ==UserScript==\n\/\/ @name         Bulk Decline Facebook Group Requests with Auto-Scroll\n\/\/ @namespace    http:\/\/tampermonkey.net\/\n\/\/ @version      1.1\n\/\/ @description  Automatically declines all group requests and scrolls down to load more\n\/\/ @author       Dan\n\/\/ @match        https:\/\/www.facebook.com\/groups\/*\n\/\/ @grant        none\n\/\/ ==\/UserScript==\n\n(function() {\n    'use strict';\n\n    function declineRequests() {\n        let buttons = document.querySelectorAll('div&#91;aria-label=\"Decline\"]');\n        if (buttons.length === 0) {\n            console.log(\"No more requests found!\");\n            return;\n        }\n\n        console.log(`Found ${buttons.length} requests. Declining...`);\n\n        buttons.forEach((button, index) => {\n            setTimeout(() => {\n                button.click();\n                console.log(`Declined ${index + 1}`);\n            }, index * 800); \/\/ Adjust delay to avoid rate limits\n        });\n\n        \/\/ Scroll down to load more requests\n        setTimeout(() => {\n            window.scrollTo(0, document.body.scrollHeight);\n            console.log(\"Scrolling down...\");\n            setTimeout(declineRequests, 3000); \/\/ Wait for new requests to load, then repeat\n        }, buttons.length * 800 + 2000);\n    }\n\n    \/\/ Start the process after 3 seconds\n    setTimeout(declineRequests, 3000);\n})();\n<\/code><\/pre>\n\n\n\n\n\n<p>Save and run it when visiting the Potential Spam page &#8211; and it runs automatically.<\/p>\n<p>\u00a0<\/p>\n<p>Be aware that you can run out of memory, and will have to close the tab and start again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do you also have a Facebook page that looks like this? 1. Download Tampermonkey for Firefox https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/tampermonkey 2. Create a new script 3. Write this code: Save and run it when visiting the Potential Spam page &#8211; and it runs automatically. \u00a0 Be aware that you can run out of memory, and will have to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-2319","post","type-post","status-publish","format-standard","hentry","category-diverse"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pSQsk-Bp","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dan.thoeisen.dk\/hjem\/wp-json\/wp\/v2\/posts\/2319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dan.thoeisen.dk\/hjem\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dan.thoeisen.dk\/hjem\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dan.thoeisen.dk\/hjem\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dan.thoeisen.dk\/hjem\/wp-json\/wp\/v2\/comments?post=2319"}],"version-history":[{"count":2,"href":"https:\/\/dan.thoeisen.dk\/hjem\/wp-json\/wp\/v2\/posts\/2319\/revisions"}],"predecessor-version":[{"id":2323,"href":"https:\/\/dan.thoeisen.dk\/hjem\/wp-json\/wp\/v2\/posts\/2319\/revisions\/2323"}],"wp:attachment":[{"href":"https:\/\/dan.thoeisen.dk\/hjem\/wp-json\/wp\/v2\/media?parent=2319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dan.thoeisen.dk\/hjem\/wp-json\/wp\/v2\/categories?post=2319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dan.thoeisen.dk\/hjem\/wp-json\/wp\/v2\/tags?post=2319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}