Permalink
Browse files

Move convert2RegExp into a module.

Also:
* Add GM_ prefix.
* Separate into "third-party" and restore the original license notice.
  • Loading branch information...
arantius committed Jul 22, 2011
1 parent bde6904 commit ada8e86ad7b4a1b1c27ca9541f2dc48d65ed7c4b
Showing with 37 additions and 5 deletions.
  1. +0 −1 components/greasemonkey.js
  2. +3 −1 content/script.js
  3. +34 −3 {content → modules/third-party}/convert2RegExp.js
@@ -209,7 +209,6 @@ function startup() {
loader.loadSubScript("chrome://greasemonkey/content/scriptrequire.js");
loader.loadSubScript("chrome://greasemonkey/content/scriptresource.js");
loader.loadSubScript("chrome://greasemonkey/content/scripticon.js");
- loader.loadSubScript("chrome://greasemonkey/content/convert2RegExp.js");
loader.loadSubScript("chrome://greasemonkey/content/miscapis.js");
loader.loadSubScript("chrome://greasemonkey/content/xmlhttprequester.js");
loader.loadSubScript("chrome://greasemonkey/content/scriptdownloader.js");
View
@@ -1,3 +1,5 @@
+Components.utils.import("resource://greasemonkey/third-party/convert2RegExp.js");
+
function Script(configNode) {
this._observers = [];
@@ -38,7 +40,7 @@ Script.prototype.matchesURL = function(url) {
return false;
}
- return convert2RegExp(glob).test(url);
+ return GM_convert2RegExp(glob).test(url);
}
return GM_isGreasemonkeyable(url)

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit ada8e86

Please sign in to comment.