vernal pool
Mittineague

Troll Blocker 2 GreaseMonkey Userscript

There are 49 plants in blossom on July the 2nd.
Asiatic Dayflower Commelina communis blossoms between Jun 29 and Aug 29
Bee Balm Monarda didyma Jun 27 to Aug 07
Birdsfoot Trefoil Lotus corniculatus Jun 20 to Sep 05
Bittersweet Nightshade Solanum dulcamara May 30 to Sep 06
Black-eyed Susan Rudbeckia serotina Jun 18 to Sep 06
Black Nightshade Solanum nigrum Jun 29 to Sep 06
Bouncing Bet Saponaria officinalis Jun 03 to Aug 31
Canada Lily Lilium canadense Jul 01 to Jul 10
Celandine Chelidonium majus May 07 to Sep 11
Chicory Cichorium intybus Jun 28 to Oct 24
Common Cattail Typha latifolia Jun 18 to Jul 01
Common Cinquefoil Potentilla simplex Apr 30 to Aug 19
Common Elder Sambucus canadensis Jun 12 to Jul 10
Common Milkweed Asclepias syriaca Jun 18 to Jul 09
Common Mullein Verbascum thapsus Jun 17 to Jul 22
Common Plantain Plantago major Jun 27 to Jul 16
Common St. Johnswort Hypericum perforatum Jun 08 to Sep 26
Cow Vetch Vicia cracca May 23 to Aug 29
Creeping Wood Sorrel Oxalis corniculata May 28 to Aug 29
Daisy Fleabane Erigeron annuus May 30 to Oct 24
Day Lily Hemerocallis fulva Jun 20 to Jul 22
Enchanters Nightshade Circaea quadrisulcata Jun 24 to Aug 02
English Plantain Plantago lanceolata Jun 08 to Jul 18
Field Hawkweed Hieracium pratense May 23 to Sep 07
Fringed Loosestrife Lysimachia ciliata Jul 01 to Aug 02
Heal-all Prunella vulgaris Jun 19 to Aug 29
Henbit Lamium amplexicaule Jun 19 to Aug 29
Indian Tobacco Lobelia inflata Jun 25 to Aug 28
Meadowsweet Spiraea latifolia Jun 27 to Aug 25
Mild Water Pepper Polygonum hydropiperoides Jul 01 to Jul 01
Moneywort Lysimachia nummularia Jun 15 to Jul 10
Motherwort Leonurus cardiaca Jun 23 to Aug 12
Oxeye Daisy Chrysanthemum leucanthemum May 15 to Aug 02
Pokeweed Phytolacca americana Jul 01 to Jul 23
Red Clover Trifolium pratense May 23 to Oct 24
Shrubby Cinquefoil Potentilla fruticosa Jun 03 to Sep 19
Spiderwort Tradescantia virginiana Jun 16 to Jul 11
Spotted Touch-me-not Impatiens capensis Jul 01 to Sep 11
Tall Buttercup Ranunculus acris May 15 to Jul 16
Tall Meadow Rue Thalictrum polygamum Jun 18 to Jul 10
Thyme-leaved Speedwell Veronica serpyllifolia May 10 to Aug 02
Water Hemlock Cicuta maculata May 15 to ....
// ==UserScript==
// @name          Troll Blocker 2
// @namespace     http://www.mittineague.com/dev/
// @description   blocks out annoying troll posts
// @include       http://massdems.blogspot.com/*
// ==/UserScript==
 
/*
 * Troll Blocker 2  -  trollblocker2.user.js version 1.1
 * Author: Mittineague <N/A> (N/A) http://www.mittineague.com
 *
 * Change Log
 * version 1.0 - Nov 11, 2006
 * version 1.1 - November 15, 2006  // added (function(){ [CODE] })();
 *        // changed event capture to bubble for Opera compatibility
 * 
 * script hosted at http://www.mittineague.com/dev/trollblocker2.user.js
 * and can be found at http://userscripts.org/scripts/show/6324
 *
 * This script was created specifically for the
 * Massachusetts Democratic Party
 * blogs at massdems.blogspot.com
 * With special thanks to "Anonymous"
 * for your encouragement
 *
 * The blogs use these DOM mark-ups
 * ........
 * <dt class="comment-data"                             |
 *   <a></a> // "name" anchor tag                       |
 *   text - "At"                                        |
 *   <a>Time and Date</a> // link to above anchor tag   |
 *   text - ","                                         |
 ******* Beginning of Variable DOM Section              |
 * VARIATION 1 : anonymous user comment                 |
 *   text - "Anonymous said..."                         | The dt
 * VARIATION 2 : non-registered user comment            | section is
 *   <span>                                             | replaced with a
 *      [USERS NAME HERE]                               | new dt saying
 *   </span>                                            | that it has
 *   text - " said..."                                  | been replaced
 * VARIATION 3 : registered user comment                |
 *   <a rel="nofollow">                                 |
 *     [USERS NAME HERE]                                |
 *   </a>                                               |
 *   text - " said..."                                  |
 ******* End of Variable DOM Section                    |  
 * </dt>                                                |_______________
 * <dd class="comment-body">                            | The dd section
 *   [CONTENT HERE]                                     | is replaced with
 * </dd>                                                | a new empty dd
 *
 * CURRENT SCRIPT ACTIONS
 * script replaces <dt> and <dd> (with it's contents) of known trolls with new <dt> <dd>
 * script inserts <span> after each user before closing </dt> tag on all posts
 * script replaces <dt> and <dd> (with it's contents) of newly blocked trolls with new <dt> <dd>
 *
 * Tired of seeing known troll posts on page load?
 * Add known trolls to array sequentially starting with "0"
 * Names are Case sensitive
 * ie. "mittineague" is not the same as "Mittineague", or "MITTINEAGUE"
 * knownTrolls = new Array();
 * knownTrolls[0] = "first known troll's name";
 * knownTrolls[1] = "second known troll's name";
 * knownTrolls[2] = "third known troll's name";
 * knownTrolls[3] = "fourth known troll's name";
 * etc. etc.
 */
 
(function(){
 
/* add known trolls beneath the following array as shown above
 * names added here will be filtered from all threads
 * names must be removed from array to see posts again
 */
knownTrolls = new Array();
 
 
var dataItems, thisDataItem, userName, thisAttrs;
subNodes = new Array();
var newItems, thisNewItem;
 
  dataItems = document.evaluate(
    "//dt[@class='comment-data']",
    document,
    null,
    XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
    null);
 
  for (var i = 0; i < dataItems.snapshotLength; i++)
  {
    thisDataItem = dataItems.snapshotItem(i);
  if(thisDataItem.innerHTML.search(/Anonymous/gi) != -1 )
  {
    userName = "Anonymous";
  }
 
  subNodes = thisDataItem.childNodes;
  for(var j = 0; j < subNodes.length; j++)
  {
    if(subNodes[j].nodeName == "SPAN")
    {
      userName = subNodes[j].innerHTML;
    }
    else if(subNodes[j].nodeName == "A")
    {
      thisAttrs = subNodes[j].attributes;
      for(var k = 0; k < thisAttrs.length; k++)
      {
        if(thisAttrs[k].value == "nofollow")
        {
          userName = subNodes[j].innerHTML;
        }
      }
    }
  }
 
    var newSpan = document.createElement('span');
    var blockText = document.createTextNode(" - Troll??  Block " + userName);
    newSpan.appendChild(blockText);
    newSpan.style.color = "#811400";
    newSpan.style.textDecoration = "underline";
    newSpan.style.cursor = "pointer";
    newSpan.style.marginLeft = "2em";
    newSpan.setAttribute("posterName",userName);
    newSpan.addEventListener(
    "mouseover",
    function() {
    this.style.textDecoration = "none";
    },
    false);
    newSpan.addEventListener(
    "mouseout",
    function() {
    this.style.textDecoration = "underline";
    },
    false);
    newSpan.addEventListener(
    "click",
    function() {
    var newName = this.getAttribute("posterName");
    hideNewTroll(newName);
    },
    false);
    thisDataItem.appendChild(newSpan);
 
    /* hide known Trolls */
    for (var m = 0; m < knownTrolls.length; m++)
    {
      if ( userName == knownTrolls[m] )
   {
          var newDT = document.createElement('dt');
          var newDD = document.createElement('dd');
          newDT.style.marginTop = "2em";
          newDT.style.marginBottom = "2em";
          newDT.style.color = "#f00";
          var newText = document.createTextNode("All posts by " + knownTrolls[m] + " have been Blocked, to view posts by this person you must edit the trollblocker2.user.js file.");
          newDT.appendChild(newText);
          var atNode = thisDataItem; // DT
    var wsNode = atNode.nextSibling; // #text (whitespace)
          var postNode = wsNode.nextSibling; // DD
       atNode.parentNode.replaceChild(newDD, postNode);
    atNode.parentNode.replaceChild(newDT, atNode);
  }
    }
userName = "";
}
 
function hideNewTroll(newName){
 
  newItems = document.evaluate(
  "//span[@posterName ='" + newName + "']",
  document,
  null,
  XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
  null);
 
  for (var n = 0; n < newItems.snapshotLength; n++) {
    thisNewItem = newItems.snapshotItem(n);
    var replacement = document.createElement('dt');
    var companion = document.createElement('dd');
    replacement.style.marginTop = "2em";
    replacement.style.marginBottom = "2em";
    replacement.style.color = "#f00";
    var newText = document.createTextNode("All posts by " + newName + " have been Blocked on this web page, to view posts by this person, you must Reload this web page.");
    replacement.appendChild(newText);
    var upperNode = thisNewItem.parentNode; // DT
    var textNode = upperNode.nextSibling; // #text (whitespace)
    var commentNode = textNode.nextSibling; // DD
    upperNode.parentNode.replaceChild(companion, commentNode);
    upperNode.parentNode.replaceChild(replacement, upperNode);
  }
}
 
})();
trollblocker2.user.js
About - Blog - Sitemap - Contact - Forums - Home 

Wireless devices:
The Wildflower list can be searched from the list serve data available at www.mittineague.com/wildflowers.wml


PHP icon. PEAR icon. MySQL icon. phpBB icon. Sitepoint icon. Valid XHTML 1.0 icon. Valid CSS! icon. Level A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0