! Title: Intentional: Pinterest (AdGuard) ! Description: Removes Pinterest's algorithmic feeds and infinite scrolling, so you only see what you came for. ! Homepage: https://aymericbeaumet.github.io/intentional/ ! License: MIT ! Version: 0.2.0 ! Expires: 1 day ! Redirects need this list to be added as Trusted ! ===== Pinterest ===== ! Pinterest: see site.yaml for the policy and tests.yaml for what each rule must do. ! `pinterest.com` also covers the country subdomains (fr.pinterest.com, uk.pinterest.com, ...). ! --- Home feed, Explore and Today: the pin grid --- ! The same grid shows boards, search and Following, so it is only hidden on these paths. [$path=/^\\/(homefeed\\/?|ideas\\/?|today\\/?)?(\\?|$)/]pinterest.com##[data-test-id="grid"] pinterest.com##[data-test-id^="ideas-root-"] ! --- Navigation: entries that only lead to discovery feeds --- pinterest.com##[data-test-id="today-tab"] pinterest.com##[data-test-id="ideas-tab"] pinterest.com##[data-test-id="shopping-tab"] ! --- A pin opened by URL: the pin, no "More to explore" --- ! The opened pin can be the first item of the related grid itself, so only the other grid items go. pinterest.com##[data-test-id="relatedPins"] [data-grid-item]:not([data-test-id="CloseupMainPin"], [data-test-id="CloseupMainPin"] *):not(:has([data-test-id="CloseupMainPin"])) pinterest.com##[data-test-id="related-pins-without-drawer"]:not(:has([data-test-id="CloseupMainPin"])) pinterest.com##[data-test-id="related-pins-title"] pinterest.com##[data-test-id="floating-more-like-this-button"] pinterest.com##[data-test-id="pin-metadata-drawer-related-interests-section"] ! Pinterest: redirects to the intentional view www.pinterest.com,ar.pinterest.com,at.pinterest.com,au.pinterest.com,br.pinterest.com,ca.pinterest.com,ch.pinterest.com,cl.pinterest.com,co.pinterest.com,cz.pinterest.com,de.pinterest.com,dk.pinterest.com,es.pinterest.com,fi.pinterest.com,fr.pinterest.com,gr.pinterest.com,hu.pinterest.com,id.pinterest.com,ie.pinterest.com,in.pinterest.com,it.pinterest.com,jp.pinterest.com,kr.pinterest.com,mx.pinterest.com,nl.pinterest.com,no.pinterest.com,nz.pinterest.com,ph.pinterest.com,pl.pinterest.com,pt.pinterest.com,ro.pinterest.com,ru.pinterest.com,se.pinterest.com,sk.pinterest.com,tr.pinterest.com,uk.pinterest.com,za.pinterest.com#%#(function(){function $(d,t){for(const m of t){const g=new RegExp(m.from).exec(d);if(!g)continue;const c=m.to.replace(/\$(\d)/g,(u,i)=>g[Number(i)]??"");return c===d?null:c}return null}function w(d,t){const m=d&&new RegExp(d.path),g=e=>{const o=t.document;if(m?.test(t.location.pathname)){const a=d?.viewer;if(!a||a==="*")return o.body;const s=e.closest(a)||Array.from(o.querySelectorAll(a)).find(v=>v.getClientRects().length>0);if(s)return s}if(o.fullscreenElement?.querySelector("video"))return o.fullscreenElement;let r=!1,n=e===o.body||e===o.documentElement?o.elementFromPoint(t.innerWidth/2,t.innerHeight/2):e;for(;n;n=n.parentElement){const a=t.getComputedStyle(n);if(r&&/^(y|block) (mandatory|proximity)$/.test(a.scrollSnapType)&&n.scrollHeight>n.clientHeight)return n;!r&&a.scrollSnapAlign!=="none"&&(n.matches("video")||n.querySelector("video"))&&(r=!0)}return null},c={capture:!0,passive:!1},u=e=>{const o=e.target,r=o instanceof t.Element?o:t.document.body;if(!r)return;const n=g(r),a=n?.querySelector("video")??(n&&n!==t.document.body?n.querySelector("img"):null);if(!n||!a||r.closest('input, textarea, select, [contenteditable]:not([contenteditable="false"]), [role="slider"]'))return;let s=r;for(;s&&s!==t.document.body;s=s.parentElement)if(s.scrollHeight>s.clientHeight&&/^(auto|scroll)$/.test(t.getComputedStyle(s).overflowY)&&!s.contains(a)){s instanceof t.HTMLElement&&t.getComputedStyle(s).overscrollBehaviorY==="auto"&&(s.style.overscrollBehaviorY="contain"),e.stopImmediatePropagation();return}!n.contains(r)&&r!==t.document.body&&r!==t.document.documentElement||(e.preventDefault(),e.stopImmediatePropagation())};t.addEventListener("wheel",e=>{!e.ctrlKey&&Math.abs(e.deltaY)>Math.abs(e.deltaX)&&u(e)},c),t.addEventListener("keydown",e=>{!e.ctrlKey&&!e.metaKey&&!e.altKey&&["ArrowUp","ArrowDown","PageUp","PageDown"].includes(e.key)&&u(e)},c);let i;t.addEventListener("touchstart",e=>{const o=e.touches[0];i=o&&e.touches.length===1?{x:o.clientX,y:o.clientY}:void 0},{capture:!0,passive:!0});const p=e=>{const o=e.changedTouches[0];if(i&&o&&e.touches.length<=1){const r=Math.abs(o.clientY-i.y);r>8&&r>Math.abs(o.clientX-i.x)&&u(e)}e.type==="touchend"&&(i=void 0)};t.addEventListener("touchmove",p,c),t.addEventListener("touchend",p,c),t.addEventListener("touchcancel",()=>{i=void 0},!0);let l;t.addEventListener("pointerdown",e=>{l=e.pointerType==="touch"&&e.isPrimary?{id:e.pointerId,x:e.clientX,y:e.clientY}:void 0},!0);const f=e=>{if(!l||l.id!==e.pointerId)return;const o=Math.abs(e.clientY-l.y);o>8&&o>Math.abs(e.clientX-l.x)&&u(e),e.type==="pointerup"&&(l=void 0)};t.addEventListener("pointermove",f,c),t.addEventListener("pointerup",f,c),t.addEventListener("pointercancel",()=>{l=void 0},!0)}function h(d,t){w(d.singleVideo,t);const m=t.document;let g=0,c=!1;const u=()=>{try{const l="intentional:redirects",f=Date.now(),e=JSON.parse(t.sessionStorage.getItem(l)||"[]").filter(o=>f-o<1e4);if(e.length>=3)return!1;e.push(f),t.sessionStorage.setItem(l,JSON.stringify(e))}catch{}return!0},i=()=>{c=!1;const l=t.location.pathname+t.location.search,f=$(l,d.redirects);if(f!==null){u()&&t.location.replace(f);return}for(const e of d.select){if(!new RegExp(e.when).test(l)||m.querySelector(e.selected))continue;const o=m.querySelector(e.click),r=Date.now();o instanceof t.HTMLElement&&r-g>1e3&&(g=r,o.click())}},p=()=>{c||(c=!0,t.setTimeout(i,50))};for(const l of["pushState","replaceState"]){const f=t.history[l];t.history[l]=function(...e){const o=f.apply(this,e);return i(),o}}t.addEventListener("popstate",i),d.select.length>0&&new t.MutationObserver(p).observe(m,{childList:!0,subtree:!0}),t.setInterval(i,1e3),i()}var y={"www.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"ar.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"at.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"au.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"br.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"ca.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"ch.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"cl.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"co.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"cz.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"de.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"dk.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"es.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"fi.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"fr.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"gr.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"hu.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"id.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"ie.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"in.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"it.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"jp.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"kr.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"mx.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"nl.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"no.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"nz.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"ph.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"pl.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"pt.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"ro.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"ru.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"se.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"sk.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"tr.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"uk.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]},"za.pinterest.com":{redirects:[{from:"^/ideas/?(\\?.*)?$",to:"/following/"},{from:"^/today/?(\\?.*)?$",to:"/following/"}],select:[]}}[location.hostname];y&&h(y,window)})();