isec style fix

fixing isec.pt styling issues

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

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 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         isec style fix
// @namespace    https://greasyfork.org/en/scripts/17110-isec-style-fix
// @version      20160821
// @description  fixing isec.pt styling issues
// @author       Ivo Barros
// @twitter      @L3v3L
// @homepage     http://ibarros.com/
// @match        http*://www.isec.pt/*
// @grant        none
// ==/UserScript==
/* jshint -W097 */
'use strict';

//replaces an image url with another url
function replaceImages(oldUrl, newUrl) {
    var imgs = document.getElementsByTagName('img');
    for (i = 0; i<imgs.length; i++) {
        imgs[i].src = imgs[i].src.replace(oldUrl, newUrl);
    }
}

var dropDownMenu = document.querySelectorAll('.dropdown-menu'), i;
for (i = 0; i < dropDownMenu.length; ++i) {
    dropDownMenu[i].style.margin = "0px";
}

replaceImages('http://www.isec.pt/custom/img/about/presidente/Foto_JorBar_siteISEC.jpg', 'https://pp.vk.me/c10868/v10868007/163/UddpNN7poTg.jpg');