Skip to content

Instantly share code, notes, and snippets.

@chenx6
Last active January 10, 2022 14:38
Show Gist options
  • Save chenx6/97d912a6ef623f5142f69f44b580c1a0 to your computer and use it in GitHub Desktop.
Save chenx6/97d912a6ef623f5142f69f44b580c1a0 to your computer and use it in GitHub Desktop.
Stackoverflow 的 Ciro Santilli 你🐴死了
// ==UserScript==
// @name Stackoverflow 的 Ciro Santilli 你🐴死了
// @namespace Violentmonkey Scripts
// @match https://stackoverflow.com/*
// @match https://serverfault.com/*
// @match https://superuser.com/*
// @match https://meta.stackexchange.com/*
// @match https://webapps.stackexchange.com/*
// @match https://webmasters.stackexchange.com/*
// @match https://gamedev.stackexchange.com/*
// @match https://gis.stackexchange.com/*
// @match https://tex.stackexchange.com/*
// @match https://askubuntu.com/*
// @match https://stackapps.com/*
// @match https://ux.stackexchange.com/*
// @match https://unix.stackexchange.com/*
// @match https://wordpress.stackexchange.com/*
// @match https://apple.stackexchange.com/*
// @match https://softwareengineering.stackexchange.com/*
// @match https://electronics.stackexchange.com/*
// @match https://android.stackexchange.com/*
// @match https://security.stackexchange.com/*
// @match https://dba.stackexchange.com/*
// @match https://codereview.stackexchange.com/*
// @match https://codegolf.stackexchange.com/*
// @grant none
// @version 1.0
// @author -
// @description 2021/11/8 上午11:09:57
// ==/UserScript==
// https://stackexchange.com/sites?view=list#technology-traffic
// [...document.querySelectorAll(".category-technology")].map(v => v.querySelector('a')).map(v => v.href)
const qsa = (q) => document.querySelectorAll(q);
[...qsa("span[itemprop='name']"),
...qsa("a[href^='/users/895245/']"),
...qsa("a[href^='/users/32558/']")
].forEach(v => {
if (v.innerText.includes("Ciro Santilli")) {
v.innerText = "Ciro Santilli 我🐴死了"
} else {
v.innerHTML = "<p>我🐴的遗照</p>"
}
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment