Bring My Color Back

Remove grayscale filter enforced on ominous events. Be happy.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Bring My Color Back
// @namespace    https://greasyfork.org/zh-CN/scripts/455761-bring-my-color-back
// @license MIT
// @version      0.3
// @description  Remove grayscale filter enforced on ominous events. Be happy.
// @author       You
// @match        *://*/*
// @icon         https://images.unsplash.com/photo-1545231097-cbd796f1d95f?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8M3x8cmFpbmJvd3xlbnwwfHwwfHw%3D&auto=format&fit=crop&w=600&q=60
// @grant        none
// ==/UserScript==

'use strict';
let defaultTreatment = () => {
    document.getElementsByTagName("html")[0].style.cssText="-webkit-filter: grayscale(0%) !important; filter: grayscale(0%) !important; ";
}

let classRemover = ( className ) => {
    for (let [key, element] of Object.entries(document.getElementsByClassName(className))) {
         if(element != undefined){
             element.classList.remove(className);
         }
     }
}
if(window.location.href.includes("baidu")){
    classRemover("big-event-gray");
}else if(window.location.href.includes("iqiyi")){
    setTimeout(()=>{classRemover("gray")},1000);
}else if(window.location.href.includes("weibo")){
    classRemover("grayTheme");
}else if(window.location.href.includes("qq")){
    setTimeout(()=>{classRemover("gray-style-remembrance")},1000);
}else{
    defaultTreatment();
}