您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Turns all images on page to benjis
当前为
// ==UserScript== // @name Benjify // @namespace Joshy2Saucy // @description Turns all images on page to benjis // @include * // @version 1.0 // @license Joshy2Saucy // ==/UserScript== (function() { var Program = { // To add images: Google image search for the desired images, then run the following command in your browser console (tested in FF): // var output = ''; document.body.innerHTML.match(/(?=imgurl=)(.+?)(?=&)/g).map(function(value) {var url = encodeURIComponent(decodeURIComponent(decodeURIComponent(value)).replace('imgurl=', '').replace(/'/g, '\\\'')); if (url) output += '\'' + url + '\',';}); window.open('data:text/plain,' + output, '_blank', 'width=500,height=500,scrollbars=1'); // Copy and paste the output below. Make sure the opening and closing []s are still there, and make sure the last line does not end with a comma. replacementImages: [ 'https://cdn.discordapp.com/attachments/1071976037338067046/1249227844777807872/cEKy0ty.png?ex=6696a857&is=669556d7&hm=c41fbda855659a8685dcbdf0daa11fba27ec2129b3aa3057bd45ba843c3e0c59&'], loaded: false, changeBufferTimer: null, main: function() { if (!this.loaded) { this.loaded = true; document.addEventListener('DOMSubtreeModified', this.domChanged, false); this.domChangedBuffered(); } }, domChanged: function() { if (this.changeBufferTimer) { clearTimeout(this.changeBufferTimer); this.changeBufferTimer = null; } this.changeBufferTimer = setTimeout(this.domChangedBuffered.bind(this), 222); //-- 222 milliseconds }, domChangedBuffered: function() { var images = document.getElementsByTagName('img'); for (var i = 0; i < images.length; i++) { images[i].src = this.replacementImages[Math.floor(Math.random() * this.replacementImages.length)]; } } }; window.addEventListener('load', Program.main.bind(Program), false); })();