Merge branch 'master' of github.com:jonatkins/ingress-intel-total-conversion

This commit is contained in:
Philipp Schaefer 2013-09-10 14:29:13 +02:00
commit 7e648cb14b
4 changed files with 71 additions and 7 deletions

View File

@ -295,12 +295,6 @@ window.setupPlayerStat = function() {
+ '</div>' + '</div>'
+ '</h2>' + '</h2>'
); );
$('#name').mouseenter(function() {
$('#signout').show();
}).mouseleave(function() {
$('#signout').hide();
});
} }
window.setupSidebarToggle = function() { window.setupSidebarToggle = function() {

View File

@ -76,6 +76,10 @@ body {
background-color: #00c5ff !important; background-color: #00c5ff !important;
} }
#name #signout { /* no hover, always show signout button */
display: block;
}
#sidebar, #chatcontrols, #chat, #chatinput { #sidebar, #chatcontrols, #chat, #chatinput {
background: #0B3351 !important; background: #0B3351 !important;
} }

View File

@ -0,0 +1,63 @@
// ==UserScript==
// @id iitc-plugin-highlight-outbound-link-counter@cathesaurus
// @name IITC plugin: highlight portals running low on outbound links
// @category Highlighter
// @version 0.1.0.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Uses the fill color of the portals to show the number of outbound links: red = 8 (i.e. no more outbound links may be made), orange = 6 or 7, yellow = 4 or 5.
// @include https://www.ingress.com/intel*
// @include http://www.ingress.com/intel*
// @match https://www.ingress.com/intel*
// @match http://www.ingress.com/intel*
// @grant none
// ==/UserScript==
@@PLUGINSTART@@
// PLUGIN START ////////////////////////////////////////////////////////
// use own namespace for plugin
window.plugin.portalHighlighterOutboundLinkCounter = function() {};
window.plugin.portalHighlighterOutboundLinkCounter.highlight = function(data) {
var d = data.portal.options.details;
var outgoing = 0;
var playerFaction = 0;
if (window.PLAYER.team === 'RESISTANCE') {
playerFaction = window.TEAM_RES;
} else {
playerFaction = window.TEAM_ENL;
}
// Only interested in portals of player's faction
if(getTeam(d) === playerFaction) {
if(d.portalV2.linkedEdges) $.each(d.portalV2.linkedEdges, function(ind, link) {
if (link.isOrigin) {
outgoing++;
}
});
if(outgoing > 3) {
if(outgoing < 6) {
color = 'yellow';
} else if(outgoing < 8) {
color = 'orange';
} else {
color = 'red';
}
var params = {fillColor: color, fillOpacity: 1};
data.portal.setStyle(params);
}
}
}
var setup = function() {
window.addPortalHighlighter('Outbound Links', window.plugin.portalHighlighterOutboundLinkCounter.highlight);
}
// PLUGIN END //////////////////////////////////////////////////////////
@@PLUGINEND@@

View File

@ -399,7 +399,7 @@ h2 #stats {
overflow: hidden; overflow: hidden;
} }
h2 #signout { #signout {
font-size: 12px; font-size: 12px;
font-weight: normal; font-weight: normal;
line-height: 29px; line-height: 29px;
@ -410,6 +410,9 @@ h2 #signout {
background-color: rgba(8, 48, 78, 0.5); background-color: rgba(8, 48, 78, 0.5);
display: none; /* starts hidden */ display: none; /* starts hidden */
} }
#name:hover #signout {
display: block;
}
h2 sup, h2 sub { h2 sup, h2 sub {
display: block; display: block;