GM_info does not expose resources corresponding URL #2281

Closed
Delgan opened this Issue Sep 19, 2015 · 5 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.

@arantius arantius modified the milestone: 3.5, 3.6 Sep 19, 2015
@janekptacijarabaci
Contributor

Additionally please take a look at the commented lines:

// 'icon'
// 'requires'

(but see also #1644)

and next object properties:

userExcludes
userIncludes
userMatches

@arantius
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
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.

@arantius arantius closed this in 9dac77c Nov 11, 2015
@janekptacijarabaci
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