home *** CD-ROM | disk | FTP | other *** search
/ Clickx 65 / Clickx 65.iso / software / internet / xmarks / xmarks-3.1.1.xpi / chrome / content / foxmarks-pwsanitizeoverlay.js < prev    next >
Encoding:
Text File  |  2009-05-05  |  818 b   |  27 lines

  1. /*
  2.  Copyright 2007-2008 Foxmarks Inc.
  3.  
  4.  foxmarks-pwsanitizeoverlay.js: component that tells password that it
  5.  needs to check for changes.
  6.  
  7.  */
  8.  
  9. window.addEventListener("unload",
  10.     function(){
  11.         var checklist = document.getElementsByTagName("checkbox");
  12.         var ctr = checklist.length;
  13.         while(ctr--){
  14.             var el = checklist[ctr];
  15.             var prefname = el.getAttribute('preference');
  16.             if(el.checked && prefname=="privacy.item.passwords"){
  17.                 var lm = Date.now();
  18.                 var os = Components.classes["@mozilla.org/observer-service;1"]
  19.                     .getService(Components.interfaces.nsIObserverService);
  20.                 os.notifyObservers(null, "foxmarks-checkforpasswordchange", 
  21.                     lm);
  22.             }
  23.         }
  24.     }, 
  25.     false);
  26.  
  27.