rlr / dotjs-addon

[unmaintained] ~/.js for Firefox
BSD 3-Clause "New" or "Revised" License
144 stars 17 forks source link

subdomains #29

Open wraithan opened 11 years ago

wraithan commented 11 years ago

I wrote some css for pastebin.mozilla.org and I expected it to always load, but I found on subdomains other than www it doesn't load. I went through the code and see where it excludes www. from the host then looks for an exact match.

I can see why you look for an exact match (subdomains can be completely different sites and you may not wan to apply your js or css) but it seems like this could be a preference (I see you don't have any yet so I understand if that is not the way you want to go).

I propose that it looks for an exact match, then chops off the sub-ist of the subdomains, and looks again until it finds a match.

rlr commented 11 years ago

If it's only for pastebin, you can name it pastebin.mozilla.org.js.

I have one called supportadm.private.phx1.mozilla.com.js for example.

Or are you asking for something else?

wraithan commented 11 years ago

Well for pastebin.mozilla.org, there are also people like andy and I who have our own pastebins there, wraithan.pastebin.mozilla.org which doesn't get caught if you don't fully qualify the domain.

rlr commented 11 years ago

Oh I see. Your proposal is reasonable to me. I probably didn't do it like that originally due to pure laziness.

eridal commented 8 years ago

I've implemented this on #38 Any chance somebody with write access could take a look?

dadmor commented 7 years ago

what is file name for this domain: http://www.bing.com/search

eridal commented 7 years ago

You could use just www.bing.com.js and then check for /search on location.href

Think there's an example on the README on how to check for the path.