It's Not Important

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

Verze ze dne 11. 01. 2016. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         It's Not Important
// @namespace    lainscripts_it_is_not_important
// @version      0.5
// @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|(margin|padding)(-top|-bottom)?):[^;!]*)!important/g,function(str,grp){return grp});
    if (si != so) {
        imp[i].setAttribute('style',so);
        c++;
    }
}
if (c) console.log('Now '+c.toString()+' element'+(c>1?'s':'')+' on the page '+(c>1?'are':'is')+' less important!');