Open Leave Feedback for each item in an order in a new tab
(async function() {
// Get all "More actions" buttons (using their common class)
const moreButtons = Array.from(document.querySelectorAll('button.fake-menu-button__button'));
console.log(`Found ${moreButtons.length} "More actions" buttons.`);
for (const btn of moreButtons) {
// Click the button to open its dropdown
btn.click();
// Wait for the dropdown to render (adjust delay if needed)
await new Promise(resolve => setTimeout(resolve, 10));
// Look for the feedback link within the newly revealed dropdown
const feedbackLink = document.querySelector('a[href*="leave_single_feedback"]');
if (feedbackLink) {
console.log("Opening feedback link: " + feedbackLink.href);
window.open(feedbackLink.href, '_blank');
} else {
console.log("No feedback link found for this card.");
}
// Optionally, click the button again to close the dropdown
btn.click();
await new Promise(resolve => setTimeout(resolve, 10));
}
})();Copy the contents of a dropdown list (excluding Out of Stock items) to clipboard
const allDropdowns = [...document.querySelectorAll('div[role="listbox"].listbox__options')];
// pick the one with the most .listbox__option children (assumes it's your target)
const target = allDropdowns.reduce((a, b) =>
(a.querySelectorAll('.listbox__option').length > b.querySelectorAll('.listbox__option').length) ? a : b
);
copy(
[...target.querySelectorAll('.listbox__option')]
.map(el => el.querySelector('.listbox__value')?.textContent.trim())
.filter(text => text && !text.includes('Select') && !text.includes('Out of stock'))
.join('\n')
);