Sure! I can help you create a userscript that adds a "Select All" option when sharing a conversation on Poe AI. This script will work by injecting a "Select All" checkbox into the share conversation modal, allowing you to select or deselect all messages with a single click.
Userscript Code:
Here's the userscript code you can use:
// ==UserScript==
// @name Poe AI - Add Select All to Share Conversation
// @namespace https://poe.com/
// @version 1.0
// @description Adds a 'Select All' checkbox to the share conversation feature on Poe AI.
// @author Your Name
// @match https://poe.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=poe.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Function to add the 'Select All' checkbox
function addSelectAllOption() {
// Check if the share modal is open
const shareModal = document.querySelector('[aria-labelledby="modal-title"]');
if (!shareModal) return;
// Avoid adding multiple checkboxes
if (document.getElementById('selectAllCheckbox')) return;
// Create the 'Select All' checkbox and label
const checkboxContainer = document.createElement('div');
checkboxContainer.style.display = 'flex';
checkboxContainer.style.alignItems = 'center';
checkboxContainer.style.marginBottom = '10px';
const selectAllCheckbox = document.createElement('input');
selectAllCheckbox.type = 'checkbox';
selectAllCheckbox.id = 'selectAllCheckbox';
selectAllCheckbox.style.marginRight = '5px';
const selectAllLabel = document.createElement('label');
selectAllLabel.htmlFor = 'selectAllCheckbox';
selectAllLabel.innerText = 'Select All';
checkboxContainer.appendChild(selectAllCheckbox);
checkboxContainer.appendChild(selectAllLabel);
// Insert the checkbox into the modal header
const modalHeader = shareModal.querySelector('div[class*="ModalHeader"]');
if (modalHeader) {
modalHeader.appendChild(checkboxContainer);
} else {
// Fallback: insert at the top of the modal
shareModal.insertBefore(checkboxContainer, shareModal.firstChild);
}
// Event listener to handle the 'Select All' functionality
selectAllCheckbox.addEventListener('change', function() {
const messageCheckboxes = shareModal.querySelectorAll('input[type="checkbox"]');
messageCheckboxes.forEach((checkbox) => {
checkbox.checked = selectAllCheckbox.checked;
});
});
}
// Observer to monitor changes and add the checkbox when the share modal appears
const observer = new MutationObserver(() => {
addSelectAllOption();
});
observer.observe(document.body, { childList: true, subtree: true });
})();
How to Install the Userscript:
To use this script, you'll need to install a userscript manager and then add the script to it.
Step 1: Install a Userscript Manager
Choose a userscript manager compatible with your browser:
Step 2: Add the Userscript
-
Open the Userscript Manager Dashboard:
- Click on the userscript manager extension icon in your browser's toolbar.
- Select Dashboard or Options.
-
Create a New Script:
- In the dashboard, click on the
+ button or select Create a new script.
-
Paste the Script:
- Delete any default content in the script editor.
- Paste the userscript code provided above.
-
Save the Script:
- Click on File > Save, or press
Ctrl+S (Windows) or Cmd+S (Mac).
Step 3: Refresh the Poe AI Page
Using the 'Select All' Feature:
-
Open the Share Conversation Modal:
- Click on the Share icon or button in the conversation.
-
Use the 'Select All' Checkbox:
- In the share modal, you'll now see a 'Select All' checkbox at the top.
- Click the checkbox to select all messages.
- Uncheck it to deselect all messages.
-
Proceed with Sharing:
- After selecting the desired messages, continue with the sharing process as usual.
Notes and Troubleshooting:
Assistance and Further Customization:
If you need help customizing the script further or run into any issues, feel free to ask! I'm here to help you make the most out of your Poe AI experience.