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
290 stars 109 forks source link

About IITC is broken on platform not using GM api #269

Closed HubertZhang closed 5 years ago

HubertZhang commented 5 years ago

When GM_info is empty, script_info will have no script property and About IITC dialog won't show up

johnd0e commented 5 years ago

@HubertZhang So fill GM_info

johnd0e commented 5 years ago

@HubertZhang Could you specify what exact part of code causes that error?

This?

  var iitcVersion = iitc.script.version + ' [' + iitc.buildName + ']';
HubertZhang commented 5 years ago

iitc = script_info and in https://github.com/IITC-CE/ingress-intel-total-conversion/blob/5456b0c9a23641caa13be3d40a1222d0f30134bb/main.js#L11 script_info = plugin_info

and plugin_info is initialized by https://github.com/IITC-CE/ingress-intel-total-conversion/blob/5456b0c9a23641caa13be3d40a1222d0f30134bb/pluginwrapper.py#L37

So if GM_info not exist, iitc.script is undefined, access iitc.script.version will throw exception

Also iitc.buildName is not set and will become undefined in About IITC dialog