Changeset 624

Show
Ignore:
Timestamp:
01/19/08 14:09:23 (11 months ago)
Author:
boo..@youngpup.net
Message:

Merge [619] to trunk: Implements a forced autoupdater.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/components/greasemonkey.js

    r605 r624  
    1818 
    1919  browserWindows: [], 
     20  updater: null, 
    2021 
    2122 
     
    7980      this.injectScripts(scripts, href, unsafeWin, chromeWin); 
    8081    } 
     82 
     83    // Need to wait until well after startup for prefs store and extension 
     84    // manager to be initialized. First page load is a convenient place. 
     85    if (!this.updater) { 
     86      // Note: the param to this has to match the extension ID in install.rdf 
     87      this.updater = new ExtensionUpdater( 
     88          "{e4a8a97b-f2ed-450b-b12d-ee082ba24781}"); 
     89      this.updater.updatePeriodically(); 
     90    } 
    8191  }, 
    8292 
     
    114124      .getService(Ci.mozIJSSubScriptLoader) 
    115125      .loadSubScript("chrome://greasemonkey/content/xmlhttprequester.js"); 
     126 
     127    Cc["@mozilla.org/moz/jssubscript-loader;1"] 
     128      .getService(Ci.mozIJSSubScriptLoader) 
     129      .loadSubScript("chrome://greasemonkey/content/updater.js"); 
    116130 
    117131    //loggify(this, "GM_GreasemonkeyService");