去掉网页灰色滤镜

try to take over the world!

// ==UserScript==
// @name         去掉网页灰色滤镜
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  try to take over the world!
// @author       AN drew
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var css = '* {-webkit-filter: grayscale(0%);'+
        '-moz-filter: grayscale(0%);'+
        '-ms-filter: grayscale(0%);'+
        '-o-filter: grayscale(0%);'+
        'filter: grayscale(0%);'+
        'filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=0);'+
        'filter: none!important;}';

    var head = document.getElementsByTagName('head')[0];
    var style = document.createElement('style');
    style.type = 'text/css';
    if(style.styleSheet)
    {
        style.styleSheet.cssText = css;
    }
    else
    {
        style.appendChild(document.createTextNode(css));
    }
    head.appendChild(style);

})();