163.com printer friendly

By dingar Last update May 9, 2007 — Installed 414 times.
//
// dingar@gmail.com
//
// ==UserScript==
// @name          163.com printer friendly
// @namespace     163.comPrinterFriendly
// @description   Make article pages of 163.com printer friendly.
// @include       http://*.163.com/*
// @exclude       http://*.163.com/special/*
// @exclude       http://*.163.com/board/*
// @exclude       http://*.163.com/photo/*
// ==/UserScript==

  if (document.location.href.match('.html')) {
    var content=document.getElementById('endMain');
    document.body.innerHTML="<div class='endArea'><div class='col1'><div id='endMain'>"+content.innerHTML+"</div></div></div>";

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