[Pkg-mozext-commits] [greasemonkey] 02/07: Switch from resource: to chrome: for JSM.

David Prévot taffit at moszumanska.debian.org
Sat Jul 11 22:49:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository greasemonkey.

commit 3e6acc7fc45ce143fdf0a5ab6cd4817f10b0a92f
Author: Anthony Lieuallen <arantius at gmail.com>
Date:   Fri May 29 11:16:02 2015 -0400

    Switch from resource: to chrome: for JSM.
    
    Content can see resource: but not chrome: URLs.  And chrome: works fine for JSM import.
    
    Fixes #1787
---
 chrome.manifest                         |  2 +-
 components/greasemonkey.js              | 14 +++---
 content/addons4-overlay.js              |  6 +--
 content/addons4.xul                     |  2 +-
 content/bindings.xml                    |  2 +-
 content/browser.js                      |  8 ++--
 content/config.js                       | 14 +++---
 content/framescript.js                  | 14 +++---
 content/install.js                      |  4 +-
 content/menucommander.js                |  2 +-
 content/newscript.js                    | 10 ++--
 content/options.js                      |  4 +-
 content/scratchpad-overlay.js           |  2 +-
 content/scriptprefs.js                  |  2 +-
 modules/GM_notification.js              |  4 +-
 modules/addons4.js                      |  6 +--
 modules/installPolicy.js                |  2 +-
 modules/ipcscript.js                    |  4 +-
 modules/menucommand.js                  |  2 +-
 modules/miscapis.js                     |  6 +--
 modules/parseScript.js                  | 14 +++---
 modules/remoteScript.js                 | 12 ++---
 modules/sandbox.js                      | 12 ++---
 modules/script.js                       | 34 ++++++-------
 modules/scriptDependency.js             |  2 +-
 modules/scriptIcon.js                   |  4 +-
 modules/scriptProtocol.js               |  2 +-
 modules/scriptRequire.js                |  4 +-
 modules/scriptResource.js               |  4 +-
 modules/stats.js                        | 10 ++--
 modules/storageBack.js                  |  6 +--
 modules/storageFront.js                 |  6 +--
 modules/sync.js                         | 10 ++--
 modules/third-party/MatchPattern.js     |  4 +-
 modules/third-party/convert2RegExp.js   |  2 +-
 modules/util.js                         | 84 ++++++++++++++++-----------------
 modules/util/alert.js                   |  2 +-
 modules/util/enqueueRemoveFile.js       |  2 +-
 modules/util/getBestLocaleMatch.js      |  2 +-
 modules/util/getBinaryContents.js       |  2 +-
 modules/util/getContents.js             |  2 +-
 modules/util/getEditor.js               |  4 +-
 modules/util/getEnabled.js              |  2 +-
 modules/util/getPreferredLocale.js      |  2 +-
 modules/util/getTempDir.js              |  2 +-
 modules/util/getTempFile.js             |  2 +-
 modules/util/installScriptFromSource.js |  8 ++--
 modules/util/isGreasemonkeyable.js      |  2 +-
 modules/util/newUserScript.js           |  2 +-
 modules/util/openInEditor.js            |  4 +-
 modules/util/scriptDir.js               |  4 +-
 modules/util/setEditor.js               |  4 +-
 modules/util/setEnabled.js              |  2 +-
 modules/util/sha1.js                    |  2 +-
 modules/util/showInstallDialog.js       |  4 +-
 modules/util/sniffGrants.js             |  2 +-
 modules/util/uriFromUrl.js              |  2 +-
 modules/util/windowId.js                |  2 +-
 modules/util/windowIdForEvent.js        |  2 +-
 modules/util/windowIsClosed.js          |  2 +-
 modules/util/writeToFile.js             |  2 +-
 modules/xmlhttprequester.js             |  2 +-
 util.sh                                 |  3 +-
 63 files changed, 195 insertions(+), 196 deletions(-)

diff --git a/chrome.manifest b/chrome.manifest
index 4218e0e..c2b650e 100644
--- a/chrome.manifest
+++ b/chrome.manifest
@@ -8,7 +8,7 @@ skin       greasemonkey classic/1.0 skin/
 overlay	   chrome://browser/content/browser.xul chrome://greasemonkey/content/browser.xul
 style      chrome://global/content/customizeToolbar.xul chrome://greasemonkey/skin/browser.css
 
-resource   greasemonkey modules/
+content    greasemonkey-modules modules/
 overlay	   chrome://browser/content/browser.xul chrome://greasemonkey/content/addons4.xul
 overlay    about:addons chrome://greasemonkey/content/addons4-overlay.xul
 
diff --git a/components/greasemonkey.js b/components/greasemonkey.js
index fe6146c..9d39473 100644
--- a/components/greasemonkey.js
+++ b/components/greasemonkey.js
@@ -8,12 +8,12 @@ var Cc = Components.classes;
 var Ci = Components.interfaces;
 var Cu = Components.utils;
 
-Cu.import("resource://greasemonkey/ipcscript.js");
-Cu.import("resource://greasemonkey/menucommand.js");
-Cu.import("resource://greasemonkey/prefmanager.js");
-Cu.import("resource://greasemonkey/storageBack.js");
-Cu.import("resource://greasemonkey/sync.js");
-Cu.import("resource://greasemonkey/util.js");
+Cu.import("chrome://greasemonkey-modules/content/ipcscript.js");
+Cu.import("chrome://greasemonkey-modules/content/menucommand.js");
+Cu.import("chrome://greasemonkey-modules/content/prefmanager.js");
+Cu.import("chrome://greasemonkey-modules/content/storageBack.js");
+Cu.import("chrome://greasemonkey-modules/content/sync.js");
+Cu.import("chrome://greasemonkey-modules/content/util.js");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
@@ -87,7 +87,7 @@ function startup(aService) {
   Services.obs.addObserver(aService, 'quit-application', false);
 
   // Import this once, early, so that enqueued deletes can happen.
-  Cu.import("resource://greasemonkey/util/enqueueRemoveFile.js");
+  Cu.import("chrome://greasemonkey-modules/content/util/enqueueRemoveFile.js");
 }
 
 /////////////////////////////////// Service ////////////////////////////////////
