// ==UserScript==
// @name           LibAldebaran
// @namespace      aldebaran
// @description    removes text protectors from HTML content on lib.aldebaran.ru (c) profuel
// @include        http://lib.aldebaran.ru/author/*
// @version        1.0
// ==/UserScript==

// date: 2008-03-14
// http://profuel.info/gs/aldebaran.htm

var code = 
" var obj = document.getElementById(\"chid\");"+
" if (obj) {"+
" var text = obj.innerHTML; "+
" txt = new String(text);"+
// uncomment next line to remove paging navigation 
//" txt = txt.replace(/<div class=\\\"content\\\">.*?<\\/div>/g, \"\");"+
" txt = txt.replace(/<span class=\\\"?h\\\"?>.*?<\\/span>/g, \"\");"+
" document.getElementById(\"chid\").innerHTML = txt;"+
"document.onmousedown=(function() { return true;}); "+
"document.ondragstart=(function() { return true;});"+
"document.onselectstart = (function() { return true;});"+
"document.ontextmenu = (function() { return true;});"+
"document.body.oncopy=(function() { return true;});"+
"document.body.oncontextmenu=(function() { return true;});"+
"document.body.onclick=(function() { return true;});"+
"document.onclick=(function() { return true;});"+
"window.clearTimeout(noSel);"+
"get_selection = (function(){});"+
"LockSel = (function(){});"+
"click = (function(){});"+
"pBeforeCopy = (function(){});"+
"}"+
""
;

var elements = document.getElementsByTagName('small');
if (elements.length>0) {
	elements[3].innerHTML+= "<input type='button' value='Update' onclick='javascript:"+ code +" ' />";
	window.setTimeout(code, 10000);
}
