more work on fixing things for the 2014-05-23 changes
it's a big job - much is still broken
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
// ==UserScript==
|
||||
// @id iitc-plugin-show-address@vita10gy
|
||||
// @name IITC plugin: show portal address in sidebar
|
||||
// @category Portal Info
|
||||
// @version 0.2.4.@@DATETIMEVERSION@@
|
||||
// @category Deleted
|
||||
// @version 0.3.0.@@DATETIMEVERSION@@
|
||||
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
|
||||
// @updateURL @@UPDATEURL@@
|
||||
// @downloadURL @@DOWNLOADURL@@
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Portal address will show in the sidebar.
|
||||
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Address no longer available, as of Niantic changes 2014-05-23
|
||||
// @include https://www.ingress.com/intel*
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
@ -14,35 +14,3 @@
|
||||
// @grant none
|
||||
// ==/UserScript==
|
||||
|
||||
@@PLUGINSTART@@
|
||||
|
||||
// PLUGIN START ////////////////////////////////////////////////////////
|
||||
|
||||
// use own namespace for plugin
|
||||
window.plugin.portalAddress = function() {};
|
||||
|
||||
window.plugin.portalAddress.portalDetail = function(data) {
|
||||
// If there's 4 sets of comma delimited 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.
|
||||
var d = data.portalDetails;
|
||||
var address = d.descriptiveText.map.ADDRESS;
|
||||
if (address) {
|
||||
address = address.split(',').splice(0,3).join(',');
|
||||
$('.imgpreview').append('<div id="address">'+address+'</div>');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var setup = function() {
|
||||
window.addHook('portalDetailsUpdated', window.plugin.portalAddress.portalDetail);
|
||||
$('head').append('<style>' +
|
||||
'.res #address { border: 1px solid #0076b6; }' +
|
||||
'.enl #address { border: 1px solid #017f01; }' +
|
||||
'#address { position: absolute; bottom: 0; left: 5px; right: 8px; padding: 3px; font-size: 11px; background-color: rgba(0, 0, 0, 0.7); text-align: center; overflow: hidden; }' +
|
||||
'</style>');
|
||||
}
|
||||
|
||||
// PLUGIN END //////////////////////////////////////////////////////////
|
||||
|
||||
@@PLUGINEND@@
|
||||
|
Reference in New Issue
Block a user