diff --git a/uniques-go.user.js b/uniques-go.user.js
index 0c9f4d4..84a622d 100644
--- a/uniques-go.user.js
+++ b/uniques-go.user.js
@@ -2,10 +2,10 @@
// @id iitc-plugin-uniques-go@mitago
// @name IITC plugin: Uniques go data sender
// @category Misc
-// @version 0.0.1
-// @namespace https://github.com/xificurk/iitc-plugins
-// @updateURL https://raw.githubusercontent.com/xificurk/iitc-plugins/master/dist/portal-highlighter-uniques-opacity.mesta.js
-// @downloadURL https://raw.githubusercontent.com/xificurk/iitc-plugins/master/dist/portal-highlighter-uniques-opacity.usser.js
+// @version 0.0.2
+// @namespace https://git.mitago.net/ingress/uniques-go-userscript
+// @updateURL https://git.mitago.net/ingress/uniques-go-userscript/raw/branch/master/uniques-go.user.js
+// @downloadURL https://git.mitago.net/ingress/uniques-go-userscript/raw/branch/master/uniques-go.user.js
// @description Uniques go data sender
// @include https://intel.ingress.com/*
// @include http://intel.ingress.com/*
@@ -15,10 +15,6 @@
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
-// @include https://*.ingress.com/mission/*
-// @include http://*.ingress.com/mission/*
-// @match https://*.ingress.com/mission/*
-// @match http://*.ingress.com/mission/*
// @grant none
// ==/UserScript==
@@ -30,8 +26,8 @@ function wrapper(plugin_info) {
//PLUGIN AUTHORS: writing a plugin outside of the IITC build environment? if so, delete these lines!!
//(leaving them in place might break the 'About IITC' page or break update checks)
plugin_info.buildName = 'mitago';
- plugin_info.dateTimeVersion = '202200529.014500';
- plugin_info.pluginId = 'uniques-go';
+ plugin_info.dateTimeVersion = '202200531.044700';
+ plugin_info.pluginId = 'uniquesgo';
//END PLUGIN AUTHORS NOTE
@@ -57,13 +53,13 @@ function wrapper(plugin_info) {
}
window.plugin.uniquesgo.AjaxOK = function (result) {
- let a = ''
+ let a = '';
$.each(result, function(i, val) {
- if val > 0 {
+ if (val > 0) {
a += i + ': ' + val + '
';
}
});
- alert(a)
+ alert(a);
}
window.plugin.uniquesgo.getPortals = function() {
@@ -92,10 +88,18 @@ function wrapper(plugin_info) {
return retval;
}
+ window.plugin.uniquesgo.onPaneChanged = function(pane) {
+ if(pane === "plugin-portalslist")
+ window.plugin.uniquesgo.sendPL();
+ else
+ $("#uniquesgo").remove()
+ };
+
var setup = function() {
if (window.useAppPanes()) {
//FIXME
- app.addPane("plugin-portalslist", "Portals list", "ic_action_paste");
+ app.addPane("plugin-uniquesgo", "Send portals to mitago", "ic_action_paste");
+ addHook("paneChanged", window.plugin.uniquesgo.onPaneChanged);
} else {
$('#toolbox').append('Send portals');
}