iitc-project / ingress-intel-total-conversion

ingress.com/intel total conversion user script with some new features. Should allow easier extension of the intel map.
http://iitc.jonatkins.com/
ISC License
991 stars 552 forks source link

IITC as a separate website - no browser plugin? #517

Closed jonatkins closed 11 years ago

jonatkins commented 11 years ago

This was requested/suggested on G+, and I'm wondering if it's even possible.

Could IITC be made to work as a plain website, with no browser extensions involved?

i.e. IITC hosted on - say - http://iitc.jonatkins.com/intel/, and this page then sends the appropriate ajax requests to www.ingress.com/rpc/dashboard.APINAME and displays the data.

I'm not sure, but I believe that without explicit configuration on www.ingress.com, it wouldn't be possible to make the cross-domain ajax requests.

Does anyone know if this would be possible? Perhaps tricks with iframes? Tricks including the stock intel site gen_dashboard.js? Something else?

vita10gy commented 11 years ago

To what ends?

jonatkins commented 11 years ago

Of course, it's likely not even possible. The restrictions that would block what this would need to do are the same ones that stop, for example, any random website interacting with Google+/Facebook/Twitter/your bank. Social networks do often expose a limited API for third party sites to access (e.g. Like/+1 buttons), but without the standard intel site offering anything in this area I expect we're stuck.

vita10gy commented 11 years ago

Ah. Gotcha. Yeah that would be cool.

jonatkins commented 11 years ago

Crazy suggestion time - would there be any benefit in writing a browser plugin just to enable cross-site data retrieval? I guess this would be possible...

Once installed, it would not need (regular) updates, unlike the rest of the code.

I imagine this would need to be a native browser extension - so needed for both Chrome and Firefox. And it wouldn't solve the issues of supporting additional platforms (iOS, Internet Explorer) - unless additional browser extensions were written there too.

No - it's a daft idea. If we do browser extensions, it should package all of IITC. Chrome first (70%+ of users), then perhaps Firefox too (25%+)

alecananian commented 11 years ago

You can look into setting up a web proxy. Here's some more info:

http://stackoverflow.com/questions/3076414/ways-to-circumvent-the-same-origin-policy http://developer.yahoo.com/javascript/howto-proxy.html https://github.com/softius/php-cross-domain-proxy

Whether or not Niantic will hunt you down for breaching some legal policy is another story :)

3Dad commented 11 years ago

If set up as a web proxy, then there wouldn't be much performance advantage, as you'd basically have just added a hop to the path to retrieve the data. If there's dynamic translation involved, then you've just shifted that burden from the client to the server. Given the popularity of IITC, that could be quite a resource draw.

OTOH, If you cache data from the API in a central location (which is where real performance benefits could be found), then things will wander into a new area of the TOS which may be more sensitive for Niantic.

tyrope commented 11 years ago

I fear that'll become the feature that gets IITC shut down, again... Dangerous waters, my friend.

jonatkins commented 11 years ago

Proxies is not an option. The main issues with that solution are user authentication, and the bandwidth requirements to host such a thing. A dummy account could be used to fix the first one, but there would be no COMM access, and something like that has a separate set of issues too.

So it seems that without an explicit cross-site API provided by Niantic this is not going to happen.