Last active
December 1, 2022 10:31
-
-
Save TheSnowfield/da73d81f4a05206bb05288513dde1d9a to your computer and use it in GitHub Desktop.
remove grayscale
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Fuck Grayscale | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// get all elements | |
const list = document.querySelectorAll('*'); | |
// key words of classes | |
const keywords = ['gray', 'big-event-gray', 'grayTheme', 'tb-allpage-filter']; | |
window.onload = () => { | |
// remove grayscale filters | |
list.forEach(i => { | |
// remove style | |
if(i.style.filter.startsWith('grayscale')) { | |
i.style.filter = ''; | |
} | |
// remove style classes | |
keywords.forEach(j => { | |
i.classList.remove(j); | |
}); | |
}); | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment