// $Id: cwruhypeenvironment.user.js,v 1.3 2005/06/28 03:20:57 craig Exp $
// ==UserScript==
// @name          CWRU Hype Environment
// @namespace     http://craig.copi.org/greasemonkey/
// @description   Replace "powerful" with "hyped" in appropriate places
// @include       http://*.cwru.edu/*
// @include       http://*.case.edu/*
// ==/UserScript==

//snag text elements that are non-empty.  Provided by Pete Kernan.
var els = document.evaluate(
          '//text()[normalize-space(.)]',
          document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);

var el;
var i = 0;

while (el=els.snapshotItem(i++)) {
  // Protect a few tags
  if (el.parentNode.tagName.match(/^(SCRIPT|STYLE)$/)) continue;

  //GM_log(el.parentNode.tagName);
  el.textContent=el.textContent.replace(
    /powerful\s+learning\s+environment/gi,
    'hyped learning environment');
}

