您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
This script censors redgifs.com.
当前为
// ==UserScript== // @name Censored redgif // @namespace http://tampermonkey.net/ // @version 1.0.1 // @description This script censors redgifs.com. // @author whtb // @match https://www.redgifs.com/* // @icon https://static.vecteezy.com/system/resources/previews/006/736/319/non_2x/censored-pixel-sign-flat-style-design-illustration-concept-isolated-on-white-background-vector.jpg // @grant none // @license MIT // ==/UserScript== var n=0; var imgs; var i=0; const links = [ "https://iili.io/Jz944WP.png", "https://iili.io/JzFuRcJ.png", "https://iili.io/JzFTrTN.png", "https://iili.io/Jz96kBt.png", "https://iili.io/JxQb8p2.png", "https://iili.io/JxgKbYQ.png" ]; var mousePosition; var offset = [0,0]; var div, scroller; var isDown = false; var ScrollerFokusCheck= false; var opacity=0.9; var blure= '10px'; function newstyle(){ var newst = document.createElement('style'); newst.innerHTML = ` .Player-BackdropWrap{ opacity: ${opacity}; } video { filter: blur(${blure}); } `; return newst; } var style = document.createElement('style'); style.innerHTML = ` .divmenu { z-index: 20; width: 150px; height: 150px; top: 200px; left: 400px; background-color: #4533E9; color: #96F3F6; border-radius: 10px; box-shadow: 0px 9px 30px 0px rgba(255,149,5,0.3); } .pmenu{ margin-bottom: 8px; margin-top: 8px; font-size: 18px; } li { margin-left: 10px; list-style-type: none; padding: .1em; } ul { list-style-type: none; } .Player-MetaInfo, .Player-SideBarWrap{ z-index: 10; } .Player-BackdropWrap{ z-index: 9; object-fit: cover; } .thumbnail.lazyLoad.visible, .ImageGif-Thumbnail, .Video-Poster, .ready{ filter: blur(8px); z-index: auto; } video { background: #000; color: #FFF; z-index: 1; } div.Player-BackdropWrap img{ opacity: 1; -webkit-filter: blur(0px); filter: blur(0px); } `; document.head.appendChild(style); div = document.createElement("div"); div.style.position = "fixed"; div.classList.add("divmenu"); div.innerHTML = `<ul class="set_boxes"> <li><p class="pmenu">Opacity</p> <input id="inputOpacity" type="range" step="0.05" min="0" defaultValue="0.9" max="1" style="width: 120px;" ></li> <li><p class="pmenu">Blure</p> <input id="inputBlure" type="range" step="0.1" min="3" max="30" style="width: 120px;"></li> </ul>`; const scrollerOp = div.querySelector("#inputOpacity"); const scrollerBl = div.querySelector("#inputBlure"); document.body.insertAdjacentElement("beforeend", div); function scroller_in_fokus(){ScrollerFokusCheck= true;} function scroller_in_blure(){ScrollerFokusCheck= false;} div.addEventListener('mousedown', function(e) { if (!ScrollerFokusCheck){ isDown = true; offset = [ div.offsetLeft - e.clientX, div.offsetTop - e.clientY ]; } }, true); document.addEventListener('mouseup', function() { if (!ScrollerFokusCheck){isDown = false;} }, true); document.addEventListener('mousemove', function(event) { if (!ScrollerFokusCheck){ event.preventDefault(); if (isDown) { mousePosition = { x : event.clientX, y : event.clientY }; div.style.left = (mousePosition.x + offset[0]) + 'px'; div.style.top = (mousePosition.y + offset[1]) + 'px'; } } }, true); scrollerOp.addEventListener('input', function() {opacity = this.value; document.head.appendChild(newstyle()); console.log(newstyle());}, false); scrollerBl.addEventListener('input', function() {blure = this.value + 'px'; document.head.appendChild(newstyle()); }, false); scrollerOp.addEventListener("mouseenter", scroller_in_fokus); scrollerOp.addEventListener("mouseleave", scroller_in_blure); scrollerBl.addEventListener("mouseenter", scroller_in_fokus); scrollerBl.addEventListener("mouseleave", scroller_in_blure); function myFunction(){ imgs = document.querySelectorAll("div.Player-BackdropWrap > img[src^='https://thumbs44.redgifs.com/']"); if (imgs.length != n){ i+=1; n = imgs.length; imgs[imgs.length-1].src = links[i%links.length]; document.head.appendChild(style); document.head.appendChild(newstyle()); } } var timer = setInterval( myFunction, 10); window.addEventListener('load', function() { document.head.appendChild(style); myFunction(); });