@require no longer works for local files #1385

John-Nagle opened this Issue Jul 27, 2011 · 2 comments

2 participants


// @require sitetruthlib.js
// @require urlparserlib.js

when the original file is being loaded from a local file for testing worked in Firefox 4 with an older version of Greasemonkey.
It is failing in Firefox 5 with Greasemonkey 0.9.7. An alert pops up with

Error loading dependency file:///C:/sites/sitetruth/site/experimental/searchrater/sitetruthlib.js
Error! Server Returned : undefined: undefined

Greasemonkey documentation for @require says "The URL specified may be relative to the URL the script is being installed from. " In this case, the required file is in the same directory as the script being loaded. The file exists, and Mozilla can read it given "file:///C:/sites/sitetruth/site/experimental/searchrater/sitetruthlib.js" as a URL.

In any case "Error! Server Returned : undefined: undefined" looks like a bug.

Was this perhaps broken when Bug #1222 was fixed? Again, this worked in earlier versions.


Was this perhaps broken when Bug #1222 was fixed?

Sounds very plausible.


I backed off Greasemonkey to 0.9.6. The error disappeared and the script that produced the error above then loaded and ran correctly.. So a change between 0.9.6 and 0.9.7 broke "@require".

@arantius arantius closed this in 5d0cda8 Aug 1, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment