'
+ 'Portal | '
+ 'Level | '
- + 'Team | '
+ + 'T | '
+ 'R1 | '
+ 'R2 | '
+ 'R3 | '
@@ -200,63 +211,164 @@ window.plugin.portalslist.portalTable = function(sortBy, sortOrder, filter) {
+ 'R6 | '
+ 'R7 | '
+ 'R8 | '
- + 'Energy | '
- + 'Shield 1 | '
- + 'Shield 2 | '
- + 'Shield 3 | '
- + 'Shield 4 | '
- + 'AP Gain |
';
+ + 'Energy | '
+ + 'S1 | '
+ + 'S2 | '
+ + 'S3 | '
+ + 'S4 | '
+ + 'AP Gain | '
+ + 'E/AP | ';
$.each(portals, function(ind, portal) {
if (filter === 0 || filter === portal.team){
html += ''
- + '' + window.plugin.portalslist.getPortalLink(portal.portal, portal.guid) + ' | '
- //+ '' + portal.name + ' | '
+ + '' + window.plugin.portalslist.getPortalLink(portal.portal, portal.guid) + ' | '
+ '' + portal.level + ' | '
- + '' + portal.team + ' | '
- + '' + portal.resonators[0][0] + ' | '
- //+ '6'
- + ' | ' + portal.resonators[1][0] + ' | '
- + '' + portal.resonators[2][0] + ' | '
- + '' + portal.resonators[3][0] + ' | '
- + '' + portal.resonators[4][0] + ' | '
- + '' + portal.resonators[5][0] + ' | '
- + '' + portal.resonators[6][0] + ' | '
- + '' + portal.resonators[7][0] + ' | '
- + '' + portal.energy + '% | '
- + '' + portal.shields[0] + ' | '
- + '' + portal.shields[1] + ' | '
- + '' + portal.shields[2] + ' | '
- + '' + portal.shields[3] + ' | '
- + '' + portal.APgain + ' | ';
+ + '' + portal.team + ' | ';
+
+ $.each([0, 1, 2, 3 ,4 ,5 ,6 ,7], function(ind, slot) {
+
+ var title = 'title="owner: ' + portal.resonators[slot][1] + '
'
+ + 'energy: ' + portal.resonators[slot][3] + ' / ' + portal.resonators[slot][4] + ' (' + Math.floor(portal.resonators[slot][3]/portal.resonators[slot][4]*100) + '%)
'
+ + 'distance: ' + portal.resonators[slot][2] + 'm';
+
+ html += '' + portal.resonators[slot][0] + ' | ';
+
+ });
+
+ html += '' + portal.energyratio + '% | '
+ + '' + portal.shields[0][0] + ' | '
+ + '' + portal.shields[1][0] + ' | '
+ + '' + portal.shields[2][0] + ' | '
+ + '' + portal.shields[3][0] + ' | '
+ + '' + portal.APgain + ' | '
+ + '' + portal.EAP + ' | ';
html+= '
';
}
-
});
- html+='
';
- html+= 'Click on portals table headers to sort by that column.
'
- + 'Click on All Portals, Resistant Portals, Enlightened Portals to filter
'
+ html += '';
+
+ //html += window.plugin.portalslist.exportLinks();
+
+ html += '
Click on portals table headers to sort by that column. '
+ + 'Click on
All Portals, Resistant Portals, Enlightened Portals to filter
'
+ 'Thanks to @vita10gy & @xelio for their IITC plugins who inspired me. A
@teo96 production. Vive la Résistance !
';
window.plugin.portalslist.sortOrder = window.plugin.portalslist.sortOrder*-1;
return html;
}
-
window.plugin.portalslist.stats = function(sortBy) {
//console.log('** stats');
var html = '
'
- + 'All Portals : (click to filter) | ' + window.plugin.portalslist.listPortals.length +' | '
- + 'Resistant Portals : | ' + window.plugin.portalslist.resP + ' | '
- + 'Enlightened Portals : | '+ window.plugin.portalslist.enlP + ' | '
+ + 'All Portals : (click to filter) | ' + window.plugin.portalslist.listPortals.length + ' | '
+ + 'Resistant Portals : | ' + window.plugin.portalslist.resP +' (' + Math.floor(window.plugin.portalslist.resP/window.plugin.portalslist.listPortals.length*100) + '%) | '
+ + 'Enlightened Portals : | '+ window.plugin.portalslist.enlP +' (' + Math.floor(window.plugin.portalslist.enlP/window.plugin.portalslist.listPortals.length*100) + '%) | '
+ '
'
+ '
';
return html;
}
+//return Html generated to export links
+window.plugin.portalslist.exportLinks = function(){
+ var html='';
+ var stamp = new Date().getTime();
+
+ html+='
';
+ return html;
+}
+
+window.plugin.portalslist.export = function(fileformat){
+ //alert('format :' + fileformat);
+ var file = '';
+ var uri = '';
+
+ switch (fileformat) {
+ case 'csv':
+ file = window.plugin.portalslist.exportCSV();
+ break;
+ case 'kml':
+ file = window.plugin.portalslist.exportKML();
+ break;
+ }
+
+ if (file !== '') {
+ //http://stackoverflow.com/questions/4639372/export-to-csv-in-jquery
+ var uri = 'data:application/' + fileformat + 'csv;charset=UTF-8,' + encodeURIComponent(file);
+ //window.open(uri);
+ }
+ return uri;
+}
+window.plugin.portalslist.exportCSV = function(){
+ var csv = '';
+ var filter = window.plugin.portalslist.filter;
+ var portals = window.plugin.portalslist.listPortals;
+
+ //headers
+ csv += 'Portal\tLevel\tTeam\tR1\tR2\tR3\tR4\tR5\tR6\tR7\tR8\tEnergy\tS1\tS2\tS3\tS4\tAP Gain\tE/AP\tlat\tlong\n';
+
+ $.each(portals, function(ind, portal) {
+
+ if (filter === 0 || filter === portal.team){
+ csv += portal.name + '\t'
+ + portal.level + '\t'
+ + portal.team + '\t';
+
+ $.each([0, 1, 2, 3 ,4 ,5 ,6 ,7], function(ind, slot) {
+ csv += portal.resonators[slot][0] + '\t';
+ });
+
+ csv += portal.energyratio + '\t' + portal.shields[0][0] + '\t' + portal.shields[1][0] + '\t' + portal.shields[2][0] + '\t' + portal.shields[3][0] + '\t' + portal.APgain + '\t' + portal.EAP + '\t';
+ csv += portal.lat + '\t' + portal.lng;
+ csv += '\n';
+ }
+ });
+
+ return csv;
+}
+
+window.plugin.portalslist.exportKML = function(){
+ var kml = '';
+ var filter = window.plugin.portalslist.filter;
+ // all portals informations are avalaible in the listPortals array
+ var portals = window.plugin.portalslist.listPortals;
+
+ //headers
+ kml = '
\n'
+ + 'Ingress Export';
+
+ // define colored markers as style0 (neutral), style1 (Resistance), style2 (Enlight)
+ kml += ''
+ + ''
+ + '\n';
+
+ $.each(portals, function(ind, portal) {
+ // add the portal in the kml file only if part of the filter choice
+ if (filter === 0 || filter === portal.team){
+ // description contain picture of the portal, address and link to the Intel map
+ var description = ''
+ + ']]>';
+
+ kml += 'L' + Math.floor(portal.level) + ' - ' + portal.name + ''
+ + '' + description + ''
+ + '#style' + portal.team + '';
+
+ //coordinates
+ kml += '' + portal.lng + ',' + portal.lat + ',0';
+ kml += '\n';
+ }
+ });
+ kml += '';
+ return kml;
+}
+
// A little helper functon so the above isn't so messy
window.plugin.portalslist.portalTableSort = function(name, by) {
var retVal = 'data-sort="' + name + '"';
@@ -286,7 +398,7 @@ window.plugin.portalslist.getPortalLink = function(portal,guid) {
onClick: jsSingleClick,
onDblClick: jsDoubleClick
})[0].outerHTML;
- var div = '
'+a+'
';
+ var div = '
'+a+'
';
return div;
}
@@ -302,15 +414,15 @@ var setup = function() {
'#portalslist table tr.neutral td { background-color: #000000; }' +
'#portalslist table th { text-align:center;}' +
'#portalslist table td { text-align: center;}' +
- '#portalslist table td.L0 { background-color: #000000 !important;}' +
- '#portalslist table td.L1 { background-color: #FECE5A !important;}' +
- '#portalslist table td.L2 { background-color: #FFA630 !important;}' +
- '#portalslist table td.L3 { background-color: #FF7315 !important;}' +
- '#portalslist table td.L4 { background-color: #E40000 !important;}' +
- '#portalslist table td.L5 { background-color: #FD2992 !important;}' +
- '#portalslist table td.L6 { background-color: #EB26CD !important;}' +
- '#portalslist table td.L7 { background-color: #C124E0 !important;}' +
- '#portalslist table td.L8 { background-color: #9627F4 !important;}' +
+ '#portalslist table td.L0 { cursor: help; background-color: #000000 !important;}' +
+ '#portalslist table td.L1 { cursor: help; background-color: #FECE5A !important;}' +
+ '#portalslist table td.L2 { cursor: help; background-color: #FFA630 !important;}' +
+ '#portalslist table td.L3 { cursor: help; background-color: #FF7315 !important;}' +
+ '#portalslist table td.L4 { cursor: help; background-color: #E40000 !important;}' +
+ '#portalslist table td.L5 { cursor: help; background-color: #FD2992 !important;}' +
+ '#portalslist table td.L6 { cursor: help; background-color: #EB26CD !important;}' +
+ '#portalslist table td.L7 { cursor: help; background-color: #C124E0 !important;}' +
+ '#portalslist table td.L8 { cursor: help; background-color: #9627F4 !important;}' +
'#portalslist table td:nth-child(1) { text-align: left;}' +
'#portalslist table th { cursor:pointer; text-align: right;}' +
'#portalslist table th:nth-child(1) { text-align: left;}' +
diff --git a/plugins/privacy-view.user.js b/plugins/privacy-view.user.js
new file mode 100644
index 00000000..a04e358d
--- /dev/null
+++ b/plugins/privacy-view.user.js
@@ -0,0 +1,130 @@
+// ==UserScript==
+// @id iitc-plugin-privacy-view@Scrool
+// @name IITC plugin: Privacy view on Intel
+// @version 1.0.0.@@DATETIMEVERSION@@
+// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
+// @description [@@BUILDNAME@@-@@BUILDDATE@@] From Intel hides info which shouldn't leak to players of other fraction
+// @updateURL @@UPDATEURL@@
+// @downloadURL @@DOWNLOADURL@@
+// @include https://www.ingress.com/intel*
+// @include http://www.ingress.com/intel*
+// @match https://www.ingress.com/intel*
+// @match http://www.ingress.com/intel*
+// ==/UserScript==
+
+function wrapper() {
+
+// ensure plugin framework is there, even if iitc is not yet loaded
+if(typeof window.plugin !== 'function')
+ window.plugin = function() {};
+
+// PLUGIN START ////////////////////////////////////////////////////////
+
+// use own namespace for plugin
+window.plugin.privacyView = function() {};
+
+window.plugin.privacyView.chatExpanded = function() {
+ return $('#chat, #chatcontrols').hasClass('expand');
+};
+
+window.plugin.privacyView.toggle = function() {
+ var b = $('body');
+ var t = $('#privacycontrols .toggle');
+ if(b.hasClass('privacy_active')) {
+ b.removeClass('privacy_active').addClass('privacy_inactive');
+ t.text('Privacy inactive');
+ } else {
+ b.removeClass('privacy_inactive').addClass('privacy_active');
+ t.text('Privacy active');
+ if(window.plugin.privacyView.chatExpanded()) {
+ window.plugin.privacyView.wrapChatToggle();
+ }
+ }
+};
+
+window.plugin.privacyView.wrapChatToggle = function() {
+ window.chat.toggle();
+ var c = $('#chat, #chatcontrols');
+ if(c.hasClass('expand')) {
+ $('#privacycontrols').removeClass('shrinked').addClass('expanded');
+ } else {
+ $('#privacycontrols').removeClass('expanded').addClass('shrinked');
+ }
+};
+
+window.plugin.privacyView.setup = function() {
+ var privacy_button_width = 135;
+ $('head').append('');
+
+ $('body').addClass('privacy_inactive');
+
+ //Wrap iitc chat toggle to update our elements
+ $('#chatcontrols a:first').unbind('click');
+ $('#chatcontrols a:first').click(window.plugin.privacyView.wrapChatToggle);
+
+ $('#chatcontrols').before('
');
+ $('#privacycontrols a').click(window.plugin.privacyView.toggle);
+
+ window.plugin.privacyView.toggle();
+};
+
+var setup = window.plugin.privacyView.setup;
+
+// PLUGIN END //////////////////////////////////////////////////////////
+
+if(window.iitcLoaded && typeof setup === 'function') {
+ setup();
+} else {
+ if(window.bootPlugins)
+ window.bootPlugins.push(setup);
+ else
+ window.bootPlugins = [setup];
+}
+
+} // wrapper end
+
+// inject code into site context
+var script = document.createElement('script');
+script.appendChild(document.createTextNode('('+ wrapper +')();'));
+(document.body || document.head || document.documentElement).appendChild(script);
diff --git a/plugins/show-linked-portals.user.js b/plugins/show-linked-portals.user.js
index e39719cd..99b4f27d 100644
--- a/plugins/show-linked-portals.user.js
+++ b/plugins/show-linked-portals.user.js
@@ -1,7 +1,7 @@
// ==UserScript==
// @id iitc-plugin-show-linked-portals@fstopienski
// @name IITC plugin: Show linked portals
-// @version 0.0.1.@@DATETIMEVERSION@@
+// @version 0.0.2.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
@@ -79,7 +79,8 @@ window.plugin.showLinkedPortal.getPortalByGuid = function (guid) {
portalInfoString = '';
var portalNameAdressAlt = "'" + portalDetails.portalV2.descriptiveText.TITLE + "' (" + portalDetails.portalV2.descriptiveText.ADDRESS + ")";
var portalNameAdressTitle = "'
" + portalDetails.portalV2.descriptiveText.TITLE + "'
(" + portalDetails.portalV2.descriptiveText.ADDRESS + ")";
- portalInfoString = '

';
+ var imageUrl = (portalDetails.imageByUrl ? portalDetails.imageByUrl.imageUrl : window.DEFAULT_PORTAL_IMG);
+ portalInfoString = '

';
}
return portalInfoString;
};
diff --git a/plugins/show-portal-weakness.user.js b/plugins/show-portal-weakness.user.js
index 389d5db9..4815d5b2 100644
--- a/plugins/show-portal-weakness.user.js
+++ b/plugins/show-portal-weakness.user.js
@@ -1,7 +1,7 @@
// ==UserScript==
// @id iitc-plugin-show-portal-weakness@vita10gy
// @name IITC plugin: show portal weakness
-// @version 0.6.1.@@DATETIMEVERSION@@
+// @version 0.6.2.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
@@ -58,7 +58,7 @@ window.plugin.portalWeakness.portalAdded = function(data) {
}
if(portal_weakness > 0) {
- var fill_opacity = portal_weakness*.7 + .3;
+ var fill_opacity = portal_weakness*.85 + .15;
var color = 'orange';
if(only_shields) {
color = 'yellow';
diff --git a/screenshots/plugin_keys.png b/screenshots/plugin_keys.png
new file mode 100644
index 00000000..fe8dcead
Binary files /dev/null and b/screenshots/plugin_keys.png differ
diff --git a/screenshots/plugin_keys_on_map.png b/screenshots/plugin_keys_on_map.png
new file mode 100644
index 00000000..015aa32b
Binary files /dev/null and b/screenshots/plugin_keys_on_map.png differ
diff --git a/screenshots/plugin_portal_counts.png b/screenshots/plugin_portal_counts.png
new file mode 100755
index 00000000..0a5985ea
Binary files /dev/null and b/screenshots/plugin_portal_counts.png differ
diff --git a/style.css b/style.css
index 5cc5249b..8190eb7b 100644
--- a/style.css
+++ b/style.css
@@ -14,7 +14,8 @@ body {
}
#scrollwrapper {
- overflow: hidden;
+ overflow-x: hidden;
+ overflow-y: auto;
position: fixed;
right: -38px;
top: 0;