Conversaciones » Comentarios y opiniones sobre Greasy Fork

"Applies to:" seems to behave inconsistently

§
Publicado: 22/3/2015

"Applies to:" seems to behave inconsistently

I noticed that the domains listed under "Applies to:" sometimes include subdomains, sometimes they don't.

For an example see https://greasyfork.org/en/scripts/8714-test The includes look like

// @include     http://test.githubusercontent.com/*
// @include     http://test.someurl.com/*
// @include     http://test.appspot.com/*
// @include     http://test.google.com/*

While the subdomain "test" is included for githubusercontent.com and appspot.com, it's omited for someurl.com and google.com.

Is this some kind of feature or is it an actual bug?

Furthermore this behavior is also reproducible in the "by-site" search where it is a problem for me, since I want to use the API to fetch scripts valid for a certain domain. Therefore I have to know if I have to include subdomains in the request or not.

§
Publicado: 23/3/2015
Editado: 23/3/2015

Thanks, that's the information I needed.

Now I just have to see how I get support for Public Suffix List parsing in a Firefox extension ;)
https://github.com/gorhill/publicsuffixlist.js looks promising, though.

§
Publicado: 23/3/2015

Yay! Turns out that there is nsIEffectiveTLDService which might even be more appropriate.

Publicar respuesta

Inicia sesión para responder.