您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove annoying gifs and replace them with something more... satisfying
// ==UserScript== // @name Gif2Cage // @namespace https://github.com/ryanford-dev/gif2cage // @description Remove annoying gifs and replace them with something more... satisfying // @match *.gitter.im/* // @version 0.0.2 // @license https://opensource.org/licenses/MIT // ==/UserScript== let imgs = []; function findGifs() { imgs = document.querySelectorAll("img"); imgs.forEach((img) => { if (img.src.substr(-3) == "gif") { let rand = String(Math.floor(Math.random() * 80)), url = "http://cageme.herokuapp.com/specific/" + rand; img.src = url; img.alt = "The One True Cage"; img.parentElement.href = url; } }); } window.addEventListener("DOMNodeInserted", findGifs);