diff --git a/content/addons4-overlay.js b/content/addons4-overlay.js
index c958bed..501e78e 100644
--- a/content/addons4-overlay.js
+++ b/content/addons4-overlay.js
@@ -3,9 +3,9 @@
 // opposed to addons4.jsm which is responsible for what the API does handle.)
 (function private_scope() {
 Components.utils.import("resource://gre/modules/AddonManager.jsm");
-Components.utils.import("resource://greasemonkey/addons4.js");
-Components.utils.import('resource://greasemonkey/third-party/droppedUrls.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import("chrome://greasemonkey-modules/content/addons4.js");
+Components.utils.import('chrome://greasemonkey-modules/content/third-party/droppedUrls.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 var userScriptViewId = 'addons://list/greasemonkey-user-script';
 
diff --git a/content/addons4.xul b/content/addons4.xul
index fb84c00..ecc5400 100755
--- a/content/addons4.xul
+++ b/content/addons4.xul
@@ -6,7 +6,7 @@
 <script type="application/x-javascript"><![CDATA[
 window.addEventListener('load', function() {
 var addons = {};
-Components.utils.import("resource://greasemonkey/addons4.js", addons);
+Components.utils.import("chrome://greasemonkey-modules/content/addons4.js", addons);
 addons.GM_addonsStartup();
 }, true);
 
diff --git a/content/bindings.xml b/content/bindings.xml
index 5fe695c..a8c738f 100644
--- a/content/bindings.xml
+++ b/content/bindings.xml
@@ -11,7 +11,7 @@
     </content>
     <implementation>
       <constructor>
-        Components.utils.import('resource://greasemonkey/third-party/MatchPattern.js');
+        Components.utils.import('chrome://greasemonkey-modules/content/third-party/MatchPattern.js');
 
         this._stringBundle = Components
             .classes["@mozilla.org/intl/stringbundle;1"]
diff --git a/content/browser.js b/content/browser.js
index 6fc341e..add0da1 100644
--- a/content/browser.js
+++ b/content/browser.js
@@ -1,6 +1,6 @@
 Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import('resource://greasemonkey/prefmanager.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 // this file is the JavaScript backing for the UI wrangling which happens in
 // browser.xul. It also initializes the Greasemonkey singleton which contains
@@ -52,7 +52,7 @@ GM_BrowserUI.chromeLoad = function(e) {
   GM_BrowserUI.showToolbarButton();
 
   // Make sure this is imported at least once, so its internal timer starts.
-  Components.utils.import('resource://greasemonkey/stats.js');
+  Components.utils.import('chrome://greasemonkey-modules/content/stats.js');
 };
 
 /**
@@ -156,7 +156,7 @@ GM_BrowserUI.viewContextItemClicked = function() {
   if (!uri) return;
 
   var scope = {};
-  Components.utils.import('resource://greasemonkey/remoteScript.js', scope);
+  Components.utils.import('chrome://greasemonkey-modules/content/remoteScript.js', scope);
   var rs = new scope.RemoteScript(uri.spec);
   rs.downloadScript(function(aSuccess) {
     if (aSuccess) {
diff --git a/content/config.js b/content/config.js
index 6b19aeb..4c4da14 100644
--- a/content/config.js
+++ b/content/config.js
@@ -1,9 +1,9 @@
-Components.utils.import('resource://greasemonkey/constants.js');
-Components.utils.import('resource://greasemonkey/miscapis.js');
-Components.utils.import('resource://greasemonkey/prefmanager.js');
-Components.utils.import('resource://greasemonkey/script.js');
-Components.utils.import('resource://greasemonkey/third-party/MatchPattern.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/constants.js');
+Components.utils.import('chrome://greasemonkey-modules/content/miscapis.js');
+Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
+Components.utils.import('chrome://greasemonkey-modules/content/script.js');
+Components.utils.import('chrome://greasemonkey-modules/content/third-party/MatchPattern.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 function Config() {
   this._saveTimer = null;
@@ -235,7 +235,7 @@ Config.prototype.updateModifiedScripts = function(
   for (var i = 0, script; script = scripts[i]; i++) {
     if (0 == script.pendingExec.length) {
       var scope = {};
-      Components.utils.import('resource://greasemonkey/parseScript.js', scope);
+      Components.utils.import('chrome://greasemonkey-modules/content/parseScript.js', scope);
       var parsedScript = scope.parse(
           script.textContent, GM_util.uriFromUrl(script.downloadURL));
       // TODO: Show PopupNotifications about parse error(s)?
diff --git a/content/framescript.js b/content/framescript.js
index 2687e9f..bfaeac1 100644
--- a/content/framescript.js
+++ b/content/framescript.js
@@ -8,13 +8,13 @@ var Cu = Components.utils;
 Cu.import('resource://gre/modules/Services.jsm');
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
 
-Cu.import('resource://greasemonkey/GM_setClipboard.js');
-Cu.import('resource://greasemonkey/installPolicy.js');
-Cu.import('resource://greasemonkey/ipcscript.js');
-Cu.import('resource://greasemonkey/miscapis.js');
-Cu.import('resource://greasemonkey/sandbox.js');
-Cu.import('resource://greasemonkey/scriptProtocol.js');
-Cu.import('resource://greasemonkey/util.js');
+Cu.import('chrome://greasemonkey-modules/content/GM_setClipboard.js');
+Cu.import('chrome://greasemonkey-modules/content/installPolicy.js');
+Cu.import('chrome://greasemonkey-modules/content/ipcscript.js');
+Cu.import('chrome://greasemonkey-modules/content/miscapis.js');
+Cu.import('chrome://greasemonkey-modules/content/sandbox.js');
+Cu.import('chrome://greasemonkey-modules/content/scriptProtocol.js');
+Cu.import('chrome://greasemonkey-modules/content/util.js');
 
 // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ // \\ //
 
diff --git a/content/install.js b/content/install.js
index ead9141..6174503 100644
--- a/content/install.js
+++ b/content/install.js
@@ -1,5 +1,5 @@
-Components.utils.import('resource://greasemonkey/prefmanager.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 var gRemoteScript = window.arguments[0].wrappedJSObject[0];
 var gBrowser = window.arguments[0].wrappedJSObject[1];
diff --git a/content/menucommander.js b/content/menucommander.js
index 5e38cf7..f01f7d6 100644
--- a/content/menucommander.js
+++ b/content/menucommander.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 var GM_MenuCommander = {
   menuCommands: {}
diff --git a/content/newscript.js b/content/newscript.js
index b8b662a..173a888 100644
--- a/content/newscript.js
+++ b/content/newscript.js
@@ -1,7 +1,7 @@
-Components.utils.import("resource://greasemonkey/extractMeta.js");
-Components.utils.import('resource://greasemonkey/parseScript.js');
-Components.utils.import('resource://greasemonkey/prefmanager.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import("chrome://greasemonkey-modules/content/extractMeta.js");
+Components.utils.import('chrome://greasemonkey-modules/content/parseScript.js');
+Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 /////////////////////////////// global variables ///////////////////////////////
 
@@ -39,7 +39,7 @@ function doInstall() {
 
   // Create a script object with parsed metadata, and ...
   var scope = {};
-  Components.utils.import('resource://greasemonkey/parseScript.js', scope);
+  Components.utils.import('chrome://greasemonkey-modules/content/parseScript.js', scope);
   var script = scope.parse(scriptSrc);
   // ... make sure entered details will not ruin an existing file.
   if (config.installIsUpdate(script)) {
diff --git a/content/options.js b/content/options.js
index 700a7b4..3505fdc 100644
--- a/content/options.js
+++ b/content/options.js
@@ -1,5 +1,5 @@
-Components.utils.import('resource://greasemonkey/prefmanager.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 function GM_loadOptions() {
   document.getElementById('check-sync')
diff --git a/content/scratchpad-overlay.js b/content/scratchpad-overlay.js
index ca6cac6..0dea605 100644
--- a/content/scratchpad-overlay.js
+++ b/content/scratchpad-overlay.js
@@ -8,7 +8,7 @@ window.addEventListener('load', function() {
   if (!args.filename) return;
   if (!args.filename.match(/\.user\.js$/)) return;
 
-  Components.utils.import('resource://greasemonkey/util.js');
+  Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
   // If we're opening a user script:
   // Put the cursor at the top.  Workaround for #1708 ; remove when
diff --git a/content/scriptprefs.js b/content/scriptprefs.js
index 7b03b52..1777f43 100644
--- a/content/scriptprefs.js
+++ b/content/scriptprefs.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/util.js'); // ref'd in XUL
+Components.utils.import('chrome://greasemonkey-modules/content/util.js'); // ref'd in XUL
 
 var gScriptId = decodeURIComponent(location.hash.substring(1));
 var gScript = GM_util.getService().config.getMatchingScripts(function(script) {
diff --git a/modules/GM_notification.js b/modules/GM_notification.js
index 341d769..de15e51 100644
--- a/modules/GM_notification.js
+++ b/modules/GM_notification.js
@@ -1,6 +1,6 @@
 Components.utils.import("resource://gre/modules/PopupNotifications.jsm");
-Components.utils.import("resource://greasemonkey/prefmanager.js");
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import("chrome://greasemonkey-modules/content/prefmanager.js");
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 var EXPORTED_SYMBOLS = ["GM_notification"];
 
diff --git a/modules/addons4.js b/modules/addons4.js
index 24e0319..503bc46 100755
--- a/modules/addons4.js
+++ b/modules/addons4.js
@@ -18,9 +18,9 @@ var EXPORTED_SYMBOLS = [
 Components.utils.import('resource://gre/modules/AddonManager.jsm');
 Components.utils.import('resource://gre/modules/Services.jsm');
 Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
-Components.utils.import('resource://greasemonkey/prefmanager.js');
-Components.utils.import('resource://greasemonkey/remoteScript.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
+Components.utils.import('chrome://greasemonkey-modules/content/remoteScript.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
diff --git a/modules/installPolicy.js b/modules/installPolicy.js
index dcb5619..aad86e0 100644
--- a/modules/installPolicy.js
+++ b/modules/installPolicy.js
@@ -11,7 +11,7 @@ var Cr = Components.results;
 Cu.import('resource://gre/modules/Services.jsm');
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
 
-Cu.import('resource://greasemonkey/util.js');
+Cu.import('chrome://greasemonkey-modules/content/util.js');
 
 var gHaveDoneInit = false;
 var gIgnoreNextScript = false;
diff --git a/modules/ipcscript.js b/modules/ipcscript.js
index 6685184..91f8cbc 100644
--- a/modules/ipcscript.js
+++ b/modules/ipcscript.js
@@ -1,7 +1,7 @@
 var EXPORTED_SYMBOLS = ['IPCScript'];
 
-Components.utils.import("resource://greasemonkey/extractMeta.js");
-Components.utils.import("resource://greasemonkey/util.js");
+Components.utils.import("chrome://greasemonkey-modules/content/extractMeta.js");
+Components.utils.import("chrome://greasemonkey-modules/content/util.js");
 
 function IPCScript(aScript, addonVersion) {
   this.addonVersion = addonVersion;
diff --git a/modules/menucommand.js b/modules/menucommand.js
index d7311c7..8463575 100644
--- a/modules/menucommand.js
+++ b/modules/menucommand.js
@@ -1,7 +1,7 @@
 var EXPORTED_SYMBOLS = ['registerMenuCommand'];
 
 Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 var gMenuCommands = [];
 var gStringBundle = Services.strings.createBundle(
diff --git a/modules/miscapis.js b/modules/miscapis.js
index 16f4d6b..a925edd 100644
--- a/modules/miscapis.js
+++ b/modules/miscapis.js
@@ -2,9 +2,9 @@ var Cu = Components.utils;
 
 Cu.import("resource://gre/modules/Services.jsm");
 
-Cu.import("resource://greasemonkey/third-party/getChromeWinForContentWin.js");
-Cu.import('resource://greasemonkey/prefmanager.js');
-Cu.import("resource://greasemonkey/util.js");
+Cu.import("chrome://greasemonkey-modules/content/third-party/getChromeWinForContentWin.js");
+Cu.import('chrome://greasemonkey-modules/content/prefmanager.js');
+Cu.import("chrome://greasemonkey-modules/content/util.js");
 
 
 var EXPORTED_SYMBOLS = [
diff --git a/modules/parseScript.js b/modules/parseScript.js
index 27cf52c..f93c029 100644
--- a/modules/parseScript.js
+++ b/modules/parseScript.js
@@ -1,12 +1,12 @@
 var EXPORTED_SYMBOLS = ['parse'];
 
-Components.utils.import('resource://greasemonkey/extractMeta.js');
-Components.utils.import('resource://greasemonkey/script.js');
-Components.utils.import('resource://greasemonkey/scriptIcon.js');
-Components.utils.import('resource://greasemonkey/scriptRequire.js');
-Components.utils.import('resource://greasemonkey/scriptResource.js');
-Components.utils.import('resource://greasemonkey/third-party/MatchPattern.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/extractMeta.js');
+Components.utils.import('chrome://greasemonkey-modules/content/script.js');
+Components.utils.import('chrome://greasemonkey-modules/content/scriptIcon.js');
+Components.utils.import('chrome://greasemonkey-modules/content/scriptRequire.js');
+Components.utils.import('chrome://greasemonkey-modules/content/scriptResource.js');
+Components.utils.import('chrome://greasemonkey-modules/content/third-party/MatchPattern.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 var gIoService = Components.classes["@mozilla.org/network/io-service;1"]
     .getService(Components.interfaces.nsIIOService);
diff --git a/modules/remoteScript.js b/modules/remoteScript.js
index f941998..628629b 100644
--- a/modules/remoteScript.js
+++ b/modules/remoteScript.js
@@ -3,11 +3,11 @@ var EXPORTED_SYMBOLS = ['cleanFilename', 'RemoteScript'];
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 
-Components.utils.import("resource://greasemonkey/GM_notification.js");
-Components.utils.import('resource://greasemonkey/addons4.js');
-Components.utils.import('resource://greasemonkey/script.js');
-Components.utils.import('resource://greasemonkey/scriptIcon.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import("chrome://greasemonkey-modules/content/GM_notification.js");
+Components.utils.import('chrome://greasemonkey-modules/content/addons4.js');
+Components.utils.import('chrome://greasemonkey-modules/content/script.js');
+Components.utils.import('chrome://greasemonkey-modules/content/scriptIcon.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 
@@ -407,7 +407,7 @@ RemoteScript.prototype.parseScript = function(aSource, aFatal) {
   if (this.script) return true;
 
   var scope = {};
-  Components.utils.import('resource://greasemonkey/parseScript.js', scope);
+  Components.utils.import('chrome://greasemonkey-modules/content/parseScript.js', scope);
   var script = scope.parse(aSource, this._uri, true, aFatal);
   if (!script || script.parseErrors.length) {
     if (aFatal) {
diff --git a/modules/sandbox.js b/modules/sandbox.js
index 0618976..5ad838f 100644
--- a/modules/sandbox.js
+++ b/modules/sandbox.js
@@ -4,12 +4,12 @@ var Cu = Components.utils;
 var Ci = Components.interfaces;
 var Cc = Components.classes;
 
-Cu.import('resource://greasemonkey/GM_setClipboard.js');
-Cu.import("resource://greasemonkey/menucommand.js");
-Cu.import("resource://greasemonkey/miscapis.js");
-Cu.import("resource://greasemonkey/storageFront.js");
-Cu.import("resource://greasemonkey/util.js");
-Cu.import("resource://greasemonkey/xmlhttprequester.js");
+Cu.import('chrome://greasemonkey-modules/content/GM_setClipboard.js');
+Cu.import("chrome://greasemonkey-modules/content/menucommand.js");
+Cu.import("chrome://greasemonkey-modules/content/miscapis.js");
+Cu.import("chrome://greasemonkey-modules/content/storageFront.js");
+Cu.import("chrome://greasemonkey-modules/content/util.js");
+Cu.import("chrome://greasemonkey-modules/content/xmlhttprequester.js");
 
 var gStringBundle = Cc["@mozilla.org/intl/stringbundle;1"]
     .getService(Ci.nsIStringBundleService)
diff --git a/modules/script.js b/modules/script.js
index 6b3894d..4b90b32 100644
--- a/modules/script.js
+++ b/modules/script.js
@@ -1,19 +1,19 @@
 var EXPORTED_SYMBOLS = ['Script'];
 
-Components.utils.import('resource://greasemonkey/GM_notification.js');
-Components.utils.import('resource://greasemonkey/constants.js');
-Components.utils.import('resource://greasemonkey/extractMeta.js');
-Components.utils.import('resource://greasemonkey/ipcscript.js');
-Components.utils.import('resource://greasemonkey/miscapis.js');
-Components.utils.import("resource://greasemonkey/parseScript.js");
-Components.utils.import('resource://greasemonkey/prefmanager.js');
-Components.utils.import('resource://greasemonkey/scriptIcon.js');
-Components.utils.import('resource://greasemonkey/scriptRequire.js');
-Components.utils.import('resource://greasemonkey/scriptResource.js');
-Components.utils.import("resource://greasemonkey/storageBack.js");
-Components.utils.import('resource://greasemonkey/third-party/MatchPattern.js');
-Components.utils.import('resource://greasemonkey/third-party/convert2RegExp.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/GM_notification.js');
+Components.utils.import('chrome://greasemonkey-modules/content/constants.js');
+Components.utils.import('chrome://greasemonkey-modules/content/extractMeta.js');
+Components.utils.import('chrome://greasemonkey-modules/content/ipcscript.js');
+Components.utils.import('chrome://greasemonkey-modules/content/miscapis.js');
+Components.utils.import("chrome://greasemonkey-modules/content/parseScript.js");
+Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
+Components.utils.import('chrome://greasemonkey-modules/content/scriptIcon.js');
+Components.utils.import('chrome://greasemonkey-modules/content/scriptRequire.js');
+Components.utils.import('chrome://greasemonkey-modules/content/scriptResource.js');
+Components.utils.import("chrome://greasemonkey-modules/content/storageBack.js");
+Components.utils.import('chrome://greasemonkey-modules/content/third-party/MatchPattern.js');
+Components.utils.import('chrome://greasemonkey-modules/content/third-party/convert2RegExp.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 var stringBundle = Components
     .classes["@mozilla.org/intl/stringbundle;1"]
@@ -332,7 +332,7 @@ Script.prototype._loadFromConfigNode = function(node) {
       || !node.hasAttribute("version")
   ) {
     var scope = {};
-    Components.utils.import('resource://greasemonkey/parseScript.js', scope);
+    Components.utils.import('chrome://greasemonkey-modules/content/parseScript.js', scope);
     var parsedScript = scope.parse(
         this.textContent, GM_util.uriFromUrl(this.downloadURL));
 
@@ -682,7 +682,7 @@ Script.prototype.updateFromNewScript = function(newScript, url, windowId, browse
 
     // Re-download dependencies.
     var scope = {};
-    Components.utils.import('resource://greasemonkey/remoteScript.js', scope);
+    Components.utils.import('chrome://greasemonkey-modules/content/remoteScript.js', scope);
     var rs = new scope.RemoteScript(this.downloadURL);
     newScript._basedir = this._basedir;
     rs.setScript(newScript);
@@ -856,7 +856,7 @@ Script.prototype.checkRemoteVersion = function(req, aCallback, aForced, aMeta) {
 
   var source = req.responseText;
   var scope = {};
-  Components.utils.import('resource://greasemonkey/parseScript.js', scope);
+  Components.utils.import('chrome://greasemonkey-modules/content/parseScript.js', scope);
   var newScript = scope.parse(source, this.downloadURL);
   var remoteVersion = newScript.version;
   if (!remoteVersion) {
diff --git a/modules/scriptDependency.js b/modules/scriptDependency.js
index ae75694..c72777a 100644
--- a/modules/scriptDependency.js
+++ b/modules/scriptDependency.js
@@ -1,6 +1,6 @@
 var EXPORTED_SYMBOLS = ['ScriptDependency'];
 
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 /** Base implementation for Icon, Require, Resource. */
 function ScriptDependency(aScript) {
diff --git a/modules/scriptIcon.js b/modules/scriptIcon.js
index f492b04..9715c7a 100644
--- a/modules/scriptIcon.js
+++ b/modules/scriptIcon.js
@@ -1,7 +1,7 @@
 var EXPORTED_SYMBOLS = ['ScriptIcon'];
 
-Components.utils.import('resource://greasemonkey/scriptDependency.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/scriptDependency.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 var stringBundle = Components
     .classes["@mozilla.org/intl/stringbundle;1"]
diff --git a/modules/scriptProtocol.js b/modules/scriptProtocol.js
index 5c7eb14..149ae35 100644
--- a/modules/scriptProtocol.js
+++ b/modules/scriptProtocol.js
@@ -1,7 +1,7 @@
 var EXPORTED_SYMBOLS = ['initScriptProtocol'];
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
diff --git a/modules/scriptRequire.js b/modules/scriptRequire.js
index 11d10ad..f439cf0 100644
--- a/modules/scriptRequire.js
+++ b/modules/scriptRequire.js
@@ -1,7 +1,7 @@
 var EXPORTED_SYMBOLS = ['ScriptRequire'];
 
-Components.utils.import('resource://greasemonkey/scriptDependency.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/scriptDependency.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 ScriptRequire.prototype = new ScriptDependency();
 ScriptRequire.prototype.constructor = ScriptRequire;
diff --git a/modules/scriptResource.js b/modules/scriptResource.js
index 8959747..2d7ada0 100644
--- a/modules/scriptResource.js
+++ b/modules/scriptResource.js
@@ -1,7 +1,7 @@
 var EXPORTED_SYMBOLS = ['ScriptResource'];
 
-Components.utils.import('resource://greasemonkey/scriptDependency.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/scriptDependency.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 ScriptResource.prototype = new ScriptDependency();
 ScriptResource.prototype.constructor = ScriptResource;
diff --git a/modules/stats.js b/modules/stats.js
index 6e9e1b0..041979f 100644
--- a/modules/stats.js
+++ b/modules/stats.js
@@ -9,11 +9,11 @@ the work to send data to the server.
 var EXPORTED_SYMBOLS = [];
 
 Components.utils.import('resource://services-common/utils.js');
-Components.utils.import('resource://greasemonkey/miscapis.js');
-Components.utils.import('resource://greasemonkey/parseScript.js');
-Components.utils.import('resource://greasemonkey/prefmanager.js');
-Components.utils.import("resource://greasemonkey/storageBack.js");
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/miscapis.js');
+Components.utils.import('chrome://greasemonkey-modules/content/parseScript.js');
+Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
+Components.utils.import("chrome://greasemonkey-modules/content/storageBack.js");
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 var gPrefMan = new GM_PrefManager();
 var gStringBundle = Components
diff --git a/modules/storageBack.js b/modules/storageBack.js
index 729b335..ca1cf10 100644
--- a/modules/storageBack.js
+++ b/modules/storageBack.js
@@ -5,9 +5,9 @@ var Cu = Components.utils;
 
 Cu.import("resource://gre/modules/Services.jsm");
 
-Cu.import("resource://greasemonkey/third-party/getChromeWinForContentWin.js");
-Cu.import('resource://greasemonkey/prefmanager.js');
-Cu.import("resource://greasemonkey/util.js");
+Cu.import("chrome://greasemonkey-modules/content/third-party/getChromeWinForContentWin.js");
+Cu.import('chrome://greasemonkey-modules/content/prefmanager.js');
+Cu.import("chrome://greasemonkey-modules/content/util.js");
 
 
 var EXPORTED_SYMBOLS = ['GM_ScriptStorageBack'];
diff --git a/modules/storageFront.js b/modules/storageFront.js
index cedb896..16d7c96 100644
--- a/modules/storageFront.js
+++ b/modules/storageFront.js
@@ -5,9 +5,9 @@ var Cu = Components.utils;
 
 Cu.import("resource://gre/modules/Services.jsm");
 
-Cu.import("resource://greasemonkey/third-party/getChromeWinForContentWin.js");
-Cu.import('resource://greasemonkey/prefmanager.js');
-Cu.import("resource://greasemonkey/util.js");
+Cu.import("chrome://greasemonkey-modules/content/third-party/getChromeWinForContentWin.js");
+Cu.import('chrome://greasemonkey-modules/content/prefmanager.js');
+Cu.import("chrome://greasemonkey-modules/content/util.js");
 
 
 var EXPORTED_SYMBOLS = ['GM_ScriptStorageFront'];
diff --git a/modules/sync.js b/modules/sync.js
index 4b4ef9f..a39a9ed 100644
--- a/modules/sync.js
+++ b/modules/sync.js
@@ -8,10 +8,10 @@ var Cu = Components.utils;
 Cu.import('resource://gre/modules/Services.jsm');
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
 Cu.import('resource://services-crypto/utils.js');
-Cu.import("resource://greasemonkey/miscapis.js");
-Cu.import('resource://greasemonkey/prefmanager.js');
-Cu.import("resource://greasemonkey/storageBack.js");
-Cu.import('resource://greasemonkey/util.js');
+Cu.import("chrome://greasemonkey-modules/content/miscapis.js");
+Cu.import('chrome://greasemonkey-modules/content/prefmanager.js');
+Cu.import("chrome://greasemonkey-modules/content/storageBack.js");
+Cu.import('chrome://greasemonkey-modules/content/util.js');
 
 
 var gSyncInitialized = false;
@@ -37,7 +37,7 @@ var SyncServiceObserver = {
     gSyncInitialized = true;
 
     // This must be delayed until after the Greasemonkey service is set up.
-    Cu.import('resource://greasemonkey/remoteScript.js');
+    Cu.import('chrome://greasemonkey-modules/content/remoteScript.js');
     // Also delay importing the actual Sync service to prevent conflicts with
     // the master password dialog during browser startup. See #1852.
     Cu.import('resource://services-sync/service.js', gWeave);
diff --git a/modules/third-party/MatchPattern.js b/modules/third-party/MatchPattern.js
index d2383e6..44af50d 100644
--- a/modules/third-party/MatchPattern.js
+++ b/modules/third-party/MatchPattern.js
@@ -40,8 +40,8 @@
 
 var EXPORTED_SYMBOLS = ['MatchPattern'];
 
-Components.utils.import("resource://greasemonkey/third-party/convert2RegExp.js");
-Components.utils.import("resource://greasemonkey/util.js");
+Components.utils.import("chrome://greasemonkey-modules/content/third-party/convert2RegExp.js");
+Components.utils.import("chrome://greasemonkey-modules/content/util.js");
 
 var validSchemes = ['http', 'https', 'ftp', 'file'];
 var REG_HOST = /^(?:\*\.)?[^*\/]+$|^\*$|^$/;
diff --git a/modules/third-party/convert2RegExp.js b/modules/third-party/convert2RegExp.js
index e6f2f9f..b07e42f 100644
--- a/modules/third-party/convert2RegExp.js
+++ b/modules/third-party/convert2RegExp.js
@@ -25,7 +25,7 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 var EXPORTED_SYMBOLS = ['GM_convert2RegExp'];
 var tldRegExp = /^([^:]+:\/\/[^\/]+)\.tld(\/.*)?$/;
diff --git a/modules/util.js b/modules/util.js
index b0eb88c..0cb821c 100644
--- a/modules/util.js
+++ b/modules/util.js
@@ -8,7 +8,7 @@ This "util" module separates all the methods into individual files, and lazily
 imports them automatically, the first time each method is called.  Simply import
 this top-level module:
 
-Components.utils.import("resource://greasemonkey/util.js");
+Components.utils.import("chrome://greasemonkey-modules/content/util.js");
 
 Then call one of its methods (e.g.):
 
@@ -23,44 +23,44 @@ module.
 var GM_util = {};
 
 // Do not edit below this line.  Use `util.sh` to auto-populate.
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'alert', 'resource://greasemonkey/util/alert.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'anonWrap', 'resource://greasemonkey/util/anonWrap.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'compareFirefoxVersion', 'resource://greasemonkey/util/compareFirefoxVersion.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'emptyEl', 'resource://greasemonkey/util/emptyEl.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'enqueueRemoveFile', 'resource://greasemonkey/util/enqueueRemoveFile.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'findMessageManager', 'resource://greasemonkey/util/findMessageManager.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'getBestLocaleMatch', 'resource://greasemonkey/util/getBestLocaleMatch.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'getBinaryContents', 'resource://greasemonkey/util/getBinaryContents.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'getBrowserWindow', 'resource://greasemonkey/util/getBrowserWindow.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'getContents', 'resource://greasemonkey/util/getContents.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'getEditor', 'resource://greasemonkey/util/getEditor.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'getEnabled', 'resource://greasemonkey/util/getEnabled.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'getPreferredLocale', 'resource://greasemonkey/util/getPreferredLocale.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'getScriptSource', 'resource://greasemonkey/util/getScriptSource.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'getService', 'resource://greasemonkey/util/getService.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'getTempDir', 'resource://greasemonkey/util/getTempDir.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'getTempFile', 'resource://greasemonkey/util/getTempFile.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'getUriFromFile', 'resource://greasemonkey/util/getUriFromFile.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'hitch', 'resource://greasemonkey/util/hitch.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'inArray', 'resource://greasemonkey/util/inArray.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'installScriptFromSource', 'resource://greasemonkey/util/installScriptFromSource.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'isGreasemonkeyable', 'resource://greasemonkey/util/isGreasemonkeyable.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'logError', 'resource://greasemonkey/util/logError.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'memoize', 'resource://greasemonkey/util/memoize.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'newUserScript', 'resource://greasemonkey/util/newUserScript.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'openInEditor', 'resource://greasemonkey/util/openInEditor.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'parseMetaLine', 'resource://greasemonkey/util/parseMetaLine.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'scriptDir', 'resource://greasemonkey/util/scriptDir.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'scriptMatchesUrlAndRuns', 'resource://greasemonkey/util/scriptMatchesUrlAndRuns.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'setEditor', 'resource://greasemonkey/util/setEditor.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'setEnabled', 'resource://greasemonkey/util/setEnabled.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'sha1', 'resource://greasemonkey/util/sha1.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'showInstallDialog', 'resource://greasemonkey/util/showInstallDialog.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'sniffGrants', 'resource://greasemonkey/util/sniffGrants.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'timeout', 'resource://greasemonkey/util/timeout.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'uriFromUrl', 'resource://greasemonkey/util/uriFromUrl.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'uuid', 'resource://greasemonkey/util/uuid.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'windowIdForEvent', 'resource://greasemonkey/util/windowIdForEvent.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'windowId', 'resource://greasemonkey/util/windowId.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'windowIsClosed', 'resource://greasemonkey/util/windowIsClosed.js');
-XPCOMUtils.defineLazyModuleGetter(GM_util, 'writeToFile', 'resource://greasemonkey/util/writeToFile.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'alert', 'chrome://greasemonkey-modules/content/util/alert.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'anonWrap', 'chrome://greasemonkey-modules/content/util/anonWrap.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'compareFirefoxVersion', 'chrome://greasemonkey-modules/content/util/compareFirefoxVersion.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'emptyEl', 'chrome://greasemonkey-modules/content/util/emptyEl.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'enqueueRemoveFile', 'chrome://greasemonkey-modules/content/util/enqueueRemoveFile.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'findMessageManager', 'chrome://greasemonkey-modules/content/util/findMessageManager.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'getBestLocaleMatch', 'chrome://greasemonkey-modules/content/util/getBestLocaleMatch.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'getBinaryContents', 'chrome://greasemonkey-modules/content/util/getBinaryContents.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'getBrowserWindow', 'chrome://greasemonkey-modules/content/util/getBrowserWindow.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'getContents', 'chrome://greasemonkey-modules/content/util/getContents.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'getEditor', 'chrome://greasemonkey-modules/content/util/getEditor.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'getEnabled', 'chrome://greasemonkey-modules/content/util/getEnabled.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'getPreferredLocale', 'chrome://greasemonkey-modules/content/util/getPreferredLocale.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'getScriptSource', 'chrome://greasemonkey-modules/content/util/getScriptSource.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'getService', 'chrome://greasemonkey-modules/content/util/getService.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'getTempDir', 'chrome://greasemonkey-modules/content/util/getTempDir.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'getTempFile', 'chrome://greasemonkey-modules/content/util/getTempFile.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'getUriFromFile', 'chrome://greasemonkey-modules/content/util/getUriFromFile.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'hitch', 'chrome://greasemonkey-modules/content/util/hitch.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'inArray', 'chrome://greasemonkey-modules/content/util/inArray.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'installScriptFromSource', 'chrome://greasemonkey-modules/content/util/installScriptFromSource.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'isGreasemonkeyable', 'chrome://greasemonkey-modules/content/util/isGreasemonkeyable.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'logError', 'chrome://greasemonkey-modules/content/util/logError.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'memoize', 'chrome://greasemonkey-modules/content/util/memoize.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'newUserScript', 'chrome://greasemonkey-modules/content/util/newUserScript.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'openInEditor', 'chrome://greasemonkey-modules/content/util/openInEditor.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'parseMetaLine', 'chrome://greasemonkey-modules/content/util/parseMetaLine.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'scriptDir', 'chrome://greasemonkey-modules/content/util/scriptDir.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'scriptMatchesUrlAndRuns', 'chrome://greasemonkey-modules/content/util/scriptMatchesUrlAndRuns.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'setEditor', 'chrome://greasemonkey-modules/content/util/setEditor.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'setEnabled', 'chrome://greasemonkey-modules/content/util/setEnabled.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'sha1', 'chrome://greasemonkey-modules/content/util/sha1.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'showInstallDialog', 'chrome://greasemonkey-modules/content/util/showInstallDialog.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'sniffGrants', 'chrome://greasemonkey-modules/content/util/sniffGrants.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'timeout', 'chrome://greasemonkey-modules/content/util/timeout.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'uriFromUrl', 'chrome://greasemonkey-modules/content/util/uriFromUrl.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'uuid', 'chrome://greasemonkey-modules/content/util/uuid.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'windowIdForEvent', 'chrome://greasemonkey-modules/content/util/windowIdForEvent.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'windowId', 'chrome://greasemonkey-modules/content/util/windowId.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'windowIsClosed', 'chrome://greasemonkey-modules/content/util/windowIsClosed.js');
+XPCOMUtils.defineLazyModuleGetter(GM_util, 'writeToFile', 'chrome://greasemonkey-modules/content/util/writeToFile.js');
diff --git a/modules/util/alert.js b/modules/util/alert.js
index 774b666..f0a873f 100644
--- a/modules/util/alert.js
+++ b/modules/util/alert.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 const EXPORTED_SYMBOLS = ['alert'];
 const promptService = Components
diff --git a/modules/util/enqueueRemoveFile.js b/modules/util/enqueueRemoveFile.js
index 8bc37fa..f09df5d 100644
--- a/modules/util/enqueueRemoveFile.js
+++ b/modules/util/enqueueRemoveFile.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/prefmanager.js');
+Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
 
 const EXPORTED_SYMBOLS = ['enqueueRemoveFile'];
 
diff --git a/modules/util/getBestLocaleMatch.js b/modules/util/getBestLocaleMatch.js
index c94f2bd..2ca83be 100644
--- a/modules/util/getBestLocaleMatch.js
+++ b/modules/util/getBestLocaleMatch.js
@@ -1,5 +1,5 @@
 Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 const EXPORTED_SYMBOLS = ['getBestLocaleMatch'];
 
diff --git a/modules/util/getBinaryContents.js b/modules/util/getBinaryContents.js
index 19cc322..b899290 100644
--- a/modules/util/getBinaryContents.js
+++ b/modules/util/getBinaryContents.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 const EXPORTED_SYMBOLS = ['getBinaryContents'];
 
diff --git a/modules/util/getContents.js b/modules/util/getContents.js
index 4922701..ce6f49d 100644
--- a/modules/util/getContents.js
+++ b/modules/util/getContents.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 const EXPORTED_SYMBOLS = ['getContents'];
 
diff --git a/modules/util/getEditor.js b/modules/util/getEditor.js
index 01832f0..2fcacf7 100644
--- a/modules/util/getEditor.js
+++ b/modules/util/getEditor.js
@@ -1,5 +1,5 @@
-Components.utils.import('resource://greasemonkey/prefmanager.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 var EXPORTED_SYMBOLS = ['getEditor'];
 
diff --git a/modules/util/getEnabled.js b/modules/util/getEnabled.js
index eb0a337..0bdaa9b 100644
--- a/modules/util/getEnabled.js
+++ b/modules/util/getEnabled.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/prefmanager.js');
+Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
 
 const EXPORTED_SYMBOLS = ['getEnabled'];
 
diff --git a/modules/util/getPreferredLocale.js b/modules/util/getPreferredLocale.js
index 4732cd4..b062b84 100644
--- a/modules/util/getPreferredLocale.js
+++ b/modules/util/getPreferredLocale.js
@@ -1,5 +1,5 @@
 Components.utils.import("resource://gre/modules/Services.jsm");
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 const EXPORTED_SYMBOLS = ['getPreferredLocale'];
 
diff --git a/modules/util/getTempDir.js b/modules/util/getTempDir.js
index 161f964..036a5bf 100644
--- a/modules/util/getTempDir.js
+++ b/modules/util/getTempDir.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/constants.js');
+Components.utils.import('chrome://greasemonkey-modules/content/constants.js');
 
 const EXPORTED_SYMBOLS = ['getTempDir'];
 
diff --git a/modules/util/getTempFile.js b/modules/util/getTempFile.js
index 631fff1..de9ca0c 100644
--- a/modules/util/getTempFile.js
+++ b/modules/util/getTempFile.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/constants.js');
+Components.utils.import('chrome://greasemonkey-modules/content/constants.js');
 
 const EXPORTED_SYMBOLS = ['getTempFile'];
 
diff --git a/modules/util/installScriptFromSource.js b/modules/util/installScriptFromSource.js
index 86f25ba..33fbeb2 100644
--- a/modules/util/installScriptFromSource.js
+++ b/modules/util/installScriptFromSource.js
@@ -1,7 +1,7 @@
-Components.utils.import('resource://greasemonkey/GM_notification.js');
-Components.utils.import('resource://greasemonkey/parseScript.js');
-Components.utils.import('resource://greasemonkey/remoteScript.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/GM_notification.js');
+Components.utils.import('chrome://greasemonkey-modules/content/parseScript.js');
+Components.utils.import('chrome://greasemonkey-modules/content/remoteScript.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 var EXPORTED_SYMBOLS = ['installScriptFromSource'];
 
diff --git a/modules/util/isGreasemonkeyable.js b/modules/util/isGreasemonkeyable.js
index 8d6930e..faf14e7 100644
--- a/modules/util/isGreasemonkeyable.js
+++ b/modules/util/isGreasemonkeyable.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/prefmanager.js');
+Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
 
 const EXPORTED_SYMBOLS = ['isGreasemonkeyable'];
 
diff --git a/modules/util/newUserScript.js b/modules/util/newUserScript.js
index a5d951e..63419c9 100644
--- a/modules/util/newUserScript.js
+++ b/modules/util/newUserScript.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 const EXPORTED_SYMBOLS = ['newUserScript'];
 
diff --git a/modules/util/openInEditor.js b/modules/util/openInEditor.js
index 7a25b7c..0e3d0be 100644
--- a/modules/util/openInEditor.js
+++ b/modules/util/openInEditor.js
@@ -1,6 +1,6 @@
 Components.utils.import("resource:///modules/devtools/scratchpad-manager.jsm");
-Components.utils.import('resource://greasemonkey/prefmanager.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 const EXPORTED_SYMBOLS = ['openInEditor'];
 
diff --git a/modules/util/scriptDir.js b/modules/util/scriptDir.js
index 67d164f..285bd59 100644
--- a/modules/util/scriptDir.js
+++ b/modules/util/scriptDir.js
@@ -1,5 +1,5 @@
-Components.utils.import('resource://greasemonkey/constants.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/constants.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 const EXPORTED_SYMBOLS = ['scriptDir'];
 
diff --git a/modules/util/setEditor.js b/modules/util/setEditor.js
index 3289468..8a5d63a 100644
--- a/modules/util/setEditor.js
+++ b/modules/util/setEditor.js
@@ -1,5 +1,5 @@
-Components.utils.import('resource://greasemonkey/prefmanager.js');
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 var EXPORTED_SYMBOLS = ['setEditor'];
 
diff --git a/modules/util/setEnabled.js b/modules/util/setEnabled.js
index 938d03d..6bfaba2 100644
--- a/modules/util/setEnabled.js
+++ b/modules/util/setEnabled.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/prefmanager.js');
+Components.utils.import('chrome://greasemonkey-modules/content/prefmanager.js');
 
 const EXPORTED_SYMBOLS = ['setEnabled'];
 
diff --git a/modules/util/sha1.js b/modules/util/sha1.js
index 4afddb3..bcf3b62 100644
--- a/modules/util/sha1.js
+++ b/modules/util/sha1.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 const EXPORTED_SYMBOLS = ['sha1'];
 
diff --git a/modules/util/showInstallDialog.js b/modules/util/showInstallDialog.js
index 98a7a8d..bc19549 100644
--- a/modules/util/showInstallDialog.js
+++ b/modules/util/showInstallDialog.js
@@ -1,7 +1,7 @@
 var EXPORTED_SYMBOLS = ['showInstallDialog'];
 
-Components.utils.import('resource://greasemonkey/util.js');
-Components.utils.import('resource://greasemonkey/remoteScript.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/remoteScript.js');
 
 var gWindowWatcher = Components
     .classes["@mozilla.org/embedcomp/window-watcher;1"]
diff --git a/modules/util/sniffGrants.js b/modules/util/sniffGrants.js
index e8055a6..2971064 100644
--- a/modules/util/sniffGrants.js
+++ b/modules/util/sniffGrants.js
@@ -1,6 +1,6 @@
 const EXPORTED_SYMBOLS = ['sniffGrants'];
 
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 const APIS = [
     'GM_addStyle',
diff --git a/modules/util/uriFromUrl.js b/modules/util/uriFromUrl.js
index 50c25a3..820ad33 100644
--- a/modules/util/uriFromUrl.js
+++ b/modules/util/uriFromUrl.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 var EXPORTED_SYMBOLS = ['uriFromUrl'];
 
diff --git a/modules/util/windowId.js b/modules/util/windowId.js
index c263d62..b8d242b 100644
--- a/modules/util/windowId.js
+++ b/modules/util/windowId.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 const EXPORTED_SYMBOLS = ['windowId'];
 
diff --git a/modules/util/windowIdForEvent.js b/modules/util/windowIdForEvent.js
index 340ac84..3715ae6 100644
--- a/modules/util/windowIdForEvent.js
+++ b/modules/util/windowIdForEvent.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 const EXPORTED_SYMBOLS = ['windowIdForEvent'];
 
diff --git a/modules/util/windowIsClosed.js b/modules/util/windowIsClosed.js
index a6f9830..36b4c4a 100644
--- a/modules/util/windowIsClosed.js
+++ b/modules/util/windowIsClosed.js
@@ -1,4 +1,4 @@
-Components.utils.import('resource://greasemonkey/util.js');
+Components.utils.import('chrome://greasemonkey-modules/content/util.js');
 
 const EXPORTED_SYMBOLS = ['windowIsClosed'];
 
diff --git a/modules/util/writeToFile.js b/modules/util/writeToFile.js
index 2bad1dc..0d69757 100644
--- a/modules/util/writeToFile.js
+++ b/modules/util/writeToFile.js
@@ -1,5 +1,5 @@
 Components.utils.import('resource://gre/modules/NetUtil.jsm');
-Components.utils.import('resource://greasemonkey/constants.js');
+Components.utils.import('chrome://greasemonkey-modules/content/constants.js');
 
 const EXPORTED_SYMBOLS = ['writeToFile'];
 
diff --git a/modules/xmlhttprequester.js b/modules/xmlhttprequester.js
index 64f3115..b8c91b5 100644
--- a/modules/xmlhttprequester.js
+++ b/modules/xmlhttprequester.js
@@ -1,7 +1,7 @@
 var EXPORTED_SYMBOLS = ['GM_xmlhttpRequester'];
 
 Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
-Components.utils.import("resource://greasemonkey/util.js");
+Components.utils.import("chrome://greasemonkey-modules/content/util.js");
 
 var gStringBundle = Components
     .classes["@mozilla.org/intl/stringbundle;1"]
diff --git a/util.sh b/util.sh
index 575bef3..b1527c5 100755
--- a/util.sh
+++ b/util.sh
@@ -6,6 +6,5 @@ U=./modules/util.js
 sed -i -e '/util.sh/,$d' $U
 echo '// Do not edit below this line.  Use `util.sh` to auto-populate.' >> $U
 (cd ./modules/util; ls *.js | sort | sed -e 's/\.js//') | while read F; do
-  #echo "Cu.import('resource://greasemonkey/util/$F.js', GM_util);" >> $U
-  echo "XPCOMUtils.defineLazyModuleGetter(GM_util, '$F', 'resource://greasemonkey/util/$F.js');" >> $U
+  echo "XPCOMUtils.defineLazyModuleGetter(GM_util, '$F', 'chrome://greasemonkey-modules/content/util/$F.js');" >> $U
 done

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git



More information about the Pkg-mozext-commits mailing list