jonatkins/ingress-intel-total-conversion — pull request #472 by qnstie (2013-08-04 18:53:30+00:00)
Title: Added new category of plugins (inventory) with 3 ready inventory plugins...

Hi Jon,

Here is a result of some of our Polish IITC extensions - this time related to the inventory sync and inventory presentation.

We had many requests from Polish players to implement the automatic synchronization of inventory with IITC. StarlightPL and I have built something we called "iBlob", but it required cut&paste of the inventory JSON from Niantic page. I recently found attempts to solve the problem by divergentdave, but his iFrame approach never worked for me.
Therefore I re-implemented some of his concepts but instead of using a separate (and problematic) iFrame to fight the cross-domain problem, I used plain GM_xmlhttpRequest with some simple intra-window communication. It works fine for me and for a couple of testers I run the plugin through.

The solution in the pull request bases on pluggable handler idea, so that the members of the community can extend the inventory sync mechanism with more features (like this one: http://wpotrzebie.com/ingress/iitc/inventory-powertoolsync.user.js, which - while quite cool - goes well beyond the borders of IITC). I implemented two basic handler plugins - one for inventory presentation (based on above mentioned iBlob) and one for key sync (working with Keys, Keys-on-map and Synch standard plugins).

The plugins can be tested here:
http://wpotrzebie.com/ingress/iitc/inventory-import.user.js (the base plugin, implementing the sync mechanism, but no presentation functionalities)
http://wpotrzebie.com/ingress/iitc/inventory-import-keys.user.js (syncs the keys)
http://wpotrzebie.com/ingress/iitc/inventory-show.user.js (shows the synced inventory)

I hope you will like my little contribution.

Cheers,

Pawel