Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renames #119

Merged
merged 14 commits into from
Mar 14, 2019
43 changes: 19 additions & 24 deletions code/map_data_calc_tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,31 +110,26 @@ window.getDataZoomForMapZoom = function(zoom) {
zoom = 21;
}


if (!window.CONFIG_ZOOM_DEFAULT_DETAIL_LEVEL) {

// to improve the cacheing performance, we try and limit the number of zoom levels we retrieve data for
// to avoid impacting server load, we keep ourselves restricted to a zoom level with the sane numbre
// of tilesPerEdge and portal levels visible

var origTileParams = getMapZoomTileParameters(zoom);

while (zoom > MIN_ZOOM) {
var newTileParams = getMapZoomTileParameters(zoom-1);

if ( newTileParams.tilesPerEdge != origTileParams.tilesPerEdge
|| newTileParams.hasPortals != origTileParams.hasPortals
|| newTileParams.level*newTileParams.hasPortals != origTileParams.level*origTileParams.hasPortals // multiply by 'hasPortals' bool - so comparison does not matter when no portals available
) {
// switching to zoom-1 would result in a different detail level - so we abort changing things
break;
} else {
// changing to zoom = zoom-1 results in identical tile parameters - so we can safely step back
// with no increase in either server load or number of requests
zoom = zoom-1;
}
// to improve the cacheing performance, we try and limit the number of zoom levels we retrieve data for
// to avoid impacting server load, we keep ourselves restricted to a zoom level with the sane number
// of tilesPerEdge and portal levels visible

var origTileParams = getMapZoomTileParameters(zoom);

while (zoom > MIN_ZOOM) {
var newTileParams = getMapZoomTileParameters(zoom-1);

if ( newTileParams.tilesPerEdge != origTileParams.tilesPerEdge
|| newTileParams.hasPortals != origTileParams.hasPortals
|| newTileParams.level*newTileParams.hasPortals != origTileParams.level*origTileParams.hasPortals // multiply by 'hasPortals' bool - so comparison does not matter when no portals available
) {
// switching to zoom-1 would result in a different detail level - so we abort changing things
break;
} else {
// changing to zoom = zoom-1 results in identical tile parameters - so we can safely step back
// with no increase in either server load or number of requests
zoom = zoom-1;
}

}

return zoom;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-compute-ap-stats@Hollow011
// @name IITC plugin: Compute AP statistics
// @name IITC plugin: Available AP statistics
// @category Info
// @version 0.4.1.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Displays the per-team AP gains available in the current view.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-basemap-gmaps-gray@jacob1123
// @name IITC plugin: Gray Google Roads
// @name IITC plugin: Gray Google map
// @category Map Tiles
// @version 0.1.3.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add a simplified gray Version of Google map tiles as an optional layer.
Expand Down
2 changes: 1 addition & 1 deletion plugins/basemap-openstreetmap.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-basemap-openstreetpam@jonatkins
// @name IITC plugin: OpenStreetMap.org map tiles
// @name IITC plugin: OpenStreetMap.org map
// @category Map Tiles
// @version 0.1.1.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the native OpenStreetMap.org map tiles as an optional layer.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@
/***************************************************************************************************************************************************************/

window.plugin.bookmarks.setupCSS = function() {
$('<style>').prop('type', 'text/css').html('@@INCLUDESTRING:plugins/bookmarks-by-zaso.css@@').appendTo('head');
$('<style>').prop('type', 'text/css').html('@@INCLUDESTRING:plugins/bookmarks.css@@').appendTo('head');
}

window.plugin.bookmarks.setupPortalsList = function() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-cache-details-on-map@jonatkins
// @name IITC plugin: Cache viewed portal details and always show them on the map
// @name IITC plugin: Cache viewed portals on map
// @category Cache
// @version 0.1.0.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Cache the details of recently viewed portals and use this to populate the map when possible
Expand Down
4 changes: 2 additions & 2 deletions plugins/cross_link.user.js → plugins/cross-links.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @id iitc-plugin-cross-links@mcben
// @name IITC plugin: cross links
// @category Layer
// @name IITC plugin: Cross links
// @category Draw
// @version 1.1.2.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] EXPERIMENTAL: Checks for existing links that cross planned links. Requires draw-tools plugin.
@@METAINFO@@
Expand Down
2 changes: 1 addition & 1 deletion plugins/debug-raw-portal-data.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @id iitc-plugin-raw-portal-data
// @name IITC plugin: Debug: Raw portal JSON data
// @category Debug
// @category Portal Info
// @version 0.2.4.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Developer debugging aid: Add a link to the portal details to show the raw data of a portal.
@@METAINFO@@
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions plugins/done-links.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @id iitc-plugin-done-links@jonatkins
// @name IITC plugin: done links
// @category Layer
// @name IITC plugin: Done links
// @category Draw
// @version 0.0.1.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] A companion to the Cross Links plugin. Highlights any links that match existing draw-tools line/polygon edges
@@METAINFO@@
Expand Down
4 changes: 2 additions & 2 deletions plugins/draw-tools.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @id iitc-plugin-draw-tools@breunigs
// @name IITC plugin: draw tools
// @category Layer
// @name IITC plugin: Draw tools
// @category Draw
// @version 0.7.0.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allow drawing things onto the current map so you may plan your next move.
@@METAINFO@@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// ==UserScript==
// @id iitc-plugin-farms@949
// @name IITC plugin: Show farms by level
// @category Info
// @name IITC plugin: Find farms on map
// @category Layer
// @version 1.4.1.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Find farms by minimum level.
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show farms by minimum level
@@METAINFO@@
// ==/UserScript==

Expand Down
2 changes: 1 addition & 1 deletion plugins/fly-links.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @id fly-links@fly
// @name IITC plugin: Fly Links
// @category Layer
// @category Draw
// @version 0.2.1.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Calculate how to link the portals to create the largest tidy set of nested fields. Enable from the layer chooser.
@@METAINFO@@
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-highlight-forgotten@jonatkins
// @name IITC plugin: Inactive portals. Hightlight unclaimed portals with no recent activity
// @name IITC plugin: Highlight inactive portals
// @category Highlighter
// @version 0.1.0.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Use the portal fill color to denote if the portal is unclaimed with no recent activity. Shades of red from one week to one month, then tinted to purple for longer. May also highlight captured portals that are stuck and fail to decay every 24 hours.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-highlight-portals-high-level
// @name IITC plugin: highlight high level portals
// @name IITC plugin: Highlight high level portals
// @category Highlighter
// @version 0.1.0.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Use the portal fill color to denote high level portals: Purple L8, Red L7, Orange L6
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-highlight-portal-infrastructure@vita10gy
// @name IITC plugin: highlight portals with infrastructure problems
// @name IITC plugin: Highlight portals with infrastructure problems
// @category Highlighter
// @version 0.2.1.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Use the portal fill color to denote if the portal has any infrastructure problems. Red: no picture. Yellow: potential title issue. Orange: both of these.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-highlight-portals-level-color@vita10gy
// @name IITC plugin: highlight portals by level color
// @name IITC plugin: Highlight portals by level color
// @category Highlighter
// @version 0.1.2.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Use the portal fill color to denote the portal level by using the game level colors.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-highlight-portals-missing-resonators@vita10gy
// @name IITC plugin: highlight portals missing resonators
// @name IITC plugin: Highlight portals missing resonators
// @category Highlighter
// @version 0.1.2.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Use the portal fill color to denote if the portal is missing resonators.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-highlight-needs-recharge@vita10gy
// @name IITC plugin: hightlight portals that need recharging
// @name IITC plugin: Highlight portals that need recharging
// @category Highlighter
// @version 0.1.2.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Use the portal fill color to denote if the portal needs recharging and how much. Yellow: above 85%. Orange: above 50%. Red: above 15%. Magenta: below 15%.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-highlight-ornaments@jonatkins
// @name IITC plugin: hightlight portals with ornaments
// @name IITC plugin: Highlight portals with ornaments
// @category Highlighter
// @version 0.0.1.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Use the portal fill color to denote portals with additional 'ornament' markers. e.g. Anomaly portals
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-highlight-portals-my-level@vita10gy
// @name IITC plugin: highlight portals by my level
// @name IITC plugin: Highlight portals by my level
// @category Highlighter
// @version 0.1.2.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Use the portal fill color to denote if the portal is either at and above, or at and below your level.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-show-portal-weakness@vita10gy
// @name IITC plugin: show portal weakness
// @name IITC plugin: Highlight portal weakness
// @category Highlighter
// @version 0.7.2.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Use the fill color of the portals to denote if the portal is weak. Stronger red indicates recharge required, missing resonators, or both.
Expand Down
2 changes: 1 addition & 1 deletion plugins/keys-on-map.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @id iitc-plugin-keys-on-map@xelio
// @name IITC plugin: Keys on map
// @category Keys
// @category Layer
// @version 0.2.1.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show the manually entered key counts from the 'keys' plugin on the map.
@@METAINFO@@
Expand Down
2 changes: 1 addition & 1 deletion plugins/keys.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @id iitc-plugin-keys@xelio
// @name IITC plugin: Keys
// @category Keys
// @category Misc
// @version 0.3.0.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allow manual entry of key counts for each portal. Use the 'keys-on-map' plugin to show the numbers on the map, and 'sync' to share between multiple browsers or desktop/mobile.
@@METAINFO@@
Expand Down
2 changes: 1 addition & 1 deletion plugins/layer-count.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id layer-count@fkloft
// @name IITC plugin: layer count
// @name IITC plugin: Layer count
// @category Info
// @version 0.1.0.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allow users to count nested fields
Expand Down
2 changes: 1 addition & 1 deletion plugins/link-show-direction.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-link-show-direction
// @name IITC plugin: Show the direction of links on the map
// @name IITC plugin: Direction of links on map
// @category Tweaks
// @version 0.2.1.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show the direction of links on the map by adding short dashes to the line at the origin portal.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-show-linked-portals@fstopienski
// @name IITC plugin: Show linked portals
// @name IITC plugin: Linked portals
// @category Portal Info
// @version 0.3.2.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Try to show the linked portals (image, name and link direction) in portal detail view and jump to linked portal on click. Some details may not be available if the linked portal is not in the current view.
Expand Down Expand Up @@ -174,7 +174,7 @@ plugin.showLinkedPortal.removePreview = function() {

var setup = function () {
window.addHook('portalDetailsUpdated', window.plugin.showLinkedPortal.portalDetail);
$('<style>').prop('type', 'text/css').html('@@INCLUDESTRING:plugins/show-linked-portals.css@@').appendTo('head');
$('<style>').prop('type', 'text/css').html('@@INCLUDESTRING:plugins/linked-portals-show.css@@').appendTo('head');
}

// PLUGIN END //////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion plugins/add-kml.user.js → plugins/overlay-kml.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id overlay-kml@danielatkins
// @name IITC plugin: overlay KML
// @name IITC plugin: Overlay KML
// @category Layer
// @version 0.2.0.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allow users to overlay their own KML / GPX files on top of IITC.
Expand Down
2 changes: 1 addition & 1 deletion plugins/pan-control.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-pan-control@fragger
// @name IITC plugin: pan control
// @name IITC plugin: Pan control
// @category Controls
// @version 0.1.1.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show a panning control on the map.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-player-tracker@breunigs
// @name IITC Plugin: Player tracker
// @name IITC Plugin: Player activity tracker
// @category Layer
// @version 0.11.1.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Draw trails for the path a user took onto the map based on status messages in COMMs. Uses up to three hours of data. Does not request chat data on its own, even if that would be useful.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-guess-player-levels@breunigs
// @name IITC plugin: guess player level
// @name IITC plugin: Player level guess
// @category Info
// @version 0.5.7.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Try to determine player levels from the data available in the current view.
Expand Down
2 changes: 1 addition & 1 deletion plugins/portal-counts.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-portals-count@yenky
// @name IITC plugin: Show total counts of portals
// @name IITC plugin: Portal count
// @category Info
// @version 0.1.2.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Display a list of all localized portals by level and faction.
Expand Down
2 changes: 1 addition & 1 deletion plugins/portals-list.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-portals-list@teo96
// @name IITC plugin: show list of portals
// @name IITC plugin: Portals list
// @category Info
// @version 0.2.1.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Display a sortable list of all visible portals with full details about the team, resonators, links, etc.
Expand Down
1 change: 1 addition & 0 deletions plugins/privacy-view.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// ==UserScript==
// @id iitc-plugin-privacy-view@Scrool
// @name IITC plugin: Privacy view on Intel
// @category Misc
// @version 1.0.1.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Hide info from intel which shouldn't leak to players of the other faction.
@@METAINFO@@
Expand Down
4 changes: 2 additions & 2 deletions plugins/regions.user.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// ==UserScript==
// @id iitc-plugin-regions@jonatkins
// @name IITC plugin: Show the local score regions
// @name IITC plugin: Ingress scoring regions
// @category Layer
// @version 0.1.2.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show the local scoring regions on the map. No actual scores - just the region areas.
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show the regional scoring cells grid on the map
@@METAINFO@@
// ==/UserScript==

Expand Down
4 changes: 2 additions & 2 deletions plugins/reso-energy-pct-in-portal-detail.user.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// ==UserScript==
// @id iitc-plugin-reso-energy-pct-in-portal-detail@xelio
// @name IITC plugin: reso energy pct in portal detail
// @name IITC plugin: Reso energy % in portal details
// @category Portal Info
// @version 0.1.2.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show resonator energy percentage on resonator energy bar in portal detail panel.
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show resonator energy percentage on resonator energy bar in portal details panel.
@@METAINFO@@
// ==/UserScript==

Expand Down
2 changes: 1 addition & 1 deletion plugins/scale-bar.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-scale-bar@breunigs
// @name IITC plugin: scale bar
// @name IITC plugin: Scale bar
// @category Controls
// @version 0.1.0.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show scale bar on the map.
Expand Down
2 changes: 1 addition & 1 deletion plugins/score-cycle-times.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-score-cycle-times@jonatkins
// @name IITC plugin: Show scoreboard cycle/checkpoint times
// @name IITC plugin: Scoring cycle / checkpoint times
// @category Info
// @version 0.1.0.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show the times used for the septicycle and checkpoints for regional scoreboards.
Expand Down
2 changes: 1 addition & 1 deletion plugins/scoreboard.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-scoreboard@vita10gy
// @name IITC plugin: show a localized scoreboard.
// @name IITC plugin: Localized scoreboard
// @version 0.2.0.@@DATETIMEVERSION@@
// @category Info
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Display a scoreboard about all visible portals with statistics about both teams,like average portal level,link & field counts etc.
Expand Down
2 changes: 1 addition & 1 deletion plugins/scroll-wheel-zoom-disable.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @id iitc-plugin-scroll-wheel-zoom-disable@jonatkins
// @name IITC plugin: disable mouse wheel zoom
// @name IITC plugin: Disable mouse wheel zoom
// @category Tweaks
// @version 0.1.0.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Disable the use of mouse wheel to zoom. The map zoom controls or keyboard are still available.
Expand Down
1 change: 1 addition & 0 deletions plugins/speech-search.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// ==UserScript==
// @id iitc-plugin-speech-search
// @name IITC Plugin: Speech Search
// @category Misc
// @version 0.0.1.@@DATETIMEVERSION@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allow speech input for location search (webkit only for now - NOT Firefox).
@@METAINFO@@
Expand Down
Loading