Nits and style redo

Added to readme, but it doesn't seem to work with the public build.
This commit is contained in:
vita10gy 2013-02-22 08:43:04 -06:00
parent 25f1b32285
commit e8e683c5b5
2 changed files with 9 additions and 9 deletions

View File

@ -19,8 +19,9 @@ Available Plugins
The development version is not available publicly, you need to build it yourself. See [HACKING.md](https://github.com/breunigs/ingress-intel-total-conversion/blob/gh-pages/HACKING.md#hacking) for guides. The development version is not available publicly, you need to build it yourself. See [HACKING.md](https://github.com/breunigs/ingress-intel-total-conversion/blob/gh-pages/HACKING.md#hacking) for guides.
- [**Player Tracker**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/player-tracker.user.js) Draws trails for user actions in the last hour. At the last known location theres a tooltip that shows the data in a table. [View screenshot](http://breunigs.github.com/ingress-intel-total-conversion/screenshots/plugin_player_tracker.png). **REQUIRES 2013-02-19+**
- [**Compute AP Stats**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/compute-ap-stats.user.js) Shows the potential AP an agent could obtain by destroying and rebuilding all the portals in the current zoom area. **REQUIRES 2013-02-22+** - [**Compute AP Stats**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/compute-ap-stats.user.js) Shows the potential AP an agent could obtain by destroying and rebuilding all the portals in the current zoom area. **REQUIRES 2013-02-22+**
- [**Player Tracker**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/player-tracker.user.js) Draws trails for user actions in the last hour. At the last known location theres a tooltip that shows the data in a table. [View screenshot](http://breunigs.github.com/ingress-intel-total-conversion/screenshots/plugin_player_tracker.png). **REQUIRES 2013-02-19+**
- [**Show Portal Address**](https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/show-address.user.js) Shows portal address in the side panel.
Hacking Hacking
------- -------

View File

@ -23,18 +23,17 @@ window.plugin.portalAddress = function() {};
window.plugin.portalAddress.portalDetail = function(data) { window.plugin.portalAddress.portalDetail = function(data) {
//If there's 4 sets of comma delimieted info the last one is the country, so get rid of it. If the country //If there's 4 sets of comma delimieted info the last one is the country, so get rid of it. If the country
//is in the [2] then it doesn't matter because address is usually short enough to fit. //is in the [2] then it doesn't matter because address is usually short enough to fit.
var address = data.portalDetails.portalV2.descriptiveText.ADDRESS.split(",").splice(0,3).join(","); var address = data.portalDetails.portalV2.descriptiveText.ADDRESS.split(',').splice(0,3).join(',');
$(".imgpreview").append("<div id='address'>"+address+"</div>"); $('.imgpreview').append('<div id="address">'+address+'</div>');
} }
var setup = function() { var setup = function() {
window.addHook('portalDetailsUpdated', window.plugin.portalAddress.portalDetail); window.addHook('portalDetailsUpdated', window.plugin.portalAddress.portalDetail);
var css = document.createElement("style"); $('head').append('<style>' +
css.type = "text/css"; '.res #address { border: 1px solid #0076b6; }' +
css.innerHTML = ".res #address { border: 1px solid #0076b6; }" + '.enl #address { border: 1px solid #017f01; }' +
".enl #address { border: 1px solid #017f01; }" + '#address{ margin:5px; padding:3px; margin-top:120px; margin-right:8px; font-size:11px; background-color:rgba(0, 0, 0, 0.7); text-align:center; white-space:nowrap; overflow:hidden;}' +
"#address{ margin:5px; padding:3px; margin-top:120px; margin-right:8px; font-size:11px; background-color:rgba(0, 0, 0, 0.7); text-align:center; white-space:nowrap; overflow:hidden;}"; '</style>');
document.body.appendChild(css);
} }
// PLUGIN END ////////////////////////////////////////////////////////// // PLUGIN END //////////////////////////////////////////////////////////