It's Not Important

At least part of the world will became less important now.

目前为 2015-12-09 提交的版本。查看 最新版本

// ==UserScript==
// @name         It's Not Important
// @namespace    lainscripts_it_is_not_important
// @version      0.1
// @description  At least part of the world will became less important now.
// @author       lainverse
// @match        *://*/*
// @grant        none
// ==/UserScript==
/* jshint -W097 */
'use strict';

var c = 0, imp = document.querySelectorAll('[style*="!important"]');
for (var i = 0; i < imp.length; i++) {
    var si = imp[i].getAttribute('style'), so = si.replace(/display:[^;!:]*!important\s*;?/g,'');
    if (si != so) {
        imp[i].setAttribute('style',so);
        c++;
    }
}
if (c) console.log('Now '+c.toString()+' elements on the page is less important!');