WintyBadass / Bootstrap for ProgTest

// ==UserScript==
// @name         Bootstrap for ProgTest
// @namespace    
// @version      0.3
// @description  Script pro přeskinování ProgTestu
// @author       Adam Jedlička
// @match        https://progtest.fit.cvut.cz/*

// @require      http://code.jquery.com/jquery-latest.js
// @require      http://gregpike.net/demos/bootstrap-file-input/bootstrap.file-input.js
// ==/UserScript==

document.body.style.display = "none"

$('link[rel="stylesheet"]').attr('disabled', 'disabled')

$('head').append('<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">')

$('body').wrapInner('<div id="wrap" class="container"></div>')

$('table').addClass('table table-bordered')
$('input[type=submit]').addClass('btn btn-primary btn-xs')

$('#wrap').css('padding-bottom', '10px')
$('center').css('padding-bottom', '10px')

$('input[type=file]').bootstrapFileInput()
$('input[type=file]').parent().addClass('btn-xs')
$('input[type=file]').parent().find('span').html('Vybrat soubor...')

$('table').first().find('*').removeAttr('bgcolor')
$('table').first().find('tr').addClass('active')
$('table').first().find('*').css('border', 'none')
$('table').css('padding', '0px')
$('table').css('margin', '0px')

$('.header').find('tr').addClass('active')

$('.tbFailSepCell').parent().addClass('danger')
$('.tbOkSepCell').parent().addClass('success')
$('.ltbSepCell').parent().addClass('info')

$('.rtbCell').attr('align', 'middle')

document.body.style.display = ""
console.log('Bootstrap for ProgTest v0.3 loaded...')