您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Unblur images and redgifs iframes in sh.reddit.com
当前为
// ==UserScript== // @name Shreddit Unblur Images NSFW // @namespace https://greasyfork.org/users/821661 // @match https://www.reddit.com/* // @match https://sh.reddit.com/* // @grant GM_addStyle // @version 1.1 // @author hdyzen // @description Unblur images and redgifs iframes in sh.reddit.com // @license MIT // ==/UserScript== 'use strict'; // Verify if Shreddit const shReddit = document.querySelector('shreddit-app'); if (!shReddit) return; // Regex for match id image const regexIdImg = /https:\/\/.*\/(.*)\?/; // Interval time const sleepTime = 2000; // Unblur images, redgifs iframes async function checkMedia() { while (true) { await new Promise(resolve => setTimeout(resolve, sleepTime)); const slots = document.querySelectorAll('shreddit-blurred-container :is([slot="blurred"], [slot="revealed"])'); slots.forEach(slot => { if (slot.slot === 'blurred' && slot.nextElementSibling?.slot !== 'revealed') { const img = slot.querySelector('img.object-contain'); console.log(img.src); img.src = `https://i.redd.it/${img.src.match(regexIdImg)[1]}`; slot.closest('shreddit-blurred-container').outerHTML = slot.innerHTML; slot.addEventListener('click', () => { console.log('clicked'); }); return; } else if (slot.slot === 'revealed') { slot.closest('shreddit-blurred-container').outerHTML = slot.innerHTML; slot.addEventListener('click', () => { console.log('clicked'); }); } }); } } checkMedia(); GM_addStyle(` body { overflow: unset !important; pointer-events: unset !important; } shreddit-async-loader[bundlename="desktop_rpl_nsfw_blocking_modal"], div[style="position: fixed; inset: 0px; backdrop-filter: blur(4px);"] { display: none !important; } `);