Merge branch 'master' into highlighter
This commit is contained in:
commit
8fb3d0ed0f
@ -118,8 +118,9 @@ window.setupMap = function() {
|
|||||||
//MapQuest offer tiles - http://developer.mapquest.com/web/products/open/map
|
//MapQuest offer tiles - http://developer.mapquest.com/web/products/open/map
|
||||||
//their usage policy has no limits (except required notification above 4000 tiles/sec - we're perhaps at 50 tiles/sec based on CloudMade stats)
|
//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 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', mazZoom: 18, detectRetena: true, subdomains: mqSubdomains};
|
||||||
var mqMap = new L.TileLayer('http://{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',mqMapOpt);
|
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
|
//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};
|
//var mqSatOpt = {attribution: 'Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency', mazZoom: 18, detectRetena: true, subdomains: mqSubdomains};
|
||||||
//var mqSat = new L.TileLayer('http://{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg',mqSatOpt);
|
//var mqSat = new L.TileLayer('http://{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg',mqSatOpt);
|
||||||
@ -128,8 +129,8 @@ window.setupMap = function() {
|
|||||||
/*0*/ mqMap,
|
/*0*/ mqMap,
|
||||||
/*1*/ new L.Google('INGRESS'),
|
/*1*/ new L.Google('INGRESS'),
|
||||||
/*2*/ new L.Google('ROADMAP'),
|
/*2*/ new L.Google('ROADMAP'),
|
||||||
/*3*/ new L.Google('SATELLITE'),
|
/*3*/ new L.Google('SATELLITE',{maxZoom:20}),
|
||||||
/*4*/ new L.Google('HYBRID')
|
/*4*/ new L.Google('HYBRID',{maxZoom:20})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
10
code/chat.js
10
code/chat.js
@ -410,12 +410,12 @@ window.chat.renderMsg = function(msg, nick, time, team, msgToPlayer, systemNarro
|
|||||||
var s = 'style="cursor:pointer; color:'+color+'"';
|
var s = 'style="cursor:pointer; color:'+color+'"';
|
||||||
var title = nick.length >= 8 ? 'title="'+nick+'" class="help"' : '';
|
var title = nick.length >= 8 ? 'title="'+nick+'" class="help"' : '';
|
||||||
var i = ['<span class="invisep"><</span>', '<span class="invisep">></span>'];
|
var i = ['<span class="invisep"><</span>', '<span class="invisep">></span>'];
|
||||||
return '<tr><td>'+t+'</td><td>'+i[0]+'<mark class="nickname" onclick="window.chat.nicknameClicked(event, \'' + nick + '\')" ' + s + '>'+ nick+'</mark>'+i[1]+'</td><td>'+msg+'</td></tr>';
|
return '<tr><td>'+t+'</td><td>'+i[0]+'<mark class="nickname" ' + s + '>'+ nick+'</mark>'+i[1]+'</td><td>'+msg+'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
window.chat.addNickname= function(nick){
|
window.chat.addNickname= function(nick){
|
||||||
var c = document.getElementById("chattext");
|
var c = document.getElementById("chattext");
|
||||||
c.value = [c.value, nick, " "].join(" ").trim() + " ";
|
c.value = [c.value.trim(), nick].join(" ").trim() + " ";
|
||||||
c.focus()
|
c.focus()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -589,7 +589,11 @@ window.chat.setup = function() {
|
|||||||
window.requests.addRefreshFunction(chat.request);
|
window.requests.addRefreshFunction(chat.request);
|
||||||
|
|
||||||
var cls = PLAYER.team === 'ALIENS' ? 'enl' : 'res';
|
var cls = PLAYER.team === 'ALIENS' ? 'enl' : 'res';
|
||||||
$('#chatinput mark').addClass(cls)
|
$('#chatinput mark').addClass(cls);
|
||||||
|
|
||||||
|
$(window).on('click', '.nickname', function(event) {
|
||||||
|
window.chat.nicknameClicked(event, $(this).text());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -105,7 +105,15 @@ window.handleDataResponse = function(data, textStatus, jqXHR) {
|
|||||||
&& urlPortal !== ent[0]
|
&& urlPortal !== ent[0]
|
||||||
) return;
|
) return;
|
||||||
|
|
||||||
|
if('imageByUrl' in ent[2] && 'imageUrl' in ent[2].imageByUrl) {
|
||||||
|
if(window.location.protocol === 'https:') {
|
||||||
|
ent[2].imageByUrl.imageUrl = ent[2].imageByUrl.imageUrl.indexOf('www.panoramio.com') !== -1
|
||||||
|
? ent[2].imageByUrl.imageUrl.replace(/^http:\/\/www/, 'https://ssl').replace('small', 'medium')
|
||||||
|
: ent[2].imageByUrl.imageUrl.replace(/^http:\/\//, '//');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ent[2].imageByUrl = {'imageUrl': DEFAULT_PORTAL_IMG};
|
||||||
|
}
|
||||||
|
|
||||||
ppp.push(ent); // delay portal render
|
ppp.push(ent); // delay portal render
|
||||||
} else if(ent[2].edge !== undefined) {
|
} else if(ent[2].edge !== undefined) {
|
||||||
|
@ -44,10 +44,7 @@ window.renderPortalDetails = function(guid) {
|
|||||||
var resoDetails = '<table id="resodetails">' + getResonatorDetails(d) + '</table>';
|
var resoDetails = '<table id="resodetails">' + getResonatorDetails(d) + '</table>';
|
||||||
|
|
||||||
setPortalIndicators(d);
|
setPortalIndicators(d);
|
||||||
var img = d.imageByUrl && d.imageByUrl.imageUrl
|
var img = d.imageByUrl.imageUrl;
|
||||||
? d.imageByUrl.imageUrl
|
|
||||||
: DEFAULT_PORTAL_IMG;
|
|
||||||
|
|
||||||
var lat = d.locationE6.latE6;
|
var lat = d.locationE6.latE6;
|
||||||
var lng = d.locationE6.lngE6;
|
var lng = d.locationE6.lngE6;
|
||||||
var perma = '/intel?latE6='+lat+'&lngE6='+lng+'&z=17&pguid='+guid;
|
var perma = '/intel?latE6='+lat+'&lngE6='+lng+'&z=17&pguid='+guid;
|
||||||
|
@ -19,6 +19,14 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#geosearch {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#geosearchwrapper img {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
#chatcontrols {
|
#chatcontrols {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @id iitc-plugin-ap-list@xelio
|
// @id iitc-plugin-ap-list@xelio
|
||||||
// @name IITC plugin: AP List
|
// @name IITC plugin: AP List
|
||||||
// @version 0.5.1.@@DATETIMEVERSION@@
|
// @version 0.5.2.@@DATETIMEVERSION@@
|
||||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||||
// @updateURL @@UPDATEURL@@
|
// @updateURL @@UPDATEURL@@
|
||||||
// @downloadURL @@DOWNLOADURL@@
|
// @downloadURL @@DOWNLOADURL@@
|
||||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] List top 10 portals by AP of either faction. Other functions and controls please refer to the Userguide.
|
// @description [@@BUILDNAME@@-@@BUILDDATE@@] List portals by AP of either faction or by effective level. Other functions and controls please refer to the Userguide.
|
||||||
// @include https://www.ingress.com/intel*
|
// @include https://www.ingress.com/intel*
|
||||||
// @include http://www.ingress.com/intel*
|
// @include http://www.ingress.com/intel*
|
||||||
// @match https://www.ingress.com/intel*
|
// @match https://www.ingress.com/intel*
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @id iitc-plugin-ipas-link@graphracer
|
// @id iitc-plugin-ipas-link@graphracer
|
||||||
// @name IITC Plugin: simulate an attack on portal
|
// @name IITC Plugin: simulate an attack on portal
|
||||||
// @version 0.1.1.@@DATETIMEVERSION@@
|
// @version 0.2.0.@@DATETIMEVERSION@@
|
||||||
// @namespace https://github.com/xosofox/IPAS
|
// @namespace https://github.com/xosofox/IPAS
|
||||||
// @updateURL @@UPDATEURL@@
|
// @updateURL @@UPDATEURL@@
|
||||||
// @downloadURL @@DOWNLOADURL@@
|
// @downloadURL @@DOWNLOADURL@@
|
||||||
@ -30,16 +30,34 @@ window.plugin.ipasLink.addLink = function(d) {
|
|||||||
$('.linkdetails').append('<aside><a href="http://ipas.graphracer.com/index.html#' + window.plugin.ipasLink.getHash(d.portalDetails) + '" target="ipaswindow" title="Use IAPS to simulate an attack on this portal">Simulate attack</a></aside>');
|
$('.linkdetails').append('<aside><a href="http://ipas.graphracer.com/index.html#' + window.plugin.ipasLink.getHash(d.portalDetails) + '" target="ipaswindow" title="Use IAPS to simulate an attack on this portal">Simulate attack</a></aside>');
|
||||||
}
|
}
|
||||||
|
|
||||||
window.plugin.ipasLink.getHash = function(d) {
|
window.plugin.ipasLink.getHash = function (d) {
|
||||||
var hashParts=[];
|
var hashParts = [];
|
||||||
$.each(d.resonatorArray.resonators, function(ind, reso) {
|
$.each(d.resonatorArray.resonators, function (ind, reso) {
|
||||||
if (reso) {
|
if (reso) {
|
||||||
hashParts.push(reso.level + "," + reso.distanceToPortal + "," + reso.energyTotal);
|
hashParts.push(reso.level + "," + reso.distanceToPortal + "," + reso.energyTotal);
|
||||||
} else {
|
} else {
|
||||||
hashParts.push(1 + "," + 35 + "," + 0); // Dummy values, the only important one is energy=0
|
hashParts.push("1,20,0");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return hashParts.join(";")+"|" + "0,0,0,0"; //shields not implemented yet
|
var resos = hashParts.join(";");
|
||||||
|
|
||||||
|
hashParts = [];
|
||||||
|
$.each(d.portalV2.linkedModArray, function (ind, mod) {
|
||||||
|
//shields only, so far...
|
||||||
|
var s = "0";
|
||||||
|
if (mod) {
|
||||||
|
if (mod.type === "RES_SHIELD") {
|
||||||
|
s = mod.rarity.charAt(0).toLowerCase();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
hashParts.push(s);
|
||||||
|
});
|
||||||
|
var shields = hashParts.join(",");
|
||||||
|
return resos + "|" + shields;
|
||||||
|
}
|
||||||
|
|
||||||
|
var setup = function () {
|
||||||
|
window.plugin.ipasLink.setupCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
var setup = function() {
|
var setup = function() {
|
||||||
|
@ -28,7 +28,7 @@ window.plugin.scaleBar.setup = function() {
|
|||||||
// Before you ask: yes, I explicitely turned off imperial units. Imperial units
|
// Before you ask: yes, I explicitely turned off imperial units. Imperial units
|
||||||
// are worse than Internet Explorer 6 whirring fans combined. Upgrade to the metric
|
// are worse than Internet Explorer 6 whirring fans combined. Upgrade to the metric
|
||||||
// system already.
|
// system already.
|
||||||
window.map.addControl(new L.Control.Scale({position: 'topleft', imperial: false}));
|
window.map.addControl(new L.Control.Scale({position: 'topleft', imperial: false, maxWidth: 200}));
|
||||||
};
|
};
|
||||||
|
|
||||||
var setup = window.plugin.scaleBar.setup;
|
var setup = window.plugin.scaleBar.setup;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user