Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script with relative @resource/@require path fails to install #1262

Closed
Ventero opened this issue Jan 24, 2011 · 4 comments
Closed

Script with relative @resource/@require path fails to install #1262

Ventero opened this issue Jan 24, 2011 · 4 comments

Comments

@Ventero
Copy link
Contributor

Ventero commented Jan 24, 2011

The problem here is that Config#parse passes a URI-object as baseUrl to GM_uriFromUrl, which expects it to be a string and thus throws an error when trying to parse that URI-object as URL.

Testcase

@Ventero
Copy link
Contributor Author

Ventero commented Jan 24, 2011

Possible fix

Edit: Mh, apparently I accidentally clicked "Comment and close" - sorry.

@arantius
Copy link
Collaborator

Yeah, GitHub makes that button way too big and easy to hit. Reopened.

@arantius
Copy link
Collaborator

For this script: https://gist.github.com/794325

Before the patch above, I get an alert:

Error: Failed to @require /raw/794325/c285761645bd4369b8933b5106074cb7e8eb7770/gistfile2.js
When clicking the link.

After this patch, it appears to work.

@Ventero
Copy link
Contributor Author

Ventero commented Jan 25, 2011

Closed by c838d49.
Only try to parse the supplied base if it's a string, otherwise assume it's already a uri object.

dept42 pushed a commit to dept42/greasemonkey that referenced this issue May 12, 2011
Only try to parse the supplied base if it's a string, otherwise assume it's already a uri object.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants