Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ==UserStyle==
- @name Pinterest Overlay Removed
- @namespace tropicheat
- @author tropicheat
- @description Removes pinterest overlays so Imagus can see images, while preserving pin buttons.
- @version 0.1.0
- @preprocessor stylus
- ==/UserStyle== */
- @-moz-document domain("pinterest.com") {
- /* Remove specific overlay elements that block Imagus, but not button containers */
- /* Hide overlay backgrounds and non-essential overlay content */
- [data-test-id="pinWrapper"] .MIw.QLY.Rym.ojN.p6V:not(.sLG):not([data-test-id*="boardCard"]) > div:not([data-test-id="pin-better-save-button"]):not([data-test-id*="board-selection"]):not(:has([data-test-id="share-icon-button"])):not(:has([data-test-id="pin-better-save-button"])):not(:has([aria-label="Save"])):not(:has([aria-label="Saved"])) {
- display: none !important;
- }
- /* Alternative approach: Hide overlay backgrounds but keep button containers visible */
- [data-test-id="pinWrapper"] .MIw.QLY.Rym.ojN.p6V:not(.sLG):not([data-test-id*="boardCard"]) {
- background: none !important;
- background-color: transparent !important;
- }
- /* Ensure save button container remains visible and functional */
- [data-test-id="pin-better-save-button"] {
- display: block !important;
- opacity: 1 !important;
- pointer-events: auto !important;
- z-index: 1000 !important;
- }
- /* Ensure save button container and bottom action buttons remain visible and functional */
- [data-test-id="pin-better-save-button"],
- [data-test-id="board-selection-item-selected"],
- [data-test-id="PinBetterSaveButton"],
- [data-test-id="share-icon-button"],
- [aria-label="Save"],
- [aria-label="Saved"] {
- display: block !important;
- opacity: 1 !important;
- pointer-events: auto !important;
- z-index: 1000 !important;
- }
- /* Make sure board selection, save buttons, and bottom action buttons are always visible on hover */
- [data-test-id="pinWrapper"]:hover [data-test-id="pin-better-save-button"],
- [data-test-id="pinWrapper"]:hover [data-test-id="board-selection-item-selected"],
- [data-test-id="pinWrapper"]:hover [data-test-id="PinBetterSaveButton"],
- [data-test-id="pinWrapper"]:hover [data-test-id="share-icon-button"],
- [data-test-id="pinWrapper"]:hover [aria-label="Save"],
- [data-test-id="pinWrapper"]:hover [aria-label="Saved"] {
- display: block !important;
- opacity: 1 !important;
- pointer-events: auto !important;
- }
- /* Ensure click events pass through to the image for non-button areas */
- .Pj7.sLG.XiG.eEj.m1e {
- pointer-events: auto !important;
- }
- /* Ensure all pin images are fully accessible and fill their container */
- img.hCL.kVc.L4E.MIw {
- visibility: visible !important;
- opacity: 1 !important;
- height: 100% !important;
- width: 100% !important;
- object-fit: cover !important;
- }
- /* Make images accessible to extensions like Imagus */
- [data-test-id="pinWrapper"] img {
- pointer-events: auto !important;
- z-index: 1 !important;
- }
- /* Ensure button containers don't block image access */
- [data-test-id="pinWrapper"] > div:not([data-test-id="pin-better-save-button"]):not([data-test-id="share-icon-button"]) {
- pointer-events: none !important;
- }
- /* Re-enable pointer events for interactive elements */
- [data-test-id="pin-better-save-button"] *,
- [data-test-id="board-selection-item-selected"] *,
- [data-test-id="PinBetterSaveButton"] *,
- [data-test-id="share-icon-button"] *,
- button,
- a {
- pointer-events: auto !important;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement