IITC-CE / IITC-Button

Firefox/Chrome extensions that enables IITC features
GNU General Public License v3.0
16 stars 6 forks source link

pogo-s2 plugin isn't working with IITC-Button on Chrome #5

Closed fortepc closed 5 years ago

fortepc commented 5 years ago

This plugin works just fine with IITC-CE inside of tampermonkey, but doesn't appear to even try to load when it's inside of IITC-Button.

The plugin is here: https://gitlab.com/AlfonsoML/pogo-s2

The plugin has a few Pokemon Go centric features, such as flagging a portal as a Gym or Pokestop, being able to overlay S2 cells of adjustable sizes, and highlight S2 Cells that are full and cannot accept any new submissions.

Reporting issue on both repos because I'm not sure where the issue actually is. Issue on their repo: https://gitlab.com/AlfonsoML/pogo-s2/issues/40

johnd0e commented 5 years ago

IITC-Button could provide unsafeWindow object. But I am not sure yet that it should..

Maybe better provide GM_Info

modos189 commented 5 years ago

It is Chrome-specific problem? I've already fixed order of plugins loading and Firefox already has a new version of add-on. In Chrome, the update is in review stage and will be available for updating in a couple of days.

I install https://gitlab.com/AlfonsoML/pogo-s2/raw/master/s2check.user.js in Firefox with IITC-Button and it looks like it's working.

Screenshot ![изображение](https://user-images.githubusercontent.com/1785196/57184086-d6e9d100-6ebe-11e9-9ca0-b4cf205261e2.png)
johnd0e commented 5 years ago

No, it is not Chrome-specific. Pogo plugin uses custom wrapper, that relies on unsafeWindow.

Technically, it's easy to provide it.

Edit: I see you succeed in loading the plugin. It's strange, because I've failed..

modos189 commented 5 years ago

In plugin (typeof unsafeWindow != 'undefined' || typeof GM_info == 'undefined'... GM_info is undefined, so plugin is executed as if the plugin is running in GreaseMonkey.

But now I've tested in IITC-Button 1.0.2 in Chrome and it works too. Is error somewhere deeper?

johnd0e commented 5 years ago

I see now. AlfonsoML has already fixed the issue in plugin (see the history).

So no change required in IITC-Button.

modos189 commented 5 years ago

Great!