我保留了404时台湾友人开发的反吊丧脚本,稍微试了一下没有效果,不知道是怎么做到的,比政府举行吊丧的技术还强,如果害怕泄密被政府利用能不能私信一下原理,就是好奇。
这是反吊丧脚本的代码
// ==UserScript==
// @name 清明节要拒绝强行吊丧
// @namespace https://github.com/axiref/?404-gray
// @version 1.55
// @description 拒绝被强制参加4月4号的网页黑白葬礼
// @author axiref
// @include http://*/*
// @include https://*/*
// @grant GM_addStyle
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
function getFirstByClass(className) {
return document.getElementsByClassName(className)[0]
}
function getManyElementsByClass (classNameList) {
var eleList = []
for (var k in classNameList) {
var className = classNameList[k]
eleList.push(getFirstByClass(className))
}
return eleList
}
var elements = [
document.documentElement,
document.body
]
var robberList = [
"www.gov.cn",
"paper.people.com.cn",
"cpc.people.com.cn"
]
var host = window.location.hostname
// 针对QQ邮箱
if (host == "mail.qq.com") {
GM_addStyle(".header,.login_pictures,.xm_login_container,.footer{filter: none !important}")
}
// 针对163邮箱
if (host == "mail.163.com") {
window.onload=function(){
getFirstByClass("header-163logo").classList.remove("gray")
}
}
// 针对新浪
if (host == "www.sina.com.cn") {
GM_addStyle("*{filter: none !important;}")
}
// 针对手机新浪网
if (host == "sina.cn") {
window.onload=function(){
getFirstByClass("hd").classList.remove("qingming")
}
}
// 针对百度网盘
if (host == "pan.baidu.com") {
window.onload=function(){
document.body.style.filter="none"
}
}
// 针对3dm
if (host == "www.3dmgame.com") {
GM_addStyle(".header_wrap,.content,.Linkwrap,.fotter{filter: none !important;}")
window.onload=function(){
document.body.style = "filter: unset !important"
}
}
// 针对百度搜索
if (host == "www.baidu.com") {
GM_addStyle("#head_wrapper{filter: none !important;}")
}
// 针对卡饭论坛
if (host == "bbs.kafan.cn") {
GM_addStyle("html, body {filter: none !important;}")
var kf_style = "background:url(//a.kafan.cn/template/comeing_city/style/t2/bg.jpg) repeat-x 0 0 #f1f0f0 !important"
window.onload=function(){
document.body.style=kf_style
}
}
// 取消网页灰度
for (var k in elements) {
var element = elements[k]
element ? element.style.filter = "none" : null
}
// 让应该黑白的页面黑白
if (robberList.indexOf(host) !== -1) {
document.documentElement.style.filter="grayscale(100%)"
}
// 彩蛋
if (host == "www.fmprc.gov.cn") {
GM_addStyle(".main1_left,body{transition: filter 10s}")
window.onload=function(){
let winnieStyle = getFirstByClass("main1_left").style
winnieStyle.filter="grayscale(100%)"
setTimeout(function () {
getFirstByClass("commend").innerHTML="<h1 style='font-size: 2em'>永 垂 不 朽</h1>"
document.body.style.filter="grayscale(100%)"
}, 4000)
}
}
})();