Corne's Improvements to iLead

As of 2018-01-22. See the latest version.

// ==UserScript==
// @name     	Corne's Improvements to iLead
// @description:en  Greasemonkey script in order to change some stuff on iLead
// @version  	1
// @grant    	none
// @include 	http://ictalfa.nl/ilead/stud/*
// @include 	http://*.ictalfa.nl/ilead/stud/*
// @include 	https://ictalfa.nl/ilead/stud/*
// @include 	https://*.ictalfa.nl/ilead/stud/*
// @namespace https://greasyfork.org/users/167723
// ==/UserScript==

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

if (window.location.href.indexOf("studvoortgang") != -1)
{
	addGlobalStyle(`
		#main > div:nth-child(5) {
			max-height: none !important;
		}

		#main > div:nth-child(7) {
			min-height: 300px;
			height: auto !important;
		}
	`);
}

if (window.location.href.indexOf("persoonlijk") != -1)
{
	addGlobalStyle(`
		#main > div:nth-child(4), #main > div:nth-child(6) {
			min-height: 300px;
			height: auto !important;
		}

		#periodebalk > table:nth-child(1) {
			width: 100% !important;
		}

		#periodebalk > table > td * {
			border: 1px dashed #999 !important;
		}

		#periodebalk > table, #periodebalk > table > th *{
			border: 2px solid silver !important;
			border-collapse: collapse;
		}
	`);
}