Changeset 680
- Timestamp:
- 03/14/08 07:53:18 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/config-service/src/chrome/chromeFiles/content/browser.js
r679 r680 440 440 } 441 441 442 function scriptsMatching(urls) 443 GM_getConfig().getMatchingScripts( 444 function(script) urls.some(function(url) script.matchesURL(url)) 442 function scriptsMatching(urls) { 443 return GM_getConfig().getMatchingScripts( 444 function(script) { 445 return urls.some(function(url) { return script.matchesURL(url); }); 446 } 445 447 ); 448 } 446 449 447 450 function appendScriptToPopup(script) { branches/config-service/src/chrome/chromeFiles/content/config.js
r679 r680 372 372 }, 373 373 374 get scripts() this._scripts.concat(),375 getMatchingScripts: function(testFunc) this._scripts.filter(testFunc)374 get scripts() { return this._scripts.concat(); }, 375 getMatchingScripts: function(testFunc) { return this._scripts.filter(testFunc); } 376 376 }; 377 377 … … 401 401 Script.prototype = { 402 402 matchesURL: function(url) { 403 function test(page) convert2RegExp(page).test(url);403 function test(page) { return convert2RegExp(page).test(url); } 404 404 return this._includes.some(test) && !this._excludes.some(test); 405 405 }, branches/config-service/src/components/greasemonkey.js
r679 r680 232 232 initScripts: function(url) { 233 233 return GM_getConfig().getMatchingScripts( 234 function (script) script.enabled && script.matchesURL(url)234 function (script) { return script.enabled && script.matchesURL(url); } 235 235 ); 236 236 },
