Skip to content

Instantly share code, notes, and snippets.

@0xOsprey
Last active September 13, 2025 05:23
Show Gist options
  • Select an option

  • Save 0xOsprey/d750215e26eaeafa75f456e35063a3f6 to your computer and use it in GitHub Desktop.

Select an option

Save 0xOsprey/d750215e26eaeafa75f456e35063a3f6 to your computer and use it in GitHub Desktop.

Revisions

  1. 0xOsprey revised this gist Apr 24, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion guide.md
    Original file line number Diff line number Diff line change
    @@ -33,4 +33,4 @@ async function uncheckAllWithDelay(delayMs = 3000) {
    }
    // Run the function with a 3000ms delay (adjust as needed)
    uncheckAllWithDelay(3000)```
    uncheckAllWithDelay(3000)
  2. 0xOsprey created this gist Apr 24, 2025.
    36 changes: 36 additions & 0 deletions guide.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    1. Navigate to https://x.com/settings/your_twitter_data/twitter_interests
    2. Open Dev Tools in your browser
    3. Go to Console
    4. Copy and paste this code into the Browser console then hit enter and let it run

    ```// Function to uncheck all checkboxes with a delay
    async function uncheckAllWithDelay(delayMs = 3000) {
    // Try standard checkboxes first
    const checkboxes = document.querySelectorAll('input[type="checkbox"]');
    // If no standard checkboxes, try custom elements (more likely on Twitter/X)
    const elements = checkboxes.length > 0 ?
    checkboxes :
    document.querySelectorAll('[role="checkbox"][aria-checked="true"]');
    console.log(`Found ${elements.length} checked items to uncheck`);
    let count = 0;
    // Process each element with delay
    for (const element of elements) {
    if ((element.checked || element.getAttribute('aria-checked') === 'true')) {
    element.click();
    count++;
    console.log(`Unchecked ${count} of ${elements.length}`);
    // Add delay to avoid rate limiting
    await new Promise(resolve => setTimeout(resolve, delayMs));
    }
    }
    console.log(`Completed! Unchecked ${count} items`);
    }
    // Run the function with a 3000ms delay (adjust as needed)
    uncheckAllWithDelay(3000)```