Greasy Fork

来自缓存

Greasy Fork is available in English.

(黑白转换彩色)阳间转换

(黑白转换彩色)阴间使者!使用此脚本可以让你回到阳间。

当前为 2022-12-03 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         (黑白转换彩色)阳间转换
// @namespace    Null
// @version      1.1
// @description  (黑白转换彩色)阴间使者!使用此脚本可以让你回到阳间。
// @author       Kevin
// @license MIT
// @grant        none
// @match        *://www.bilibili.com/*
// @match        *://*/*
// ==/UserScript==

(function() {
    console.log("来到阳间");
    var URL = window.location
    var style=document.createElement('style');
    // 有些另类的网站可以反馈或者用直接替换内容
    //提高优先级
    style.innerHTML=' *{ -webkit-filter:none !important;}';
    document.getElementsByTagName('head')[0].appendChild(style)
    //上面统一处理

//举栗子

console.log("当前网址:"+URL)
if (URL.host == "www.bilibili.com"){
//哔哩哔哩进行的处理我这里直接错误抛出 不是主页的,当然也能写正则我没写
    try{
        var 横幅 = ["//i0.hdslb.com/bfs/archive/0ac04c23af3b3297bf02dca163474326898d211d.png"]
        var Logo = ["//i0.hdslb.com/bfs/archive/5d49497b6b7f30950f37c4aff205e7dd1494f3b9.png"]

        //此处用的为F12 右键 复制 JS路径
        //当然想可以自己再添加点图片
        var 横幅index = Math.round(Math.random()*(横幅.length-1))
        var Logoindex = Math.round(Math.random()*(Logo.length-1))
        document.querySelector("#bili-header-banner-img > source:nth-child(1)").setAttribute("srcset",横幅[横幅index]);
        document.querySelector("#bili-header-banner-img > source:nth-child(2)").setAttribute("srcset",横幅[横幅index]);
        document.querySelector("#bili-header-banner-img > img").setAttribute("srcset",横幅[横幅index]);
        document.querySelector("#i_cecream > div.bili-feed4 > div.bili-header.large-header > div.bili-header__banner > div.header-banner__inner > a > img").setAttribute("srcset",Logo[Logoindex]);
    } catch (e) {
        console.log("错误:"+e)

    }}




})();