Merge branch 'master' into highlighter

This commit is contained in:
vita10gy 2013-04-28 13:59:26 -05:00
commit 55e874ced4
32 changed files with 10401 additions and 503 deletions

BIN
assets/IITC.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

64
assets/IITC.svg Normal file
View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="134.333px" height="207.581px" viewBox="0 0 134.333 207.581" enable-background="new 0 0 134.333 207.581"
xml:space="preserve">
<g>
<g>
<radialGradient id="SVGID_1_" cx="65.6543" cy="81.3018" r="81.8284" gradientUnits="userSpaceOnUse">
<stop offset="0" style="stop-color:#57A2D9"/>
<stop offset="1" style="stop-color:#004A8E"/>
</radialGradient>
<polygon fill="url(#SVGID_1_)" points="98.581,110.958 98.581,129.814 114.91,120.385 "/>
<radialGradient id="SVGID_2_" cx="65.6494" cy="81.2998" r="81.8353" gradientUnits="userSpaceOnUse">
<stop offset="0" style="stop-color:#57A2D9"/>
<stop offset="1" style="stop-color:#004A8E"/>
</radialGradient>
<path fill="url(#SVGID_2_)" d="M83.27,96.306l10.275,5.932V65.707c0-0.899,0.48-1.73,1.258-2.18l28.654-16.542L89.868,27.593
l-6.599,3.81V96.306z"/>
<radialGradient id="SVGID_3_" cx="65.6489" cy="81.3003" r="81.8332" gradientUnits="userSpaceOnUse">
<stop offset="0" style="stop-color:#D9DADA"/>
<stop offset="1" style="stop-color:#ADADAD"/>
</radialGradient>
<polygon fill="url(#SVGID_3_)" points="35.752,96.307 35.752,58.133 13.66,45.377 9.374,47.852 9.374,111.538 "/>
<radialGradient id="SVGID_4_" cx="65.6543" cy="81.3003" r="81.8301" gradientUnits="userSpaceOnUse">
<stop offset="0" style="stop-color:#D9DADA"/>
<stop offset="1" style="stop-color:#ADADAD"/>
</radialGradient>
<polygon fill="url(#SVGID_4_)" points="98.581,67.16 98.581,105.146 119.944,117.481 124.959,114.585 124.959,51.93 "/>
<radialGradient id="SVGID_5_" cx="65.6499" cy="81.2183" r="81.9199" gradientUnits="userSpaceOnUse">
<stop offset="0" style="stop-color:#57A2D9"/>
<stop offset="1" style="stop-color:#004A8E"/>
</radialGradient>
<path fill="url(#SVGID_5_)" d="M93.545,108.051l-14.05-8.113c-0.78-0.449-1.259-1.281-1.259-2.179V29.949
c0-0.899,0.479-1.731,1.259-2.179l5.339-3.084l-17.668-10.2L40.772,29.724c0.007,0.074,0.015,0.149,0.015,0.225v25.278
l14.374,8.299c0.778,0.449,1.259,1.281,1.259,2.18v67.81c0,0.9-0.481,1.731-1.259,2.182l-4.61,2.661l16.614,9.593l26.379-15.229
V108.051z"/>
<radialGradient id="SVGID_6_" cx="65.6489" cy="81.3013" r="81.8339" gradientUnits="userSpaceOnUse">
<stop offset="0" style="stop-color:#57A2D9"/>
<stop offset="1" style="stop-color:#004A8E"/>
</radialGradient>
<polygon fill="url(#SVGID_6_)" points="35.752,52.321 35.752,32.622 18.694,42.47 "/>
<radialGradient id="SVGID_7_" cx="65.6499" cy="81.2998" r="81.8327" gradientUnits="userSpaceOnUse">
<stop offset="0" style="stop-color:#57A2D9"/>
<stop offset="1" style="stop-color:#004A8E"/>
</radialGradient>
<path fill="url(#SVGID_7_)" d="M51.386,67.16l-10.599-6.12v36.72c0,0.899-0.481,1.73-1.259,2.179l-27.761,16.03l33.75,19.482
l5.869-3.389V67.16z"/>
</g>
<g>
<path d="M102.767,188.545l-8.822-5.094v-8.778l8.822-5.094c1.168-0.676,1.566-2.164,0.893-3.333
c-0.673-1.166-2.163-1.563-3.33-0.892l-10.041,5.8c-0.755,0.433-1.219,1.238-1.219,2.11v11.592c0,0.872,0.464,1.678,1.219,2.114
l10.041,5.796c0.383,0.223,0.803,0.328,1.217,0.328c0.843,0,1.662-0.439,2.113-1.221
C104.333,190.709,103.935,189.218,102.767,188.545z"/>
<path d="M53.21,165.029c-1.346,0-2.438,1.091-2.438,2.438v23.189c0,1.347,1.092,2.439,2.438,2.439
c1.348,0,2.439-1.093,2.439-2.439v-23.189C55.649,166.12,54.558,165.029,53.21,165.029z"/>
<path d="M81.501,165.029H66.366c-1.346,0-2.438,1.091-2.438,2.438c0,1.346,1.091,2.438,2.438,2.438h5.13v20.751
c0,1.347,1.092,2.439,2.438,2.439c1.348,0,2.439-1.093,2.439-2.439v-20.751h5.128c1.348,0,2.439-1.093,2.439-2.438
C83.94,166.12,82.849,165.029,81.501,165.029z"/>
<path d="M32.785,165.029c-1.346,0-2.438,1.091-2.438,2.438v23.189c0,1.347,1.091,2.439,2.438,2.439
c1.348,0,2.439-1.093,2.439-2.439v-23.189C35.224,166.12,34.132,165.029,32.785,165.029z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -119,7 +119,7 @@ window.setupMap = function() {
//their usage policy has no limits (except required notification above 4000 tiles/sec - we're perhaps at 50 tiles/sec based on CloudMade stats)
var mqSubdomains = [ 'otile1','otile2', 'otile3', 'otile4' ];
var mqTileUrlPrefix = window.location.protocol !== 'https:' ? 'http://{s}.mqcdn.com' : 'https://{s}-s.mqcdn.com';
var mqMapOpt = {attribution: osmAttribution+', Tiles Courtesy of MapQuest', mazZoom: 18, detectRetena: true, subdomains: mqSubdomains};
var mqMapOpt = {attribution: osmAttribution+', Tiles Courtesy of MapQuest', maxZoom: 18, detectRetena: true, subdomains: mqSubdomains};
var mqMap = new L.TileLayer(mqTileUrlPrefix+'/tiles/1.0.0/map/{z}/{x}/{y}.jpg',mqMapOpt);
//MapQuest satellite coverage outside of the US is rather limited - so not really worth having as we have google as an option
//var mqSatOpt = {attribution: 'Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency', mazZoom: 18, detectRetena: true, subdomains: mqSubdomains};
@ -127,10 +127,11 @@ window.setupMap = function() {
var views = [
/*0*/ mqMap,
/*1*/ new L.Google('INGRESS'),
/*2*/ new L.Google('ROADMAP'),
/*1*/ new L.Google('INGRESS',{maxZoom:20}),
/*2*/ new L.Google('ROADMAP',{maxZoom:20}),
/*3*/ new L.Google('SATELLITE',{maxZoom:20}),
/*4*/ new L.Google('HYBRID',{maxZoom:20})
/*4*/ new L.Google('HYBRID',{maxZoom:20}),
/*5*/ new L.Google('TERRAIN',{maxZoom:15})
];
@ -161,7 +162,8 @@ window.setupMap = function() {
'Default Ingress Map': views[1],
'Google Roads': views[2],
'Google Satellite': views[3],
'Google Hybrid': views[4]
'Google Hybrid': views[4],
'Google Terrain': views[5]
}, addLayers);
map.addControl(window.layerChooser);

View File

@ -136,7 +136,7 @@ window.showPortalPosLinks = function(lat, lng, name) {
portal_name = encodeURIComponent(' (' + name + ')');
}
if (typeof android !== 'undefined' && android && android.intentPosLink) {
android.intentPosLink(window.location.protocol + '//maps.google.com/?q='+lat+','+lng);
android.intentPosLink(lat, lng, portal_name);
} else {
var qrcode = '<div id="qrcode"></div>';
var script = '<script>$(\'#qrcode\').qrcode({text:\'GEO:'+lat+','+lng+'\'});</script>';
@ -232,6 +232,7 @@ window.getTypeByGuid = function(guid) {
// portals end in “.11” or “.12“, links in “.9", fields in “.b”
// .11 == portals
// .12 == portals
// .16 == portals
// .9 == links
// .b == fields
// .c == player/creator
@ -245,6 +246,7 @@ window.getTypeByGuid = function(guid) {
switch(guid.slice(33)) {
case '11':
case '12':
case '16':
return TYPE_PORTAL;
case '9':

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cradle.iitc_mobile"
android:versionCode="11"
android:versionName="0.3" >
android:versionCode="12"
android:versionName="0.3.1" >
<uses-sdk
android:minSdkVersion="14"

View File

@ -18,11 +18,12 @@ public class IITC_JSInterface {
context = c;
}
// send intent for gmaps link
// send geo intent for navigation apps like gmaps or waze etc...
@JavascriptInterface
public void intentPosLink(String s) {
public void intentPosLink(String lat, String lng, String portal_name) {
String uri = "geo:" + lat + "," + lng + "?q=" + lat + "," + lng + portal_name;
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse(s));
Uri.parse(uri));
context.startActivity(intent);
}

View File

@ -22,6 +22,7 @@ public class IITC_WebView extends WebView {
settings.setDomStorageEnabled(true);
settings.setAllowFileAccess(true);
settings.setGeolocationEnabled(true);
settings.setDatabasePath(this.getContext().getApplicationInfo().dataDir + "/databases/");
this.js_interface = new IITC_JSInterface(c);
this.addJavascriptInterface(js_interface, "android");

View File

@ -5,7 +5,7 @@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Tries to determine overal AP stats for the current zoom
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Displays the per-team AP gains available in the current view.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*

View File

@ -371,7 +371,8 @@ window.plugin.playerTracker.centerMapOnUser = function(nick) {
return false;
}
map.setView(position, map.getZoom());
if(window.isSmartphone()) window.smartphone.mapButton.click();
window.map.setView(position, map.getZoom());
}
window.plugin.playerTracker.onNicknameClicked = function(info) {

View File

@ -1,11 +1,11 @@
// ==UserScript==
// @id iitc-plugin-portals-list@teo96
// @name IITC plugin: show list of portals
// @version 0.0.10.@@DATETIMEVERSION@@
// @version 0.0.11.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Display a sortable list of all localized portails with team, level, resonators informations
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Display a sortable list of all visible portals with full details about the team, resonators, shields, etc.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
@ -13,6 +13,8 @@
// ==/UserScript==
/* whatsnew
* 0.0.11: Add nominal energy column and # links, fix sort bug when opened even amounts of times, nits
* 0.0.10: Fixed persistent css problem with alert
* 0.0.9 : bugs hunt
* 0.0.8 : Aborted to avoid problems with Niantic (export portals informations as csv or kml file)
* 0.0.7 : more informations avalaible via tooltips (who deployed, energy, ...), new E/AP column
@ -45,328 +47,239 @@ window.plugin.portalslist.resP = 0;
window.plugin.portalslist.filter=0;
//fill the listPortals array with portals avalaible on the map (level filtered portals will not appear in the table)
window.plugin.portalslist.getPortals = function(){
//filter : 0 = All, 1 = Res, 2 = Enl
//console.log('** getPortals');
var retval=false;
window.plugin.portalslist.listPortals = [];
//get portals informations from IITC
$.each(window.portals, function(i, portal) {
retval=true;
var d = portal.options.details;
var name = d.portalV2.descriptiveText.TITLE;
var address = d.portalV2.descriptiveText.ADDRESS;
var img = d.imageByUrl && d.imageByUrl.imageUrl ? d.imageByUrl.imageUrl : DEFAULT_PORTAL_IMG;
var team = portal.options.team;
switch (team){
case 1 :
window.plugin.portalslist.resP++;
break;
case 2 :
window.plugin.portalslist.enlP++;
break;
}
var level = getPortalLevel(d).toFixed(2);
var guid = portal.options.guid;
//get resonators informations
var resonators = []; // my local resonator array : reso level, reso deployed by, distance to portal, energy total, max
var energy = 0;
var maxenergy=0;
$.each(portal.options.details.resonatorArray.resonators, function(ind, reso) {
if(reso) {
resonators[ind] = [reso.level, window.getPlayerName(reso.ownerGuid), reso.distanceToPortal, reso.energyTotal, RESO_NRG[reso.level]];
energy += reso.energyTotal;
maxenergy += RESO_NRG[reso.level];
} else { resonators[ind] = [0,'',0,0,0]; }
});
// Sort resonators array by resonator level
resonators.sort(function (a, b) {return b[0] - a[0]});
//get shield informations
var shields = [];
$.each(d.portalV2.linkedModArray, function(ind, mod) {
if (mod)
//shields[ind] = mod.rarity.capitalize().replace('_', ' ');
shields[ind] = [mod.rarity.substr(0,1).capitalize(), getPlayerName(mod.installingUser)] ;
else
shields[ind] = ['', ''];
});
var APgain= getAttackApGain(d).enemyAp;
var thisPortal = {'portal':d,'name':name,'team':team,'level':level,'guid':guid, 'resonators':resonators,'energyratio' : Math.floor(energy/maxenergy*100), 'shields':shields, 'APgain':APgain, 'EAP' : (energy/APgain).toFixed(2), 'energy': energy, 'maxenergy':maxenergy, 'lat':portal._latlng.lat, 'lng':portal._latlng.lng, 'address': address, 'img' : img};
window.plugin.portalslist.listPortals.push(thisPortal);
window.plugin.portalslist.getPortals = function() {
//filter : 0 = All, 1 = Res, 2 = Enl
//console.log('** getPortals');
var retval=false;
window.plugin.portalslist.listPortals = [];
//get portals informations from IITC
$.each(window.portals, function(i, portal) {
retval=true;
var d = portal.options.details;
var name = d.portalV2.descriptiveText.TITLE;
var address = d.portalV2.descriptiveText.ADDRESS;
var img = d.imageByUrl && d.imageByUrl.imageUrl ? d.imageByUrl.imageUrl : DEFAULT_PORTAL_IMG;
var team = portal.options.team;
switch (team){
case 1 :
window.plugin.portalslist.resP++;
break;
case 2 :
window.plugin.portalslist.enlP++;
break;
}
var level = getPortalLevel(d).toFixed(2);
var guid = portal.options.guid;
//get resonators informations
var resonators = []; // my local resonator array : reso level, reso deployed by, distance to portal, energy total, max
var energy = 0;
var maxenergy=0;
$.each(portal.options.details.resonatorArray.resonators, function(ind, reso) {
if(reso) {
resonators[ind] = [reso.level, window.getPlayerName(reso.ownerGuid), reso.distanceToPortal, reso.energyTotal, RESO_NRG[reso.level]];
energy += reso.energyTotal;
maxenergy += RESO_NRG[reso.level];
} else { resonators[ind] = [0,'',0,0,0]; }
});
return retval;
// Sort resonators array by resonator level
resonators.sort(function (a, b) {return b[0] - a[0]});
//get shield informations
var shields = [];
$.each(d.portalV2.linkedModArray, function(ind, mod) {
if (mod) {
//shields[ind] = mod.rarity.capitalize().replace('_', ' ');
shields[ind] = [mod.rarity.substr(0,1).capitalize(), getPlayerName(mod.installingUser)] ;
} else {
shields[ind] = ['', ''];
}
});
var APgain= getAttackApGain(d).enemyAp;
var thisPortal = {'portal': d, 'name': name, 'team': team, 'level': level, 'guid': guid, 'resonators': resonators, 'energyratio': maxenergy ? Math.floor(energy/maxenergy*100) : 0, 'shields': shields, 'APgain': APgain, 'EAP': (energy/APgain).toFixed(2), 'energy': energy, 'maxenergy': maxenergy, 'links': d.portalV2.linkedEdges.length, 'lat': portal._latlng.lat, 'lng': portal._latlng.lng, 'address': address, 'img': img};
window.plugin.portalslist.listPortals.push(thisPortal);
});
return retval;
}
window.plugin.portalslist.displayPL = function() {
// debug tools
//var start = new Date().getTime();
//console.log('***** Start ' + start);
var html = '';
window.plugin.portalslist.sortOrder=-1;
window.plugin.portalslist.enlP = 0;
window.plugin.portalslist.resP = 0;
window.plugin.portalslist.displayPL = function() {
// debug tools
//var start = new Date().getTime();
//console.log('***** Start ' + start);
if (window.plugin.portalslist.getPortals()) {
html += window.plugin.portalslist.portalTable('level', window.plugin.portalslist.sortOrder,window.plugin.portalslist.filter);
} else {
html = '<table><tr><td>Nothing to Show !</td></tr></table>';
};
alert('<div id="portalslist">' + html + '</div>', true, function() {$(".ui-dialog").removeClass('ui-dialog-portalslist');});
$(".ui-dialog").addClass('ui-dialog-portalslist');
var html = '';
window.plugin.portalslist.sortOrder=-1;
window.plugin.portalslist.enlP = 0;
window.plugin.portalslist.resP = 0;
if (window.plugin.portalslist.getPortals()) {
html += window.plugin.portalslist.portalTable('level', window.plugin.portalslist.sortOrder,window.plugin.portalslist.filter);
} else {
html = '<table><tr><td>Nothing to Show !</td></tr></table>';
};
alert('<div id="portalslist">' + html + '</div>', true, function() {
$(".ui-dialog").removeClass('ui-dialog-portalslist');
$(document).off('.portalslist');
});
$(".ui-dialog").addClass('ui-dialog-portalslist');
// Setup sorting
$(document).on('click.portalslist', '#portalslist table th', function() {
$('#portalslist').html(window.plugin.portalslist.portalTable($(this).data('sort'),window.plugin.portalslist.sortOrder,window.plugin.portalslist.filter));
});
$(document).on('click.portalslist', '#portalslist .filterAll', function() {
$('#portalslist').html(window.plugin.portalslist.portalTable($(this).data('sort'),window.plugin.portalslist.sortOrder,0));
});
$(document).on('click.portalslist', '#portalslist .filterRes', function() {
$('#portalslist').html(window.plugin.portalslist.portalTable($(this).data('sort'),window.plugin.portalslist.sortOrder,1));
});
$(document).on('click.portalslist', '#portalslist .filterEnl', function() {
$('#portalslist').html(window.plugin.portalslist.portalTable($(this).data('sort'),window.plugin.portalslist.sortOrder,2));
});
// Setup sorting
$(document).on('click', '#portalslist table th', function() {
$('#portalslist').html(window.plugin.portalslist.portalTable($(this).data('sort'),window.plugin.portalslist.sortOrder,window.plugin.portalslist.filter));
});
$(document).on('click', '#portalslist .filterAll', function() {
$('#portalslist').html(window.plugin.portalslist.portalTable($(this).data('sort'),window.plugin.portalslist.sortOrder,0));
});
$(document).on('click', '#portalslist .filterRes', function() {
$('#portalslist').html(window.plugin.portalslist.portalTable($(this).data('sort'),window.plugin.portalslist.sortOrder,1));
});
$(document).on('click', '#portalslist .filterEnl', function() {
$('#portalslist').html(window.plugin.portalslist.portalTable($(this).data('sort'),window.plugin.portalslist.sortOrder,2));
});
//debug tools
//end = new Date().getTime();
//console.log('***** end : ' + end + ' and Elapse : ' + (end - start));
//debug tools
//end = new Date().getTime();
//console.log('***** end : ' + end + ' and Elapse : ' + (end - start));
}
window.plugin.portalslist.portalTable = function(sortBy, sortOrder, filter) {
// sortOrder <0 ==> desc, >0 ==> asc, i use sortOrder * -1 to change the state
window.plugin.portalslist.filter=filter;
var portals=window.plugin.portalslist.listPortals;
//Array sort
window.plugin.portalslist.listPortals.sort(function(a, b) {
var retVal = 0;
switch (sortBy) {
case 'names':
retVal = a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1;
break;
case 'r1':
retVal = b.resonators[0][0] - a.resonators[0][0];
break;
case 'r2':
retVal = b.resonators[1][0] - a.resonators[1][0];
break;
case 'r3':
retVal = b.resonators[2][0] - a.resonators[2][0];
break;
case 'r4':
retVal = b.resonators[3][0] - a.resonators[3][0];
break;
case 'r5':
retVal = b.resonators[4][0] - a.resonators[4][0];
break;
case 'r6':
retVal = b.resonators[5][0] - a.resonators[5][0];
break;
case 'r7':
retVal = b.resonators[6][0] - a.resonators[6][0];
break;
case 'r8':
retVal = b.resonators[7][0] - a.resonators[7][0];
break;
case 's1':
retVal = a.shields[0].toLowerCase() > b.shields[0].toLowerCase() ? -1 : 1;
break;
case 's2':
retVal = a.shields[1].toLowerCase() > b.shields[1].toLowerCase() ? -1 : 1;
break;
case 's3':
retVal = a.shields[2].toLowerCase() > b.shields[2].toLowerCase() ? -1 : 1;
break;
case 's4':
retVal = a.shields[3].toLowerCase() > b.shields[3].toLowerCase() ? -1 : 1;
break;
default:
retVal = b[sortBy] - a[sortBy];
break;
}
if (sortOrder > 0) { retVal = -retVal} //thx @jonatkins
return retVal;
});
var sort = window.plugin.portalslist.portalTableSort;
var html = window.plugin.portalslist.stats();
html += '<table>'
+ '<tr><th ' + sort('names', sortBy, -1) + '>Portal</th>'
+ '<th ' + sort('level', sortBy, -1) + '>Level</th>'
+ '<th title="Team" ' + sort('team', sortBy, -1) + '>T</th>'
+ '<th ' + sort('r1', sortBy, -1) + '>R1</th>'
+ '<th ' + sort('r2', sortBy, -1) + '>R2</th>'
+ '<th ' + sort('r3', sortBy, -1) + '>R3</th>'
+ '<th ' + sort('r4', sortBy, -1) + '>R4</th>'
+ '<th ' + sort('r5', sortBy, -1) + '>R5</th>'
+ '<th ' + sort('r6', sortBy, -1) + '>R6</th>'
+ '<th ' + sort('r7', sortBy, -1) + '>R7</th>'
+ '<th ' + sort('r8', sortBy, -1) + '>R8</th>'
+ '<th ' + sort('energyratio', sortBy, -1) + '>Energy</th>'
+ '<th ' + sort('s1', sortBy, -1) + '>S1</th>'
+ '<th ' + sort('s2', sortBy, -1) + '>S2</th>'
+ '<th ' + sort('s3', sortBy, -1) + '>S3</th>'
+ '<th ' + sort('s4', sortBy, -1) + '>S4</th>'
+ '<th ' + sort('APgain', sortBy, -1) + '>AP Gain</th>'
+ '<th title="Energy / AP Gain ratio" ' + sort('EAP', sortBy, -1) + '>E/AP</th></tr>';
$.each(portals, function(ind, portal) {
if (filter === 0 || filter === portal.team){
html += '<tr class="' + (portal.team === 1 ? 'res' : (portal.team === 2 ? 'enl' : 'neutral')) + '">'
+ '<td style="">' + window.plugin.portalslist.getPortalLink(portal.portal, portal.guid) + '</td>'
+ '<td class="L' + Math.floor(portal.level) +'">' + portal.level + '</td>'
+ '<td style="text-align:center;">' + portal.team + '</td>';
$.each([0, 1, 2, 3 ,4 ,5 ,6 ,7], function(ind, slot) {
var title = 'title="owner: <b>' + portal.resonators[slot][1] + '</b><br>'
+ 'energy: ' + portal.resonators[slot][3] + ' / ' + portal.resonators[slot][4] + ' (' + Math.floor(portal.resonators[slot][3]/portal.resonators[slot][4]*100) + '%)<br>'
+ 'distance: ' + portal.resonators[slot][2] + 'm';
html += '<td class="L' + portal.resonators[slot][0] +'" ' + title + '">' + portal.resonators[slot][0] + '</td>';
});
html += '<td style="cursor:help" title="' + portal.energy + ' / ' + portal.maxenergy +'">' + portal.energyratio + '%</td>'
+ '<td style="cursor:help" title="'+ portal.shields[0][1] +'">' + portal.shields[0][0] + '</td>'
+ '<td style="cursor:help" title="'+ portal.shields[1][1] +'">' + portal.shields[1][0] + '</td>'
+ '<td style="cursor:help" title="'+ portal.shields[2][1] +'">' + portal.shields[2][0] + '</td>'
+ '<td style="cursor:help" title="'+ portal.shields[3][1] +'">' + portal.shields[3][0] + '</td>'
+ '<td>' + portal.APgain + '</td>'
+ '<td>' + portal.EAP + '</td>';
html+= '</tr>';
}
});
html += '</table>';
//html += window.plugin.portalslist.exportLinks();
html += '<div class="disclaimer">Click on portals table headers to sort by that column. '
+ 'Click on <b>All Portals, Resistant Portals, Enlightened Portals</b> to filter<br>'
+ 'Thanks to @vita10gy & @xelio for their IITC plugins who inspired me. A <a href="https://plus.google.com/113965246471577467739">@teo96</a> production. Vive la Résistance !</div>';
// sortOrder <0 ==> desc, >0 ==> asc, i use sortOrder * -1 to change the state
window.plugin.portalslist.filter=filter;
var portals=window.plugin.portalslist.listPortals;
window.plugin.portalslist.sortOrder = window.plugin.portalslist.sortOrder*-1;
return html;
//Array sort
window.plugin.portalslist.listPortals.sort(function(a, b) {
var retVal = 0;
switch (sortBy) {
case 'names':
retVal = a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1;
break;
case 'r1':
retVal = b.resonators[0][0] - a.resonators[0][0];
break;
case 'r2':
retVal = b.resonators[1][0] - a.resonators[1][0];
break;
case 'r3':
retVal = b.resonators[2][0] - a.resonators[2][0];
break;
case 'r4':
retVal = b.resonators[3][0] - a.resonators[3][0];
break;
case 'r5':
retVal = b.resonators[4][0] - a.resonators[4][0];
break;
case 'r6':
retVal = b.resonators[5][0] - a.resonators[5][0];
break;
case 'r7':
retVal = b.resonators[6][0] - a.resonators[6][0];
break;
case 'r8':
retVal = b.resonators[7][0] - a.resonators[7][0];
break;
case 's1':
retVal = a.shields[0].toLowerCase() > b.shields[0].toLowerCase() ? -1 : 1;
break;
case 's2':
retVal = a.shields[1].toLowerCase() > b.shields[1].toLowerCase() ? -1 : 1;
break;
case 's3':
retVal = a.shields[2].toLowerCase() > b.shields[2].toLowerCase() ? -1 : 1;
break;
case 's4':
retVal = a.shields[3].toLowerCase() > b.shields[3].toLowerCase() ? -1 : 1;
break;
default:
retVal = b[sortBy] - a[sortBy];
break;
}
if (sortOrder > 0) retVal = -retVal; //thx @jonatkins
return retVal;
});
var sort = window.plugin.portalslist.portalTableSort;
var html = window.plugin.portalslist.stats();
html += '<table>'
+ '<tr><th ' + sort('names', sortBy, -1) + '>Portal</th>'
+ '<th ' + sort('level', sortBy, -1) + '>Level</th>'
+ '<th title="Team" ' + sort('team', sortBy, -1) + '>T</th>'
+ '<th ' + sort('r1', sortBy, -1) + '>R1</th>'
+ '<th ' + sort('r2', sortBy, -1) + '>R2</th>'
+ '<th ' + sort('r3', sortBy, -1) + '>R3</th>'
+ '<th ' + sort('r4', sortBy, -1) + '>R4</th>'
+ '<th ' + sort('r5', sortBy, -1) + '>R5</th>'
+ '<th ' + sort('r6', sortBy, -1) + '>R6</th>'
+ '<th ' + sort('r7', sortBy, -1) + '>R7</th>'
+ '<th ' + sort('r8', sortBy, -1) + '>R8</th>'
+ '<th ' + sort('energy', sortBy, -1) + '>Energy</th>'
+ '<th ' + sort('energyratio', sortBy, -1) + '>%</th>'
+ '<th ' + sort('links', sortBy, -1) + '>Links</th>'
+ '<th ' + sort('s1', sortBy, -1) + '>S1</th>'
+ '<th ' + sort('s2', sortBy, -1) + '>S2</th>'
+ '<th ' + sort('s3', sortBy, -1) + '>S3</th>'
+ '<th ' + sort('s4', sortBy, -1) + '>S4</th>'
+ '<th ' + sort('APgain', sortBy, -1) + '>AP Gain</th>'
+ '<th title="Energy / AP Gain ratio" ' + sort('EAP', sortBy, -1) + '>E/AP</th></tr>';
$.each(portals, function(ind, portal) {
if (filter === 0 || filter === portal.team) {
html += '<tr class="' + (portal.team === 1 ? 'res' : (portal.team === 2 ? 'enl' : 'neutral')) + '">'
+ '<td style="">' + window.plugin.portalslist.getPortalLink(portal.portal, portal.guid) + '</td>'
+ '<td class="L' + Math.floor(portal.level) +'">' + portal.level + '</td>'
+ '<td style="text-align:center;">' + portal.team + '</td>';
var title;
var percent;
$.each([0, 1, 2, 3 ,4 ,5 ,6 ,7], function(ind, slot) {
percent = portal.resonators[slot][4] ? Math.floor(portal.resonators[slot][3]/portal.resonators[slot][4]*100) : 0;
title = 'title="owner: <b>' + portal.resonators[slot][1] + '</b><br>'
+ 'energy: ' + portal.resonators[slot][3] + ' / ' + portal.resonators[slot][4] + ' (' + percent + '%)<br>'
+ 'distance: ' + portal.resonators[slot][2] + 'm';
html += '<td class="L' + portal.resonators[slot][0] +'" ' + title + '">' + portal.resonators[slot][0] + '</td>';
});
html += '<td style="cursor:help" title="'+ portal.energy +'">' + prettyEnergy(portal.energy) + '</td>'
+ '<td style="cursor:help" title="' + portal.energy + ' / ' + portal.maxenergy +'">' + portal.energyratio + '%</td>'
+ '<td style="cursor:help" title="' + portal.links + '">' + portal.links + '</td>'
+ '<td style="cursor:help" title="'+ portal.shields[0][1] +'">' + portal.shields[0][0] + '</td>'
+ '<td style="cursor:help" title="'+ portal.shields[1][1] +'">' + portal.shields[1][0] + '</td>'
+ '<td style="cursor:help" title="'+ portal.shields[2][1] +'">' + portal.shields[2][0] + '</td>'
+ '<td style="cursor:help" title="'+ portal.shields[3][1] +'">' + portal.shields[3][0] + '</td>'
+ '<td>' + portal.APgain + '</td>'
+ '<td>' + portal.EAP + '</td>';
html+= '</tr>';
}
});
html += '</table>';
html += '<div class="disclaimer">Click on portals table headers to sort by that column. '
+ 'Click on <b>All Portals, Resistant Portals, Enlightened Portals</b> to filter<br>'
+ 'Thanks to @vita10gy & @xelio for their IITC plugins who inspired me. A <a href="https://plus.google.com/113965246471577467739">@teo96</a> production. Vive la Résistance !</div>';
window.plugin.portalslist.sortOrder = window.plugin.portalslist.sortOrder*-1;
return html;
}
window.plugin.portalslist.stats = function(sortBy) {
//console.log('** stats');
var html = '<table><tr>'
+ '<td class="filterAll" style="cursor:pointer" onclick="window.plugin.portalslist.portalTable(\'level\',-1,0)"><a href=""></a>All Portals : (click to filter)</td><td class="filterAll">' + window.plugin.portalslist.listPortals.length + '</td>'
+ '<td class="filterRes" style="cursor:pointer" class="sorted" onclick="window.plugin.portalslist.portalTable(\'level\',-1,1)">Resistant Portals : </td><td class="filterRes">' + window.plugin.portalslist.resP +' (' + Math.floor(window.plugin.portalslist.resP/window.plugin.portalslist.listPortals.length*100) + '%)</td>'
+ '<td class="filterEnl" style="cursor:pointer" class="sorted" onclick="window.plugin.portalslist.portalTable(\'level\',-1,2)">Enlightened Portals : </td><td class="filterEnl">'+ window.plugin.portalslist.enlP +' (' + Math.floor(window.plugin.portalslist.enlP/window.plugin.portalslist.listPortals.length*100) + '%)</td>'
+ '</tr>'
+ '</table>';
return html;
}
//return Html generated to export links
window.plugin.portalslist.exportLinks = function(){
var html='';
var stamp = new Date().getTime();
html+='<div><aside><a download="Ingress Export.csv" href="' + window.plugin.portalslist.export('csv') + '">Export as .csv</a></aside>'
+ '<aside><a download="Ingress Export.kml" href="' + window.plugin.portalslist.export('kml') + '">Export as .kml</a></aside>'
+ '</div>';
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 = '<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2"><Document>\n'
+ '<name>Ingress Export</name><description><![CDATA[Ingress Portals\nExported from IITC using the Portals-list plugin\n' + new Date().toLocaleString() + ']]></description>';
// define colored markers as style0 (neutral), style1 (Resistance), style2 (Enlight)
kml += '<Style id="style1"><IconStyle><Icon><href>http://maps.gstatic.com/mapfiles/ms2/micons/blue-dot.png</href></Icon></IconStyle></Style>'
+ '<Style id="style2"><IconStyle><Icon><href>http://maps.gstatic.com/mapfiles/ms2/micons/green-dot.png</href></Icon></IconStyle></Style>'
+ '<Style id="style0"><IconStyle><Icon><href>http://maps.gstatic.com/mapfiles/ms2/micons/pink-dot.png</href></Icon></IconStyle></Style>\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 = '<![CDATA['
+ '<div><table><tr><td><img style="width:100px" src="' + portal.img + '"></td><td>' + portal.address
+ '<br><a href="https://www.ingress.com/intel?latE6=' + portal.lat*1E6 + '&lngE6=' + portal.lng*1E6 + '&z=17">Link to Intel Map</a></td></tr></table>'
+ ']]>';
kml += '<Placemark><name>L' + Math.floor(portal.level) + ' - ' + portal.name + '</name>'
+ '<description>' + description + '</description>'
+ '<styleUrl>#style' + portal.team + '</styleUrl>';
//coordinates
kml += '<Point><coordinates>' + portal.lng + ',' + portal.lat + ',0</coordinates></Point>';
kml += '</Placemark>\n';
}
});
kml += '</Document></kml>';
return kml;
//console.log('** stats');
var html = '<table><tr>'
+ '<td class="filterAll" style="cursor:pointer" onclick="window.plugin.portalslist.portalTable(\'level\',-1,0)"><a href=""></a>All Portals : (click to filter)</td><td class="filterAll">' + window.plugin.portalslist.listPortals.length + '</td>'
+ '<td class="filterRes" style="cursor:pointer" class="sorted" onclick="window.plugin.portalslist.portalTable(\'level\',-1,1)">Resistant Portals : </td><td class="filterRes">' + window.plugin.portalslist.resP +' (' + Math.floor(window.plugin.portalslist.resP/window.plugin.portalslist.listPortals.length*100) + '%)</td>'
+ '<td class="filterEnl" style="cursor:pointer" class="sorted" onclick="window.plugin.portalslist.portalTable(\'level\',-1,2)">Enlightened Portals : </td><td class="filterEnl">'+ window.plugin.portalslist.enlP +' (' + Math.floor(window.plugin.portalslist.enlP/window.plugin.portalslist.listPortals.length*100) + '%)</td>'
+ '</tr>'
+ '</table>';
return html;
}
// A little helper functon so the above isn't so messy
@ -383,29 +296,29 @@ window.plugin.portalslist.portalTableSort = function(name, by) {
// hover: show address
// code from getPortalLink function by xelio from iitc: AP List - https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/ap-list.user.js
window.plugin.portalslist.getPortalLink = function(portal,guid) {
var latlng = [portal.locationE6.latE6/1E6, portal.locationE6.lngE6/1E6].join();
var jsSingleClick = 'window.renderPortalDetails(\''+guid+'\');return false';
var jsDoubleClick = 'window.zoomToAndShowPortal(\''+guid+'\', ['+latlng+']);return false';
var perma = '/intel?latE6='+portal.locationE6.latE6+'&lngE6='+portal.locationE6.lngE6+'&z=17&pguid='+guid;
//Use Jquery to create the link, which escape characters in TITLE and ADDRESS of portal
var a = $('<a>',{
"class": 'help',
text: portal.portalV2.descriptiveText.TITLE,
title: portal.portalV2.descriptiveText.ADDRESS,
href: perma,
onClick: jsSingleClick,
onDblClick: jsDoubleClick
})[0].outerHTML;
var div = '<div style="max-height: 15px !important; min-width:140px !important;max-width:180px !important; overflow: hidden; text-overflow:ellipsis;">'+a+'</div>';
return div;
var latlng = [portal.locationE6.latE6/1E6, portal.locationE6.lngE6/1E6].join();
var jsSingleClick = 'window.renderPortalDetails(\''+guid+'\');return false';
var jsDoubleClick = 'window.zoomToAndShowPortal(\''+guid+'\', ['+latlng+']);return false';
var perma = '/intel?latE6='+portal.locationE6.latE6+'&lngE6='+portal.locationE6.lngE6+'&z=17&pguid='+guid;
//Use Jquery to create the link, which escape characters in TITLE and ADDRESS of portal
var a = $('<a>',{
"class": 'help',
text: portal.portalV2.descriptiveText.TITLE,
title: portal.portalV2.descriptiveText.ADDRESS,
href: perma,
onClick: jsSingleClick,
onDblClick: jsDoubleClick
})[0].outerHTML;
var div = '<div style="max-height: 15px !important; min-width:140px !important;max-width:180px !important; overflow: hidden; text-overflow:ellipsis;">'+a+'</div>';
return div;
}
var setup = function() {
$('#toolbox').append(' <a onclick="window.plugin.portalslist.displayPL(0)" title="Display a list of portals in the current view">Portals list</a>');
$('head').append('<style>' +
'.ui-dialog-portalslist {position: absolute !important; top: 10px !important; left: 30px !important;max-width:800px !important; width:733px !important;}' +
$('#toolbox').append(' <a onclick="window.plugin.portalslist.displayPL()" title="Display a list of portals in the current view">Portals list</a>');
$('head').append('<style>' +
'.ui-dialog-portalslist {position: absolute !important; top: 10px !important; left: 30px !important;max-width:800px !important; width:auto !important;}' +
'#portalslist table {margin-top:5px; border-collapse: collapse; empty-cells: show; width:100%; clear: both;}' +
'#portalslist table td, #portalslist table th {border-bottom: 1px solid #0b314e; padding:3px; color:white; background-color:#1b415e}' +
'#portalslist table tr.res td { background-color: #005684; }' +
@ -415,13 +328,13 @@ var setup = function() {
'#portalslist table td { text-align: center;}' +
'#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.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.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;}' +

View File

@ -1,7 +1,7 @@
// ==UserScript==
// @id iitc-plugin-scoreboard@vita10gy
// @name IITC plugin: show a localized scoreboard.
// @version 0.1.6.@@DATETIMEVERSION@@
// @version 0.1.7.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
@ -69,7 +69,6 @@ window.plugin.scoreboard.compileStats = function() {
var team = getTeam(val.options.data);
var player = val.options.data.creator.creatorGuid;
window.plugin.scoreboard.initPlayer(player,team);
// Google sends fields long since dead in the data. This makes sure it's still actually up.
@ -109,29 +108,30 @@ window.plugin.scoreboard.compileStats = function() {
$.each(window.links, function(qk, link) {
somethingInView = true;
var team = getTeam(link.options.data);
var player = link.options.data.creator.creatorGuid;
window.plugin.scoreboard.initPlayer(player, team);
scores['team'][team]['count_links']++;
scores['player'][player]['count_links']++;
var linkLength = window.plugin.scoreboard.portalDistance(link.options.data.edge.destinationPortalLocation,link.options.data.edge.originPortalLocation);
scores['team'][team]['link_length'] += linkLength;
scores['player'][player]['link_length'] += linkLength;
var largestLink = scores['team'][team]['largest']['link'];
if(largestLink === undefined || largestLink.distance < linkLength) {
largestLink = {};
largestLink.distance = linkLength;
largestLink.player = player;
if(link.options.data.creator !== undefined) {
var player = link.options.data.creator.creatorGuid;
window.plugin.scoreboard.initPlayer(player, team);
scores['team'][team]['count_links']++;
scores['player'][player]['count_links']++;
var linkLength = window.plugin.scoreboard.portalDistance(link.options.data.edge.destinationPortalLocation,link.options.data.edge.originPortalLocation);
scores['team'][team]['link_length'] += linkLength;
scores['player'][player]['link_length'] += linkLength;
var largestLink = scores['team'][team]['largest']['link'];
if(largestLink === undefined || largestLink.distance < linkLength) {
largestLink = {};
largestLink.distance = linkLength;
largestLink.player = player;
}
scores['team'][team]['largest']['link'] = largestLink;
//var largestLink = scores['player'][player]['largest']['link'];
//if(largestLink === undefined || largestLink < linkLength) {
// largestLink = linkLength;
//}
//scores['player'][player]['largest']['link'] = largestLink;
}
scores['team'][team]['largest']['link'] = largestLink;
//var largestLink = scores['player'][player]['largest']['link'];
//if(largestLink === undefined || largestLink < linkLength) {
// largestLink = linkLength;
//}
//scores['player'][player]['largest']['link'] = largestLink;
});
$.each(window.portals, function(qk, portal) {
somethingInView = true;
@ -204,6 +204,7 @@ window.plugin.scoreboard.fieldInfo = function(field) {
+ window.digits(field.options.data.entityScore.entityScore)
+ ' - ' + window.getPlayerName(field.options.data.creator.creatorGuid)
+ '</div>';
} else {
retVal = 'N/A';
}
@ -224,6 +225,7 @@ window.plugin.scoreboard.fieldInfoArea = function(field) {
+ window.digits(Math.round(field.options.data.fieldArea))
+ ' - ' + window.getPlayerName(field.options.data.creator.creatorGuid)
+ '</div>';
} else {
retVal = 'N/A';
}

0
screenshots/plugin_portal_counts.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

6158
website/assets/bootstrap/css/bootstrap.css vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

2276
website/assets/bootstrap/js/bootstrap.js vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,5 @@
body {
padding-top: 10px;
background: url('../img/bg.jpg');
}

BIN
website/assets/img/bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

BIN
website/assets/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
website/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -35,11 +35,30 @@ function loadUserScriptHeader($path)
}
?>
<?php echo "<?xml version=\"1.0\" encoding=\"utf8\"?>\n" ?>
<html>
<!DOCTYPE html>
<html lang="en">
<!-- ******** head ******** -->
<head>
<title>Ingress Intel Total Conversion</title>
</head>
<meta charset="utf-8">
<title>Ingress Intel Total Conversion</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
<link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<link href="assets/css/style.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="assets/js/html5shiv.js"></script>
<![endif]-->
<style>
.nowrap { white-space: nowrap; }
</style>
<?php
if ( file_exists ( 'tracking.php' ) )
@ -48,157 +67,112 @@ if ( file_exists ( 'tracking.php' ) )
}
?>
<style>
body
{
font-family: sans-serif;
background: #fff;
color: #000;
}
a:link, a:visited { text-decoration: none; }
a:hover { text-decoration: underline; }
</style>
</head>
<!-- ******** body ******** -->
<body>
<h1>Ingress Intel Total Conversion</h1>
<div class="container-fluid">
<p>
IITC is <a href="https://github.com/breunigs/ingress-intel-total-conversion#readme">dead</a> - long live IITC!
</p>
<!-- **** page header **** -->
<div class="row-fluid">
<div class="span12 header well well-small">
<div class="media">
<a class="pull-left" href="./">
<img class="media-object" src="assets/img/logo.png" title="IITC" alt="IITC Logo">
</a>
<div class="media-body">
<h1 class="media-heading">Ingress Intel Total Conversion</h1>
<!--
<a href="//plus.google.com/105383756361375410867?prsrc=3" rel="publisher" style="text-decoration:none;">
<img src="//ssl.gstatic.com/images/icons/gplus-16.png" alt="Google+" style="border:0;width:16px;height:16px;"/></a>
-->
</div>
</div>
</div>
</div>
<p>
The IITC mod is an open source project. Since the original closed, I resurrected it and will try to continue development.
</p>
<p>
If you're interested in further development, come on over to
<a href="https://github.com/jonatkins/ingress-intel-total-conversion">the github page</a>. If you just want to install
and use it, read on.
</p>
<!-- **** top alert box **** -->
<div class="alert alert-block alert-info">
IITC now has a
<a href="https://plus.google.com/105383756361375410867"><img src="//ssl.gstatic.com/images/icons/gplus-16.png" alt="Google+" style="border:0;width:16px;height:16px;"/> Google+ page</a>.
Follow this to keep up to date on the latest news.
</div>
<p>
<b>Note</b>: This site and the scripts are not officially affiliated with Ingress or Niantic Labs at Google.
Using these scripts is likely to be considered against the Ingress Terms of Service. You do this at your own risk.
</p>
<!-- **** two column body area **** -->
<h2>Downloads</h2>
<h3>IITC - browser addon</h3>
<div class="row-fluid">
<!-- **** navigation **** -->
<div class="span3 well">
<ul class="nav nav-list nowrap">
<?php
if ( $path != "release" )
print "<p><b>NOTE</b>: the <b>$path</b> build is currently selected. <a href=\"/\">Return to main build</a>.</p>";
?>
$pages = Array (
'home' => '<i class="icon-home"></i> Home',
'news' => '<i class="icon-list"></i> News',
'faq' => '<i class="icon-question-sign"></i> FAQ',
'desktop' => '<i class="icon-chevron-right"></i> Desktop',
'mobile' => '<i class="icon-chevron-right"></i> Mobile',
'developer' => '<i class="icon-cog"></i> Developers',
'about' => '<i class="icon-info-sign"></i> About',
);
<p>
<b>IMPORTANT!</b>: You <b>must</b> uninstall the original IITC before installing this version. Failure to do this
will result in multiple copes installed which I expect will cause a LOT of issues.
</p>
$page = $_REQUEST['page'];
if ( ! array_key_exists ( $page, $pages ) )
$page = "home";
<p>
<b>NOTE</b>: The first release available here was not configured correctly for auto updates.
If you installed before this note appeared (22nd March 2013) you will need to
manually uninstall IITC and all plugins, then reinstall from below. Going forward, updates will work correctly
(for Chrome + Tampermoneky and Firefox + Greasemonkey users).
</p>
<?php
$iitc_details = loadUserScriptHeader ( "$path/total-conversion-build.user.js" );
?>
<p>
<a href="<?php print $path;?>/total-conversion-build.user.js">IITC main script</a> - <i>version <?php print $iitc_details['@version'];?></i>.
</p>
<h4>Plugins</h4>
<ul>
<?php
foreach ( glob ( "$path/plugins/*.user.js" ) as $path )
foreach ( $pages as $key => $name )
{
$name = basename ( $path, ".user.js" );
# before 'desktop', add a nav-header
if ( $key == 'desktop' )
print "<li class=\"nav-header\">Downloads</li>";
$details = loadUserScriptHeader ( $path );
if ( $key == "home" )
$url = "./";
else
$url = "?page=$key";
print "<li>\n";
print "<li".($page == $key ? ' class="active"' :'')."><a href=\"$url\">$name</a></li>\n";
print "<a href=\"$path\">".$details['@name']."</a> <i>$name - version ".$details['@version']."</i>: <br/>\n";
print $details['@description'];
print "</li>\n";
# after 'mobile', add a horizontal seperator
if ( $key == 'mobile' )
print "<li class=\"divider\"></li>";
}
?>
</ul>
<h4>Installation</h4>
<p>Installation varies depending on browser.</p>
<p>
<b>Chrome</b>:
<a href="https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo">Tampermonkey</a>
is highly recommended. (Userscripts can be installed directly within the 'extensions' settings, but will not auto update.)
</p>
<p>
<b>Firefox</b>:
The <a href="https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/">Greasemonkey</a> add-on can be used.
</p>
<p>
<b>Opera</b>:
There is a setting for a userscripts folder.
</p>
<h3>IITC - mobile</h3>
<p>
A proper version of mobile will be available in the future. Until then, here's the last build
available from the original IITC page.
</p>
<p>
<a href="mobile/IITC-Mobile-latest.apk">Download</a>.
</p>
<p>
This is likely to have some issues, but should work well enough for now.
</p>
</ul>
</div>
<!-- **** end of navigation **** -->
<h2>Credits</h2>
<!-- **** page body **** -->
<div class="span9 well">
<p>
Nearly all the work here is by others.
<a href="https://github.com/breunigs">Stefan Breunig</a> was the main driving force. See the
<a href="https://github.com/jonatkins/ingress-intel-total-conversion/commits/master">github commit log</a>
for full details.
</p>
<?php
include "page/$page.php";
?>
<h2>License</h2>
</div>
<!-- **** end of page body **** -->
<pre>
Copyright © 2013 Stefan Breunig
</div> <!-- row - for navigation + page body -->
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all
copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
</pre>
<!-- **** footer **** -->
<div class="alert alert-block alert-error">
This site and the scripts are not officially affiliated with Ingress or Niantic Labs at Google.
Using these scripts is likely to be considered against the Ingress Terms of Service. Any use is at your own risk.
</div>
</div> <!-- container -->
<!-- ******** javascript includes ******** -->
<script src="http://code.jquery.com/jquery.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
</body>

42
website/page/about.php Normal file
View File

@ -0,0 +1,42 @@
<h2>About IITC</h2>
<p>
Ingress Intel Total Conversion (IITC) is a browser modification to the <a href="http://www.ingress.com/">Ingress</a>
<a href="http://www.ingress.com/intel">intel map</a>.
</p>
<p>
IITC is an open source project. New developers are welcome - see the <a href="?page=develop">developers page</a>
for details.
</p>
<h3>Credits</h3>
<p>
Nearly all the work here is by others.
<a href="https://github.com/breunigs">Stefan Breunig</a> was the main driving force. See the
<a href="https://github.com/jonatkins/ingress-intel-total-conversion/commits/master">Github commit log</a>
for full details.
</p>
<h3>License</h3>
<pre>
Copyright © 2013 Stefan Breunig, Jon Atkins and others
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all
copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
</pre>

117
website/page/desktop.php Normal file
View File

@ -0,0 +1,117 @@
<h2>IITC Browser Addon</h2>
<?php
if ( $path != "release" )
print "<div class=\"alert alert-block alert-error\"><b>NOTE</b>: the <b>$path</b> build is currently selected. <a href=\"?page=desktop\">Return to the standard build</a>.</div>";
?>
<div class="alert alert-block">
<p>
<b>IMPORTANT!</b>: You <b>must</b> uninstall the original IITC before installing this version. Failure to do this
will result in multiple copes installed which I expect will cause a LOT of issues.
</p>
<p>
<b>NOTE</b>: The first release available on this web site was not configured correctly for auto updates.
If you installed before this note appeared <span class="nowrap">(22nd March 2013)</span> you will need to
manually uninstall IITC and all plugins, then reinstall from below. Going forward, updates will work correctly
(for Chrome + Tampermoneky and Firefox + Greasemonkey users).
</p>
</div>
<h3>Requirements</h3>
<p>
IITC will work in the Chrome or Firefox browsers. It should also work with Opera and other browsers supporting
userscripts, but these are far less tested. For Android phones, please see the <a href="?page=mobile">mobile</a> page.
</p>
<h4>Chrome</h4>
<p>
Although it is possible to install userscripts directly as extensions, the recommended method is to use
<a href="https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo">Tampermonkey</a>.
Once Tampermonkey is installed, click on the "Download" button below and click "OK" on the two dialogs to install.
</p>
<h4>Firefox</h4>
<p>
Install the <a href="https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/">Greasemonkey</a> Firefox add-on.
Once installed, click the "Download" then "Install" on the dialog.
</p>
<h4>Other browsers</h4>
<p>
Check your browser documentation for details on installing userscripts.
</p>
<h3>Download</h3>
<?php
$iitc_details = loadUserScriptHeader ( "$path/total-conversion-build.user.js" );
$iitc_version = preg_replace ( '/^(\d+\.\d+\.\d+)\.(\d{8}\.\d{6})/', '\1<small class="muted">.\2</small>', $iitc_details['@version'] );
?>
<p>
IITC version <?php print $iitc_version;?>
</p>
<a class="btn btn-large btn-primary" href="<?php print $path;?>/total-conversion-build.user.js">Download</a>
<hr>
<h4>Plugins</h4>
<p>
Plugins extend/modify the IITC experience. You do <b>not</b> need to install all plugins. Some are only useful to
a minority of users.
</p>
<table class="table table-condensed table-hover">
<thead>
<tr>
<th>Name</th>
<th>ID / Version</th>
<th>Description</th>
<th>Download</th>
</tr>
</thead>
<tbody>
<?php
foreach ( glob ( "$path/plugins/*.user.js" ) as $path )
{
$basename = basename ( $path, ".user.js" );
$details = loadUserScriptHeader ( $path );
print "<tr id=\"plugin-$basename\">\n";
# remove 'IITC Plugin: ' prefix if it's there, for neatness
$name = preg_replace ( '/^IITC plugin: /i', '', $details['@name'] );
# format extended version info in less prominant font
$version = preg_replace ( '/^(\d+\.\d+\.\d+)\.(\d{8}\.\d{6})/', '\1<small class="muted">.\2</small>', $details['@version'] );
# remove unneeded prefix from description
$description = preg_replace ( '/^\[[^]]*\] */', '', $details['@description'] );
print "<td>$name</td>";
print "<td>$basename<br />$version</td>";
print "<td>$description</td>";
print "<td><a href=\"$path\" class=\"btn btn-small btn-primary\">Download</a></td>";
# print "<a href=\"$path\">".$details['@name']."</a> <i>$name - version ".$details['@version']."</i>: <br/>\n";
# print $details['@description'];
print "</tr>\n";
}
?>
</tbody>
</table>

View File

@ -0,0 +1,6 @@
<h2>Developers</h2>
<p>
If you would like to contribute, please visit our
<a href="https://github.com/jonatkins/ingress-intel-total-conversion/">Github page</a>.
</p>

56
website/page/faq.php Normal file
View File

@ -0,0 +1,56 @@
<h2>Frequently Asked Questions</h2>
<ul>
<li>
<h4 id="no-penalty">Will Google/Niantic penalise me for using IITC?</h4>
There have been rumours that Niantic/Google have been asking people to stop using IITC, and penalising users
with a loss of points for doing so. This, as far as we can tell, is a hoax. Consider the following:
<ol>
<li>Before penalising users, they would request that this site is taken down. This has not happened.</li>
<li>Any such request would come via email, not via a Google+ message. Ingress is not closely tied into the Google
account system unlike, for example, Gmail; an email, like they already use for portal submissions, is the only
communication method available.</li>
<li>The message I've seen talks about "points" - when they should be talking about "AP".</li>
</ol>
Some notes from a Hangout available <a href="https://plus.google.com/111333123856542807695/posts/QtiFdoRuh6w">here</a>
with further details.
</li>
<li>
<h4 id="broken">No portals are displayed on the map!</h4>
Please update to the latest IITC to fix the map. If you use Chrome+Tampermonkey, or Firefox+Greasemonkey,
just triggering a manual update should do this. Alternatively, re-download and install from the
<a href="?page=desktop">download page</a>.
</li>
<li>
<h4 id="bluemap">What happened to the nice blue map?</h4>
Unfortunately this is no longer available, as IITC far exceeds the free quota offered by Cloudmade, the map tile provider.
You can use the layer selection menu to choose "Default Ingress Map", but this doesn't work as smoothly as we'd like.
Options to allow users to register their own free accounts for this are being considered - watch this space.
</li>
<li>
<h4 id="cheating">Isn't using IITC cheating/an unfair advantage?</h4>
IITC only uses data that is sent from the Ingress servers to the browser - it just displays it in an easy to use format.
There were, and continue to be, other browser add-ons that display this data - just not widely available.
Having a good quality, feature rich add-on, available to all - Enlightened and Resistance - ensures one side does not
have an unfair advantage.
</li>
<li>
<h4 id="export">Can you add an export feature?</h4>
No. As it stands IITC is tolerated, but not officially accepted, by Niantic/Google. Adding in features that
allow exporting of data outside the browser environment, or break additional Ingress terms of service
is likely to trigger a takedown request from Google.
</li>
<li>
<h4 id="otherapp">I used another <i>{ingress mod/IITC plugin}</i> and it's broken - can you fix it?</h4>
Probably not, no. If the plugin is not listed on this site, it's not part of my IITC distribution.
I do accept new plugins (see the Developer page for links to Github), but I do not accept any that
allow export of Ingress data outside of the browser or make use of data not retrieved by the standard intel website.
</li>
</ul>

27
website/page/home.php Normal file
View File

@ -0,0 +1,27 @@
<h2>Welcome</h2>
<p>
Welcome to the home page of <abbr title="Ingress Intel Total Conversion">IITC</abbr>.
</p>
<p>
IITC is a browser add-on that modifies the Ingress intel map. It is faster than the standard site, and
offers many more features. It is available for
<a href="?page=desktop">desktop browsers</a>, such as Chrome and Firefox, and as a
<a href="?page=mobile">mobile application</a>.
</p>
<h3>Latest news</h3>
<h4>28th April 2013</h4>
<p>
New website launched! A major revamp of the website has been made. Thanks to the various users who contributed
logos and site templates.
</p>
<h4>26th April 2013</h4>
<p>
IITC 0.11.2 released. This has a minor fix relating to portal visibility at different zoom levels. We now have to
match the standard intel site. This does, unfortunately, mean you need to zoom even closer to see unclaimed portals.
Also, an update to the scoreboard plugin has been released that should make it work again.
</p>

44
website/page/mobile.php Normal file
View File

@ -0,0 +1,44 @@
<h2>IITC Mobile</h2>
<p>
IITC Mobile is an Android application. It works as a simple web browser, with the IITC browser add-on
embedded within it.
</p>
<h3>Requirements</h3>
<p>
Android 4.0 (Ice Cream Sandwich) at a minimum. Android 4.1+ (Jellybean) is highly recommended at this time due to bugs.
</p>
<h3>Installation</h3>
<p>
You need to enable applications installed from unknown sources in your phone settings. Once done, download and
install from the link below.
</p>
<h3>Known issues</h3>
<p>
IITC Mobile is still in the early stages of development. Many things do not yet work right. Major known issues are:
<ol>
<li>The layer chooser selects the first map layer every time it's opened.</li>
<li>Some plugins do not work well, or at all, at this time.</li>
<li>Serious issues exist on Android 4.0 devices.
<a href="https://github.com/jonatkins/ingress-intel-total-conversion/issues/90">details</a>.</li>
</ol>
</p>
<h3>Download</h3>
<p>
IITC Mobile version 0.3 (with IITC version 0.11.2).
</p>
<a href="mobile/IITC-Mobile-0.3.apk" class="btn btn-large btn-primary">Download</a>

74
website/page/news.php Normal file
View File

@ -0,0 +1,74 @@
<h2>News</h2>
<h4>28th April 2013</h4>
<p>
New website launched! A major revamp of the website has been made. Thanks to the various users who contributed
logos and site templates.
</p>
<h4>26th April 2013</h4>
<p>
IITC 0.11.2 released. This has a minor fix relating to portal visibility at different zoom levels. We now have to
match the standard intel site. This does, unfortunately, mean you need to zoom even closer to see unclaimed portals.
Also, an update to the scoreboard plugin has been released that should make it work again.
</p>
<h4>24th April 2013</h4>
<p>
IITC 0.11.0 is a critical release that fixes the display of portals on the map. Niantic/Google have changed
the way portals are retrieved from the servers and this broke the old IITC. There are reports of some issues
with failure to display links/fields in some areas - we're working on it.
</p>
<p>
Also, IITC Mobile 0.3 has been released. As well as including the above 0.11.0 IITC build, it also contains
experimental support for plugins. This is still in the early stages of development - not all plugins work
well (or at all) for mobile.
Plugins are disabled by default - you need to choose which plugins to enable in the app settings.
</p>
<p>
<b>Update</b> IITC 0.11.1 has been released. This fixes issues where not all links displayed in some areas, and
some bugs in the changed code. An updated IITC Mobile 0.3 includes this new version too.
</p>
<h4>12th April 2013</h4>
<p>
IITC 0.10.5, an urgent release that (unfortunately) removes the default CloudMade map tiles. This is required because
IITC is popular enough to exceed their free quota significantly. Also, IITC Mobile 0.2.8 has been released, with
the same change. (0.10.4 was available for a short while, without the MapQuest map layer. This had zoom-related issues
on IITC Mobile)
</p>
<h4>4th April 2013</h4>
<p>
IITC 0.10.3 released. This is a minor update that prevents certain types of system messages from appearing in the
faction chat window. No plugin changes. (A 0.10.2 was released a few hours earlier, but this was found to have issues
in certain situations).
</p>
<h4>1st April 2013</h4>
<p>
No fooling - new 0.10.1 IITC released. Changes include improved chat display for "@player" messages, and
improvements to the 'poslinks' window. Also, updates to several plugins, including <i>ap-list</i>, <i>player-tracker</i>,
<i>portals-list</i> and <i>show-linked-portals</i>. Also, new plugins include
<i>keys</i> and <i>keys-on-map</i> (for MANUAL tracking of your keys), <i>portal-counts</i> and <i>privacy-view</i>.
</p>
<p>
Also, IITC Mobile 0.2.4 is available. This includes the 0.10.1 IITC, plus new settings. One to choose between mobile
and desktop versions of the site, and another developer-only option to load IITC from an external web server. This
will make it easier for others to work on improving the IITC Mobile experience without knowledge of building Android
applications.
</p>
<h4>28th March 2013</h4>
<p>
IITC Mobile 0.2.3 released. This has new icons, should improve stability, and includes the latest IITC 0.10.0. Users of older versions will have to
uninstall before you can install this build. It can be found below in the <a href="#mobile">mobile</a> section.
</p>
<h4>25th March 2013</h4>
<p>
IITC 0.10.0 released. The major change in this version is that all external resources (icons, external scripts)
have now been embedded within the scripts themselves. Several plugins have been updated in the same way. Other plugin
updates, and a new plugin, are also included.
</p>