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

Comments

Projects
None yet
3 participants
@Delgan

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

This comment has been minimized.

Show comment
Hide comment

@arantius arantius modified the milestones: 3.5, 3.6 Sep 19, 2015

@janekptacijarabaci

This comment has been minimized.

Show comment
Hide comment
@janekptacijarabaci

janekptacijarabaci Sep 26, 2015

Contributor

Additionally please take a look at the commented lines:

// 'icon'
// 'requires'

(but see also #1644)

and next object properties:

userExcludes
userIncludes
userMatches

Contributor

janekptacijarabaci commented Sep 26, 2015

Additionally please take a look at the commented lines:

// 'icon'
// 'requires'

(but see also #1644)

and next object properties:

userExcludes
userIncludes
userMatches

@arantius

This comment has been minimized.

Show comment
Hide comment
@arantius

arantius Nov 11, 2015

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.

Collaborator

arantius commented Nov 11, 2015

@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

This comment has been minimized.

Show comment
Hide comment
@arantius

arantius Nov 11, 2015

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.

Collaborator

arantius commented Nov 11, 2015

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.

@arantius arantius closed this in 9dac77c Nov 11, 2015

@janekptacijarabaci

This comment has been minimized.

Show comment
Hide comment
@janekptacijarabaci

janekptacijarabaci Nov 11, 2015

Contributor

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

Contributor

janekptacijarabaci commented Nov 11, 2015

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