qq.com printer friendly

By dingar Last update Jun 27, 2007 — Installed 81 times.
//
// dingar@gmail.com
//
// ==UserScript==
// @name          qq.com printer friendly
// @namespace     qq.comPrinterFriendly
// @description   Make article pages of qq.com printer friendly.
// @include       http://*.qq.com/*
// ==/UserScript==

  if (document.location.href.match('.htm')) {
    var ad=document.getElementById('Reading');
    if (ad)ad.innerHTML="";
    document.body.innerHTML="<div id='cntMain'><div id='cntL'>"+"<div id='ArticleTit'>"+document.getElementById('ArticleTit').innerHTML+"</div>"+"<div id='ArtFrom'>"+document.getElementById('ArtFrom').innerHTML+"</div>"+"<div id='ArticleCnt'>"+document.getElementById('ArticleCnt').innerHTML+"</div>"+"<div id='ArtPLink'>"+document.getElementById('ArtPLink').innerHTML+"</div>"+"</div></div>";

    var allElements = document.getElementsByTagName('div');
    for (var i = 0; i < allElements.length; i++) {
       allElements[i].style.width="98%";
    }
  }