Reddit replace new favicon with old

reddit replace new favicon with new

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name            Reddit replace new favicon with old
// @namespace       https://greasyfork.org/users/821661
// @match           https://www.reddit.com/*
// @match           https://sh.reddit.com/*
// @match           https://new.reddit.com/*
// @match           https://old.reddit.com/*
// @grant           GM_addStyle
// @version         1.0
// @author          hdyzen
// @description     reddit replace new favicon with new
// @license         MIT
// ==/UserScript==
'use strict';

const favicons = document.querySelectorAll('[rel*="icon"]');
favicons.forEach(favicon => favicon.setAttribute('href', `//web.archive.org/web/20230312000109im_/${favicon.href}`));

GM_addStyle(`._30BbATRhFv3V83DHNDjJAO { background-image: url('https://raw.githubusercontent.com/zenstorage/others/main/reddit.webp') !important; background-position: left !important; background-size: 80% !important; background-repeat: no-repeat !important; & svg { opacity: 0 !important; } } ._30BbATRhFv3V83DHNDjJAO > svg { visibility: hidden !important; }`);