// ==UserScript==
// @name 教学管理系统修补脚本
// @namespace tms
// @include *
// ==/UserScript==
var win = typeof(unsafeWindow) != 'undefined' ? unsafeWindow : window;
var doc = win.document;
if (typeof(showmenu_old) == 'undefined')
showmenu_old = win.showmenu;
function showmenu_wrapper(main, menuid) {
if (!doc.all) doc.all = Object();
doc.all.menu = doc.getElementById('menu');
doc.all[main] = doc.getElementById(main);
if (!doc.all[menuid])
doc.all[menuid] = doc.getElementById(menuid);
else
doc.all[menuid].style.visibility = 'visible';
return showmenu_old(main, menuid);
}
function fix_style(id, name, value)
{
var o = document.getElementById(id);
if (o)
o.style[name] = value;
}
fix_style('denglu', 'backgroundPosition', '49.999% 50%');
fix_style('denglu', 'width', 'auto');
fix_style('main', 'height', 'auto');
fix_style('content', 'height', 'auto');
win.showmenu = showmenu_wrapper;
var imgs = document.getElementsByTagName('img');
for (var i=0; i
{
if (imgs[i].src.indexOf('bslogin_01')>0 || imgs[i].src.indexOf('bslogin_02')>0)
{
var br = document.createElement('br');
var o = imgs[i];
o.parentNode.insertBefore(br, o.nextSibling);
}
}