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

GM_info does not expose resources corresponding URL #2281

Closed
Delgan opened this issue Sep 19, 2015 · 5 comments
Closed

GM_info does not expose resources corresponding URL #2281

Delgan opened this issue Sep 19, 2015 · 5 comments
Milestone

Comments

@Delgan
Copy link

Delgan commented Sep 19, 2015

Hello.

Quoting from the wiki article:

resources
An object whose keys are resource names and values are the corresponding URLs. (As of Greasemonkey 1.2.)

Unfortunately, GM.script.resources is an object like this:

{
    "resource_name_1": {
        "name": "resource_name_1",
        "mimetype": "application/javascript"
    },
    "resource_name_2": {
        "name": "resource_name_2",
        "mimetype": "image/x-icon"
    },
    ...
}

There is no way to get the original URL as some/path/resource.

Is this a bug? Is it possible to add the resources corresponding URL, please, as stated in the documentation?

I am using Firefox 40.0.3 and GreaseMonkey 3.4.1.

@janekptacijarabaci
Copy link
Contributor

@arantius arantius modified the milestones: 3.5, 3.6 Sep 19, 2015
@janekptacijarabaci
Copy link
Contributor

Additionally please take a look at the commented lines:

// 'icon'
// 'requires'

(but see also #1644)

and next object properties:

userExcludes
userIncludes
userMatches

@arantius
Copy link
Collaborator

@janekptacijarabaci I'm conflicted for various reasons; if you'd like to see GM_infogain icon or resources data, please start a separate issue to discuss how it would work, thanks.

@arantius
Copy link
Collaborator

I don't think that documentation was ever right, even in version 1.2 (which it mentions) it was always how it is today ( https://github.com/greasemonkey/greasemonkey/blob/1.2/modules/script.js#L459 ).

I'm going to update the documentation to match reality, and also add a "url" property, to move reality closer to the original documentation.

@janekptacijarabaci
Copy link
Contributor

It was just for information. Rather for completeness. But thank you for the info.

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

3 participants