home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2004 September / APC0409D1.iso / f_looks / files / adblock-0.5-dev.xpi / chrome / adblock.jar / content / em-override.xul < prev    next >
Encoding:
Extensible Markup Language  |  2004-06-27  |  1.3 KB  |  38 lines

  1. <?xml version="1.0"?>
  2.  
  3. <overlay id="adblock-em-override-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  4.  
  5.     <script>
  6.         <![CDATA[
  7.             function adblockEMLoad() {
  8.                 window.removeEventListener("load", adblockEMLoad, true);
  9.                 
  10.                 // maybe something will change in a future-build, breaking this
  11.                 try {
  12.                     var adblockEntry = document.getElementById("urn:mozilla:extension:{34274bf4-1d97-a289-e984-17e546307e4f}");
  13.                     var versionString = adblockEntry.getAttribute("version");
  14.                     
  15.                     var versionStringMod = "v.5  d2  *  nightly 39";
  16.                     /*
  17.                     var versionStringMod = versionString
  18.                         // ex: 0.5023902 -> v.5  d2  *  nightly 39 pass2   [Note: pass01 is suppressed, per display]
  19.                             .replace(/^0?(\d{0,}\.\d)/, "v$1  ")                
  20.                             .replace(/0?(\d{1,2})(\d{4})$/, "d$1  *  $2")        
  21.                             .replace(/0?(\d{1,2})(\d{2})$/, "nightly $1 $2")        
  22.                             .replace(/01$/, " ")
  23.                             .replace(/0?([1-9]+)$/, "pass$1")
  24.                             .replace(/\s*$/, "");
  25.                     */
  26.                     
  27.                     adblockEntry.setAttribute("version", versionStringMod);
  28.                     var versionLabel = document.getAnonymousElementByAttribute(adblockEntry, "class", "extension-item-version");
  29.                     versionLabel.value = versionStringMod;
  30.                  }
  31.                  catch(e) {throw("adblockEMLoad: "+e);}
  32.              }
  33.             
  34.             window.addEventListener("load", adblockEMLoad, true);
  35.         ]]>
  36.     </script>
  37.  
  38. </overlay>