Advertisement
tropic98

Pinterest Overlay Removed by Tropic98

Jun 11th, 2025 (edited)
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 3.73 KB | Source Code | 0 0
  1. /* ==UserStyle==
  2. @name           Pinterest Overlay Removed
  3. @namespace      tropicheat
  4. @author         tropicheat
  5. @description    Removes pinterest overlays so Imagus can see images, while preserving pin buttons.
  6. @version        0.1.0
  7. @preprocessor   stylus
  8. ==/UserStyle== */
  9. @-moz-document domain("pinterest.com") {
  10.     /* Remove specific overlay elements that block Imagus, but not button containers */
  11.     /* Hide overlay backgrounds and non-essential overlay content */
  12.     [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"])) {
  13.         display: none !important;
  14.     }
  15.    
  16.     /* Alternative approach: Hide overlay backgrounds but keep button containers visible */
  17.     [data-test-id="pinWrapper"] .MIw.QLY.Rym.ojN.p6V:not(.sLG):not([data-test-id*="boardCard"]) {
  18.         background: none !important;
  19.         background-color: transparent !important;
  20.     }
  21.    
  22.     /* Ensure save button container remains visible and functional */
  23.     [data-test-id="pin-better-save-button"] {
  24.         display: block !important;
  25.         opacity: 1 !important;
  26.         pointer-events: auto !important;
  27.         z-index: 1000 !important;
  28.     }
  29.    
  30.     /* Ensure save button container and bottom action buttons remain visible and functional */
  31.     [data-test-id="pin-better-save-button"],
  32.     [data-test-id="board-selection-item-selected"],
  33.     [data-test-id="PinBetterSaveButton"],
  34.     [data-test-id="share-icon-button"],
  35.     [aria-label="Save"],
  36.     [aria-label="Saved"] {
  37.         display: block !important;
  38.         opacity: 1 !important;
  39.         pointer-events: auto !important;
  40.         z-index: 1000 !important;
  41.     }
  42.    
  43.     /* Make sure board selection, save buttons, and bottom action buttons are always visible on hover */
  44.     [data-test-id="pinWrapper"]:hover [data-test-id="pin-better-save-button"],
  45.     [data-test-id="pinWrapper"]:hover [data-test-id="board-selection-item-selected"],
  46.     [data-test-id="pinWrapper"]:hover [data-test-id="PinBetterSaveButton"],
  47.     [data-test-id="pinWrapper"]:hover [data-test-id="share-icon-button"],
  48.     [data-test-id="pinWrapper"]:hover [aria-label="Save"],
  49.     [data-test-id="pinWrapper"]:hover [aria-label="Saved"] {
  50.         display: block !important;
  51.         opacity: 1 !important;
  52.         pointer-events: auto !important;
  53.     }
  54.    
  55.     /* Ensure click events pass through to the image for non-button areas */
  56.     .Pj7.sLG.XiG.eEj.m1e {
  57.         pointer-events: auto !important;
  58.     }
  59.    
  60.     /* Ensure all pin images are fully accessible and fill their container */
  61.     img.hCL.kVc.L4E.MIw {
  62.         visibility: visible !important;
  63.         opacity: 1 !important;
  64.         height: 100% !important;
  65.         width: 100% !important;
  66.         object-fit: cover !important;
  67.     }
  68.    
  69.     /* Make images accessible to extensions like Imagus */
  70.     [data-test-id="pinWrapper"] img {
  71.         pointer-events: auto !important;
  72.         z-index: 1 !important;
  73.     }
  74.    
  75.     /* Ensure button containers don't block image access */
  76.     [data-test-id="pinWrapper"] > div:not([data-test-id="pin-better-save-button"]):not([data-test-id="share-icon-button"]) {
  77.         pointer-events: none !important;
  78.     }
  79.    
  80.     /* Re-enable pointer events for interactive elements */
  81.     [data-test-id="pin-better-save-button"] *,
  82.     [data-test-id="board-selection-item-selected"] *,
  83.     [data-test-id="PinBetterSaveButton"] *,
  84.     [data-test-id="share-icon-button"] *,
  85.     button,
  86.     a {
  87.         pointer-events: auto !important;
  88.     }
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement