vernal pool
Mittineague

No Pop-up Links 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           No Pop-up Links
// @namespace      http://www.mittineague.com/dev/
// @description    Changes pop-up links to regular links
// @include        *
// @exclude     http://www.mittineague.com/blog/wp-admin/*
// ==/UserScript==
 
/*
 * No Pop-up Links -  nopopuplinks.user.js version 1.6
 * Author: Mittineague <N/A> (N/A) http://www.mittineague.com
 *
 * script hosted at http://www.mittineague.com/dev/nopopuplinks.user.js
 * and can be found at http://userscripts.org/scripts/show/5273
 *
 * Change Log
 * version 1.0 - August 23, 2006
 * version 1.1 - August 23, 2006  // added removal of target="_blank"
 * version 1.2 - August 30, 2006  // added removal of scripted pop-ups, added option vars
 * version 1.3 - September 1, 2006  // made "target" "blank" only for frame functionality
 * version 1.4 - September 3, 2006  // added open = null for external scripts
 *          // added form target="_blank"
 * version 1.5 - October 8, 2006  // regex improvement, added '-' and '_'
 * version 1.6 - November 15, 2006  // added (function(){ [CODE] })();
 * 
 * FEEDBACK REQUESTED
 * If anyone using this script finds a pop-up link (other than CSS hide -> display)
 * that is not nullified please leave a comment at http://www.mittineague.com/cont.php
 * 
 * To Do - Restore link functionality to scripted pop-ups
 *
 * This script searches for "window.open" in every anchor
 * It will work for pop-ups in these formats:
 *   <a href="javascript:window.open ....
 *   <a href="#" onclick="window.open ....
 *  <a .... target="_blank"
 *
 * The above alone does not prevent scripted pop-ups. That is, those techniques which
 * do not have "window.open" in the link, but rather in a script that's either called
 * from the link or an event handler, such as:
 *  <a href="javascript:functionName ....
 *  <a href="#" onclick="functionName ....
 *  <a class="X ....
 *  Setting this option to "true" - BREAKS LINK - unless URL is in href
 *
 * The link regular expression logic (case-insensitive) is as follows:
 *   any or no character  ~  followed by
 *   window.open(' or window.open("  ~  followed by
 *   http:// or https:// or not  ~  followed by
 *   www. or not  ~  followed by
 *   any one or more letters, numbers, forward slashes or periods  ~  up to
 *   the first character that is a hash, question mark, quote or white-space
 *
 * Note: The link will be stripped of any GET variables or anchor hashes
 *  eg. page.html?var=val will become page.html
 *  page.html#top will become page.html
 *
 *  If the pop-up is attempting to open multiple windows the link will be the first.
 *  eg. window.open{"one.html","","");window.open{"two.html","",""); will become one.html
 *
 *  New functions with "window.open" removed from their content are appended to the body
 *  to over-ride any loaded during onload. - MAY BREAK LINK
 *
 *  nullify_all "true" will over-ride ALL scripted "open"s - MAY BREAK LINK
 *  This is not as defensive as turning off javascript. But it's close.
 *
 *  form_targets "true" prevents form result "_blank"s
 *
 *  *** There are some instances where the use of a pop-up is justified.
 *  eg. instructions for a multi-page form, maps, click for larger image, etc.
 *  This script can be customized by adding sites to the @exclude above
 *  or by setting various PREFERENCE OPTIONS to "false"
 */
 
(function(){
 
/* PREFERENCE OPTIONS */
var remove_href_popups = "true"; // <a href="javascript:window.open ....
var remove_event_popups = "true"; // <a href="#" onclick="window.open ....
var remove_target_popups = "true"; // <a .... target="_blank"
var remove_script_popups = "true"; // all "in-page" script pop-ups - MAY BREAK LINK
var nullify_all = "true"; // nullifies open in all scripts (external too) - MAY BREAK LINK
var form_targets = "true"; // for <form .. target="_blank"
/* END OF PREFERENCE OPTIONS */
 
var allLinks, thisLink, L_att_vals, L_attr;
var allScriptTags, target_string;
var allForms, thisForm, F_att_vals, F_attr;
 
var expression = /(.)*(window\.open\([\'|\"])(https?\:\/\/)?(www\.)?([-_A-Z0-9\/\.]+[^#|?|\'|\"|\s])*/gi;
 
allLinks = document.evaluate(
      '//a',
      document,
      null,
      XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
      null
      );
  for (var i = 0; i < allLinks.snapshotLength; i++)
  {
    thisLink = allLinks.snapshotItem(i);
    L_att_vals = thisLink.attributes;
    for (var j = 0; j < L_att_vals.length; j++)
    {
      L_attr = L_att_vals[j].value;
        if((L_att_vals[j].name == "href") && L_attr.match(expression) && (remove_href_popups == "true"))
      {
        thisLink.setAttribute("href", RegExp.$3 + RegExp.$4 + RegExp.$5);
      }
        if((L_att_vals[j].name != "href") && L_attr.match(expression) && (remove_event_popups == "true"))
      {
        thisLink.setAttribute("href", RegExp.$3 + RegExp.$4 + RegExp.$5);
        thisLink.setAttribute(L_att_vals[j].name, "");
      }
        if((L_att_vals[j].name == "target") && L_attr.match(/_blank/gi) && (remove_target_popups == "true"))
      {
        thisLink.setAttribute(L_att_vals[j].name, "_self");
      }
 
    }
  }
 
if(remove_script_popups == "true")
{
allScriptTags = document.evaluate(
      '//script',
      document,
      null,
      XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
      null
      );
  for (var k = 0; k < allScriptTags.snapshotLength; k++)
  {
    target_string = allScriptTags.snapshotItem(k).innerHTML;
    if(target_string.match(/window\.open/gi))
    {  
      target_string = target_string.replace(/window\.open/gi, "");  
      var new_script_tag = document.createElement('script');
      new_script_tag.setAttribute("type","text/javascript");
      new_script_tag.innerHTML = target_string;
      document.body.appendChild(new_script_tag);
    }
  }
}
 
if(nullify_all == "true")
{
  var nulling_script_tag = document.createElement('script');
  nulling_script_tag.setAttribute("type","text/javascript");
  nulling_script_tag.innerHTML = "open = null;"
  document.body.appendChild(nulling_script_tag);
}
 
if(form_targets == "true")
{
allForms = document.evaluate(
      '//form',
      document,
      null,
      XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
      null
      );
  for (var m = 0; m < allForms.snapshotLength; m++)
  {
    thisForm = allForms.snapshotItem(m);
    F_att_vals = thisForm.attributes;
    for (var n = 0; n < F_att_vals.length; n++)
    {
      F_attr = F_att_vals[n].value;
      if((F_att_vals[n].name == "target") && F_attr.match(/_blank/gi))
      {
        thisForm.setAttribute(F_att_vals[n].name, "_self");
      }
    }
  }
}
 
})();
nopopuplinks.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