User:Billc.cn/monobook.js

function $(str) {return document.getElementById(str)}

function printScr { //disabling print CSSes and make screen CSSes global var sss=document.styleSheets; if (sss && sss.length) for (var i=0;i<sss.length;i++) { if (sss[i].media.mediaText=='print') sss[i].disabled=true; if (sss[i].media.mediaText=='screen') sss[i].media.mediaText='all'; }	//layout tweak $('column-one').style.display='none'; $('footer').style.display='none'; $('siteNotice').style.display='none'; $('content').style.marginTop='0px'; $('content').style.marginLeft='0px'; window.print; }

//adding the printScr link document.addEventListener('load', function {	if (printScr.linked) return; try {	var tmp=document.createElement('li');	tmp.innerHTML='PrintScr';	$('t-specialpages').parentNode.appendChild(tmp);	printScr.linked=true; } catch (e) {} }, true);