Advertisement
Guest User

Untitled

a guest
Jun 12th, 2025
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.95 KB | None | 0 0
  1. {"REDDIT_media":{"link":"^(?:[a-z]{2,5}(?:-[a-z]{2})?\\.)?reddit\\.com/(?:r|user)/[^/]+/comments/([\\da-z]+)/[^/]+/(?:\\?utm_content=(?:title|thumbnail).*)?$","loop":3,"img":"^(g\\.redditmedia\\.com/[\\w-]+\\.gif\\?(?:[^&]+&)*?fm=mp4[^#]*)(.*)","to":":\nif(location.hostname==='reddtastic.com'&&this.node.closest('.post')?.querySelector('img,video'))return '//reddtastic/'+$[1]\n\nif ($[2] !== 0) return $[2] == '#mp4' ? $[0] : $[1] + '#mp4'\nvar u, p, c, n = window.location.hostname.slice(-10) == 'reddit.com' && this.node\n\nif (!n) return ''\nif (!this.find_original && n.matches('shreddit-post > a.absolute')) {\n this.find_original = this.find;\n this.find = function (trg, x, y) {\n if (trg.matches?.('faceplate-img')) {\n let href = trg.closest?.('shreddit-post')?.querySelector('a.absolute')?.href;\n if (href) return this.find_original({ href, IMGS_TRG: trg })\n }\n return this.find_original(trg, x, y);\n }\n}\n\nif (n.matches('div.link a.thumbnail,div.link a.thumbnail>img, div.link a.title, div.link a.thumbnail.image')) {\n p = n; while ((p = p.parentElement) && !p.matches('div.link'));\n u = p && p.dataset, u = u && (u.url || u.hrefUrl)\n if (u && /(v\\.redd\\.it|\\.reddit\\.com\\/gallery)\\//.test(u)) return u\n c = p && p.querySelector('div.expando[data-cachedhtml]')\n c = c && c.getAttribute('data-cachedhtml')\n u = c && c.match(/(?:<a href|(?:class=\"preview\"|<source) src)=\"([^\"]+)/g)\n if (u) {\n u = u.map(function (i) {\n var u = i.slice(i.lastIndexOf('\"') + 1).replace(/&amp;/g, '&');\n return u + (i[1] == 's' ? '#mp4' : '')\n });\n u = c.indexOf('<source') != -1 ? u.reverse() : u\n return u.length ? u.join('\\n') : ''\n }\n u = p.dataset, u = u.url || u.hrefUrl\n\n} else if (n.matches('a.Post__titleLink')) {\n u = n.closest('.Post__top').querySelector('a.PostThumbnail').href\n\n} else if (n.matches('a[data-click-id=body] > div > h3, .Post div > div[role=img], faceplate-img, a.thumbnail > img') ||\n n.matches('shreddit-post > a.absolute') && !n.parentElement.querySelector('faceplate-img:not(.avatar, .shreddit-subreddit-icon__icon, .absolute, .flair-image)') || n.closest('div[data-id=\"search-media-post-unit\"]'))\n{\n if (/^(?:text|multi_media)$/.test(n.offsetParent?.getAttribute('post-type'))) return ''\n p = n.closest('div[id^=t3_]');\n if (p && p.querySelector('p, i.icon-text')) return ''\n p = p && p.querySelector('a > .icon-external_link')\n p = p ? p.parentElement : { href: '//www.reddit.com/by_id/t3_' + $[1] + '.json' }\n p = this.find({ href: p.href, IMGS_TRG: n })\n n.title = n.getAttribute('aria-label') || n.title\n return (Array.isArray(p) ? p.join('\\n') : (p === null ? 'null' : p)) || ''\n}\n\nreturn u && /^(https?:)?\\/\\/i\\.redd\\.?it/.test(u) ? u : ''","note":"Imagus_fan\nhttps://www.reddit.com/r/imagus/comments/1g5ltuk/comment/lsc202f\nOLD\nhttps://www.reddit.com/r/imagus/comments/1fwsaq4/comment/lqvl4eg\nhttps://www.reddit.com/r/imagus/comments/1bp0x7a/comment/kz7kwi0\n\n\n!!!\nДля просмотра видео и альбомов на sh.reddit.com курсор следует наводить на весь блок с публикацией (рядом с названием).\n==\nTo view videos and albums on sh.reddit.com, you should hover your cursor over the entire post block (next to the title).\n\n\n\nEXAMPLES\nhttps://www.reddit.com/r/ipl/?feedViewType=cardView\nhttps://sh.reddit.com/?feed=home&feedViewType=classicView\nhttps://www.reddit.com/r/videos/?feedViewType=cardView\nhttps://sh.reddit.com/r/kpopfap/"},"REDDIT_post":{"link":"^reddit\\.com/by_id/(t3_[\\da-z]+)","res":":\n$ = JSON.parse($._).data.children[0].data\nif ($.crosspost_parent) $ = $.crosspost_parent_list[0]\n\nconst loop = !$?.url.includes('.reddit.com/')&&this.find({href: $.url})\nif(loop !== false && loop !== '')return {loop:$.url}\n\nif ($.preview?.images?.[0]?.variants?.mp4?.source.url) {\n return [$.preview.images[0].variants.mp4.source.url + '#mp4', $.title]\n}\n\nif ($.preview?.reddit_video_preview?.hls_url) {\n return { loop: $.preview?.reddit_video_preview?.hls_url }\n}\n\n// prevent looping to the same page\nif ($.url.includes($.permalink)) return true;\n\nreturn $.is_video || $.is_gallery || this.TRG?.matches?.('faceplate-img') || ['youtube.com', 'youtu.be'].includes($.domain) ? { loop: $.url } : true","note":"Imagus_fan\nhttps://www.reddit.com/r/imagus/comments/z0zyox/comment/lheshaq\nOLD\nhttps://www.reddit.com/r/imagus/comments/z0zyox/comment/kymwf6u\nhttps://www.reddit.com/r/imagus/comments/1bp72kd/comment/kwzpsi7\n\n\n!!!\nДля просмотра видео и альбомов на sh.reddit.com курсор следует наводить на весь блок с публикацией (рядом с названием). На одиночных картинках фильтр работает как обычно.\n==\nTo view videos and albums on sh.reddit.com, you should hover your cursor over the entire post block (next to the title). On single images, the sieve works as usual.\n\nEXAMPLES\nhttps://sh.reddit.com/r/kpopfap/?feedViewType=cardView"}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement