IITC-CE / ingress-intel-total-conversion

intel.ingress.com total conversion user script with some new features. Should allow easier extension of the intel map.
https://iitc.app
ISC License
291 stars 109 forks source link

IITC-Mobile: better support for external userscripts at gitlab/github #327

Open johnd0e opened 4 years ago

johnd0e commented 4 years ago

Currently we have such intent filter:

.*\\.user.js https://github.com/IITC-CE/ingress-intel-total-conversion/blob/36a9b69e55c409a091523401422f532e628c3b1d/mobile/app/src/main/AndroidManifest.xml#L104-L116

On github/gitlab it triggers on 'blob' pages, like these: https://github.com/TheSned/IITCPlugins/blob/master/extend-poly-lines.user.js https://gitlab.com/AlfonsoML/wayfarer/-/blob/master/wayfarer-planner.user.js

But IITCm is unable to handle them: if we try to install from such url, then we get useless html output (installed plugin appears in list as "unknown").

So better to exclude such urls from filter. And much even better - tranform the urls to raw source: https://github.com/TheSned/IITCPlugins/raw/master/extend-poly-lines.user.js https://gitlab.com/AlfonsoML/wayfarer/-/raw/master/wayfarer-planner.user.js

test urls https://github.com/TheSned/IITCPlugins/blob/master/extend-poly-lines.user.js https://gitlab.com/AlfonsoML/wayfarer/-/blob/master/wayfarer-planner.user.js https://github.com/TheSned/IITCPlugins/raw/master/extend-poly-lines.user.js https://gitlab.com/AlfonsoML/wayfarer/-/raw/master/wayfarer-planner.user.js https://rawcdn.githack.com/TheSned/IITCPlugins/b52007347b1abab2b5be95c19f7f6ac0bb3d8aff/extend-poly-lines.user.js https://glcdn.githack.com/AlfonsoML/wayfarer/-/raw/master/wayfarer-planner.user.js

Related to #257

johnd0e commented 4 years ago

Anyway, on mobile it may be tricky to pass plugin to IITC.

You see, I use for most cases wording very often. That's mean that whole thing is not reliable enough, and in general, user experience here is not good.

We can make it better if we add one more possibility: install plugins via sharing.

Anyway, we should implement share handling in IITC directly.