{"id":25175953,"url":"https://github.com/ptraced/youtube-deleteallcommunityposts","last_synced_at":"2025-06-10T09:33:08.829Z","repository":{"id":275359267,"uuid":"925853927","full_name":"ptraced/Youtube-DeleteAllCommunityPosts","owner":"ptraced","description":"Youtube Delete All CommunityPosts","archived":false,"fork":false,"pushed_at":"2025-02-02T01:05:05.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-08T07:34:38.198Z","etag":null,"topics":["automation","bulk-delete","javascript","scripts","youtube"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ptraced.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-01T22:37:34.000Z","updated_at":"2025-02-02T01:05:08.000Z","dependencies_parsed_at":"2025-04-04T01:38:06.478Z","dependency_job_id":null,"html_url":"https://github.com/ptraced/Youtube-DeleteAllCommunityPosts","commit_stats":null,"previous_names":["ptraced/youtube-deleteallcommunityposts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptraced%2FYoutube-DeleteAllCommunityPosts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptraced%2FYoutube-DeleteAllCommunityPosts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptraced%2FYoutube-DeleteAllCommunityPosts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptraced%2FYoutube-DeleteAllCommunityPosts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ptraced","download_url":"https://codeload.github.com/ptraced/Youtube-DeleteAllCommunityPosts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ptraced%2FYoutube-DeleteAllCommunityPosts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259048246,"owners_count":22797689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","bulk-delete","javascript","scripts","youtube"],"created_at":"2025-02-09T13:15:26.677Z","updated_at":"2025-06-10T09:33:08.780Z","avatar_url":"https://github.com/ptraced.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Youtube Delete All Community Posts\n\nPaste in chrome console in https://www.youtube.com/@YourUsernameHere/community\n\n```js\nasync function deleteAllCommunityPosts() {\n    async function scrollUntilNoNewPosts() {\n        let lastHeight = document.body.scrollHeight;\n        const maxScrollAttempts = 10; // Adjust if needed\n        for (let i = 0; i \u003c maxScrollAttempts; i++) {\n            window.scrollTo(0, document.body.scrollHeight);\n            await new Promise(r =\u003e setTimeout(r, 2000));\n            const newHeight = document.body.scrollHeight;\n            if (newHeight === lastHeight) break;\n            lastHeight = newHeight;\n        }\n    }\n\n    async function clickElement(element) {\n        element.scrollIntoView({ behavior: 'smooth', block: 'center' });\n        await new Promise(r =\u003e setTimeout(r, 500));\n        element.click();\n        await new Promise(r =\u003e setTimeout(r, 1000));\n    }\n\n    while (true) {\n        await scrollUntilNoNewPosts();\n        const menuButtons = document.querySelectorAll('yt-icon-button.ytd-menu-renderer');\n        if (menuButtons.length === 0) {\n            console.log('No more posts found. All done!');\n            break;\n        }\n        console.log(`Found ${menuButtons.length} posts to delete`);\n\n        for (const menuButton of Array.from(menuButtons)) {\n            try {\n                await clickElement(menuButton);\n                const deleteButton = Array.from(document.querySelectorAll('tp-yt-paper-item')).find(\n                    item =\u003e item.textContent.includes('Delete')\n                );\n                if (!deleteButton) throw new Error('Delete button not found');\n                await clickElement(deleteButton);\n\n                const confirmButton = document.querySelector('#confirm-button');\n                if (!confirmButton) throw new Error('Confirm button not found');\n                await clickElement(confirmButton);\n            } catch (error) {\n                console.error('Error deleting post:', error);\n            }\n        }\n\n        // Wait for a bit before continuing to ensure all deletions are processed\n        await new Promise(r =\u003e setTimeout(r, 3000));\n    }\n}\n\ndeleteAllCommunityPosts();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptraced%2Fyoutube-deleteallcommunityposts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fptraced%2Fyoutube-deleteallcommunityposts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fptraced%2Fyoutube-deleteallcommunityposts/lists"}