Merge branch 'gh-pages' of github.com:breunigs/ingress-intel-total-conversion into gh-pages
Conflicts: code/hooks.js
This commit is contained in:
commit
f2c6c609ef
@ -23,13 +23,15 @@
|
|||||||
// code/map_data.js#renderPortal near the end. Will hand
|
// code/map_data.js#renderPortal near the end. Will hand
|
||||||
// the Leaflet CircleMarker for the portal in "portal" var.
|
// the Leaflet CircleMarker for the portal in "portal" var.
|
||||||
// portalDetailsUpdated: fired after the details in the sidebar have
|
// portalDetailsUpdated: fired after the details in the sidebar have
|
||||||
// been (re-)rendered
|
// been (re-)rendered Provides data about the portal that
|
||||||
|
// has been selected.
|
||||||
// publicChatDataAvailable: this hook runs after data for any of the
|
// publicChatDataAvailable: this hook runs after data for any of the
|
||||||
// public chats has been received and processed, but not
|
// public chats has been received and processed, but not
|
||||||
// yet been displayed. The data hash contains both the un-
|
// yet been displayed. The data hash contains both the un-
|
||||||
// processed raw ajax response as well as the processed
|
// processed raw ajax response as well as the processed
|
||||||
// chat data that is going to be used for display.
|
// chat data that is going to be used for display.
|
||||||
|
|
||||||
|
|
||||||
window._hooks = {}
|
window._hooks = {}
|
||||||
window.VALID_HOOKS = ['portalAdded', 'portalDetailsUpdated',
|
window.VALID_HOOKS = ['portalAdded', 'portalDetailsUpdated',
|
||||||
'publicChatDataAvailable'];
|
'publicChatDataAvailable'];
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
// PORTAL DETAILS MAIN ///////////////////////////////////////////////
|
// PORTAL DETAILS MAIN ///////////////////////////////////////////////
|
||||||
// main code block that renders the portal details in the sidebar and
|
// main code block that renders the portal details in the sidebar and
|
||||||
// methods that highlight the portal in the map view.
|
// methods that highlight the portal in the map view.
|
||||||
@ -71,7 +70,7 @@ window.renderPortalDetails = function(guid) {
|
|||||||
// weren’t available yet.
|
// weren’t available yet.
|
||||||
resolvePlayerNames();
|
resolvePlayerNames();
|
||||||
|
|
||||||
runHooks('portalDetailsUpdated', {});
|
runHooks('portalDetailsUpdated', {portalDetails: d});
|
||||||
}
|
}
|
||||||
|
|
||||||
// draws link-range and hack-range circles around the portal with the
|
// draws link-range and hack-range circles around the portal with the
|
||||||
|
@ -13,7 +13,7 @@ Available Plugins
|
|||||||
- [**Highlight Weakened Portals**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/show-portal-weakness.user.js) fill portals with red to indicate portal's state of disrepair. The brighter the color the more attention needed (recharge, shields, resonators). A dashed portal means a resonator is missing.
|
- [**Highlight Weakened Portals**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/show-portal-weakness.user.js) fill portals with red to indicate portal's state of disrepair. The brighter the color the more attention needed (recharge, shields, resonators). A dashed portal means a resonator is missing.
|
||||||
- [**Draw Tools**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/draw-tools.user.js) allows to draw circles and lines on the map to aid you with planning your next big field.
|
- [**Draw Tools**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/draw-tools.user.js) allows to draw circles and lines on the map to aid you with planning your next big field.
|
||||||
- [**Render Limit Increase**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/render-limit-increase.user.js) increases render limits. Good for high density areas (e.g. London, UK) and faster PCs.
|
- [**Render Limit Increase**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/render-limit-increase.user.js) increases render limits. Good for high density areas (e.g. London, UK) and faster PCs.
|
||||||
- [**Resonator Display Zoom Level Decrease**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/resonator-display-zoom-level-decrease.user.js) Resonators start showing up in lower zoom level.
|
- [**Resonator Display Zoom Level Decrease**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/resonator-display-zoom-level-decrease.user.js) Resonator start display earlier.
|
||||||
|
|
||||||
|
|
||||||
Hacking
|
Hacking
|
||||||
|
58
plugins/reso-energy-pct-in-portal-detail.user.js
Normal file
58
plugins/reso-energy-pct-in-portal-detail.user.js
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
// ==UserScript==
|
||||||
|
// @id iitc-plugin-reso-energy-pct-in-portal-detail@xelio
|
||||||
|
// @name iitc: reso energy pct in portal detail
|
||||||
|
// @version 0.1
|
||||||
|
// @namespace https://github.com/breunigs/ingress-intel-total-conversion
|
||||||
|
// @updateURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/reso-energy-pct-in-portal-detail.user.js
|
||||||
|
// @downloadURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/reso-energy-pct-in-portal-detail.user.js
|
||||||
|
// @description Show resonator energy percentage on resonator energy bar in portal detail panel.
|
||||||
|
// @include http://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.resoEnergyPctInPortalDetal = function() {};
|
||||||
|
|
||||||
|
window.plugin.resoEnergyPctInPortalDetal.updateMeter = function(data) {
|
||||||
|
var meterLevel = $("span.meter-level");
|
||||||
|
meterLevel
|
||||||
|
.css('top','0px')
|
||||||
|
.css('left','5px')
|
||||||
|
.css('margin-left','0px')
|
||||||
|
.css('font-size','80%')
|
||||||
|
.css('line-height','18px');
|
||||||
|
meterLevel.each(function() {
|
||||||
|
var matchResult = $(this).parent().attr('title').match(/\((\d*\%)\)/);
|
||||||
|
if(matchResult) {
|
||||||
|
var newMeterContent = 'L' + $(this).html() + ' ' + matchResult[1];
|
||||||
|
$(this).html(newMeterContent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var setup = function() {
|
||||||
|
window.addHook('portalDetailsUpdated', window.plugin.resoEnergyPctInPortalDetal.updateMeter);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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);
|
@ -5,7 +5,7 @@
|
|||||||
// @namespace https://github.com/breunigs/ingress-intel-total-conversion
|
// @namespace https://github.com/breunigs/ingress-intel-total-conversion
|
||||||
// @updateURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/resonator-display-zoom-level-decrease.user.js
|
// @updateURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/resonator-display-zoom-level-decrease.user.js
|
||||||
// @downloadURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/resonator-display-zoom-level-decrease.user.js
|
// @downloadURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/resonator-display-zoom-level-decrease.user.js
|
||||||
// @description Let resonator display in lower zoom level
|
// @description Resonator start display earlier
|
||||||
// @include http://www.ingress.com/intel*
|
// @include http://www.ingress.com/intel*
|
||||||
// @match http://www.ingress.com/intel*
|
// @match http://www.ingress.com/intel*
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
Loading…
x
Reference in New Issue
Block a user