boot

These functions set up specific areas after the boot function created a basic framework. All of these functions should only ever be run once.

Methods

inner boot()

The main boot function that initializes IITC. It is responsible for setting up the map, loading plugins, and initializing various components of IITC.

inner checkingIntelURL()

Checks if the IITC is being run on the official Intel URL. If not, it displays a warning dialog.

inner prepPluginsToLoad() → {function}

Prepares plugins to load by sorting them based on their specified priority.

Returns:
function -

A loader function that loads plugins up to a specified priority.

inner registerMarkerForOMS(marker)

Registers a marker with the OverlappingMarkerSpiderfier to manage its click events.

Parameters:
Name Type Description
marker L.Marker

The Leaflet marker to be managed by OMS.

inner setupIngressMarkers()

Initializes Ingress markers with custom icons.

inner setupOMS()

Sets up the OverlappingMarkerSpiderfier (OMS) library for handling overlapping markers on the map. OMS doesn't cancel the original click event, so the topmost marker will get a click event while spiderfying. Also, OMS only supports a global callback for all managed markers. Therefore, we will use a custom event that gets fired for each marker.

inner setupTooltips(elementopt)

Initializes tooltips for a specified element or the entire document if no element is provided. This function sets up jQuery UI tooltips with customized behavior. It ensures that only one tooltip is visible at a time by closing others when a new one opens. The content of the tooltip is derived from the 'title' attribute of the HTML element and is processed by the convertTextToTableMagic function.

Additionally, this function sets up a one-time event handler (if not already set) on the document to remove tooltips when clicked. This is controlled by the tooltipClearerHasBeenSetup flag to prevent multiple bindings of the event handler.

Parameters:
Name Type Attributes Default Description
element jQuery | HTMLElement <optional>
document

The jQuery or DOM element to which the tooltips will be attached. If not provided, the document itself is used.