control-panel-for-twitter
control-panel-for-twitter copied to clipboard
Premium upsell after adding a bookmark
The Add to Folder link is a Premium upsell
This is a CSS-only way hide the Add to Folder link on desktop and mobile, but will also hide any similar link in a toast with the same markup - are there more of these?
div[data-testid="toast"] div[aria-hidden="true"]:has(> div[role="button"]) {
display: none;
}
The alternative is to detect the appearance of toasts and check specifically for the "Add to Folder" button text.
- desktop: appears as a child of
#layers
, which we're already observing - mobile: appears as a child of
#layers > :first-child
, which contains the other overlay items for the mobile layout