Comparing sensitive data, confidential files or internal emails?

Most legal and privacy policies prohibit uploading sensitive data online. Diffchecker Desktop ensures your confidential information never leaves your computer. Work offline and compare documents securely.

Untitled diff

Created Diff never expires
59 removals
534 lines
56 additions
531 lines
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<head>
<meta http-equiv="cache-control" content="public">
<meta http-equiv="cache-control" content="public">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="KEYWORDS" content="discovery navmap map freelancer space error sirius html5 css3 new">
<meta name="KEYWORDS" content="discovery navmap map freelancer space error sirius html5 css3 new">
<meta name="DESCRIPTION" content="An online version of Discovery Freelancer's in-game navigation map with quite a few extras.">
<meta name="DESCRIPTION" content="An online version of Discovery Freelancer's in-game navigation map with quite a few extras.">
<!--<link href="" rel="shortcut icon" type="image/x-icon">-->
<!--<link href="" rel="shortcut icon" type="image/x-icon">-->
<title>Discovery Navmap</title>
<title>Discovery Navmap</title>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<script>
<script>
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function o(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function t(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(c," ")),u.json?JSON.parse(e):e}catch(n){}}function r(n,o){var i=u.raw?n:t(n);return e.isFunction(o)?o(i):i}var c=/\+/g,u=e.cookie=function(t,c,s){if(arguments.length>1&&!e.isFunction(c)){if(s=e.extend({},u.defaults,s),"number"==typeof s.expires){var a=s.expires,d=s.expires=new Date;d.setMilliseconds(d.getMilliseconds()+864e5*a)}return document.cookie=[n(t),"=",i(c),s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("")}for(var f=t?void 0:{},p=document.cookie?document.cookie.split("; "):[],l=0,m=p.length;m>l;l++){var x=p[l].split("="),g=o(x.shift()),j=x.join("=");if(t===g){f=r(j,c);break}t||void 0===(j=r(j))||(f[g]=j)}return f};u.defaults={},e.removeCookie=function(n,o){return e.cookie(n,"",e.extend({},o,{expires:-1})),!e.cookie(n)}});
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function o(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function t(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(c," ")),u.json?JSON.parse(e):e}catch(n){}}function r(n,o){var i=u.raw?n:t(n);return e.isFunction(o)?o(i):i}var c=/\+/g,u=e.cookie=function(t,c,s){if(arguments.length>1&&!e.isFunction(c)){if(s=e.extend({},u.defaults,s),"number"==typeof s.expires){var a=s.expires,d=s.expires=new Date;d.setMilliseconds(d.getMilliseconds()+864e5*a)}return document.cookie=[n(t),"=",i(c),s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("")}for(var f=t?void 0:{},p=document.cookie?document.cookie.split("; "):[],l=0,m=p.length;m>l;l++){var x=p[l].split("="),g=o(x.shift()),j=x.join("=");if(t===g){f=r(j,c);break}t||void 0===(j=r(j))||(f[g]=j)}return f};u.defaults={},e.removeCookie=function(n,o){return e.cookie(n,"",e.extend({},o,{expires:-1})),!e.cookie(n)}});
var dataRootPath = "v48818/";
var dataRootPath = "v48818/";
var nameRegex = /nickname = (.*)/g;
var nameRegex = /nickname = (.*)/g;
var idsNameRegex = /ids_name = (.*)/g;
var idsNameRegex = /ids_name = (.*)/g;
var idsSysNameRegex = /strid_name = (.*)/g;
var idsSysNameRegex = /strid_name = (.*)/g;
var atmosphereRadiusRegex = /atmosphere_range = (.*)/g;
var atmosphereRadiusRegex = /atmosphere_range = (.*)/g;
var sysNameRegex = /system = (.*)/g;
var sysNameRegex = /system = (.*)/g;
var idsInfoRegex = /ids_info = (.*)/g;
var idsInfoRegex = /ids_info = (.*)/g;
var scaleRegex = /navmapscale = (.*)/g;
var scaleRegex = /navmapscale = (.*)/g;
var currentSystemNickname = "Sirius";
var currentSystemNickname = "Sirius";
var baseNameFile = dataRootPath+"gamedata_bases.txt";
var baseNameFile = dataRootPath+"gamedata_bases.txt";
var systemNameFile = dataRootPath+"special_systems.txt";
var systemNameFile = dataRootPath+"special_systems.txt";
var factionNameFile = dataRootPath+"gamedata_factions.txt";
var factionNameFile = dataRootPath+"gamedata_factions.txt";
var commodityNameFile = dataRootPath+"gamedata_cargo.txt";
var commodityNameFile = dataRootPath+"gamedata_cargo.txt";
var systemPathFile = dataRootPath+"universe/systems_shortest_path.ini";
var systemPathFile = dataRootPath+"universe/systems_shortest_path.ini";
var systemLegalPathFile = dataRootPath+"universe/shortest_legal_path.ini";
var systemLegalPathFile = dataRootPath+"universe/shortest_legal_path.ini";
var infocardFile = dataRootPath+"infocards.txt";
var infocardFile = dataRootPath+"infocards.txt";
var universeFile = dataRootPath+"universe/universe.ini";
var universeFile = dataRootPath+"universe/universe.ini";
var objectRegex = /(\n[^\r\n;]*\[[Oo]bject\])([^;\[]*(?=\n\w*|$))/g;
var objectRegex = /(\n[^\r\n;]*\[[Oo]bject\])([^;\[]*(?=\n\w*|$))/g;
var zoneRegex = /(\n[^\r\n;]*\[[Zz]one\])([^;\[]*(?=\n\w*|$))/g;
var zoneRegex = /(\n[^\r\n;]*\[[Zz]one\])([^;\[]*(?=\n\w*|$))/g;
var zoneNicknameRegex = /zone = (.*)/g;
var zoneNicknameRegex = /zone = (.*)/g;
var asteroidsRegex = /(\[Asteroids\])(\r\n.+)*/g;
var asteroidsRegex = /(\[Asteroids\])(\r\n.+)*/g;
var lootableZoneRegex = /(\n[^\r\n;]*\[LootableZone\])([^;\[]*(?=\n\w*|$))/g;
var lootableZoneRegex = /(\n[^\r\n;]*\[LootableZone\])([^;\[]*(?=\n\w*|$))/g;
var lootableZoneDynamicCommodityRegex = /dynamic_loot_commodity = (.*)/g;
var lootableZoneDynamicCommodityRegex = /dynamic_loot_commodity = (.*)/g;
var lootableZoneDynamicDifficultyRegex = /dynamic_loot_difficulty = (.*)/g;
var lootableZoneDynamicDifficultyRegex = /dynamic_loot_difficulty = (.*)/g;
var lootableZoneDynamicCountRegex = /dynamic_loot_count = (.*)/g;
var lootableZoneDynamicCountRegex = /dynamic_loot_count = (.*)/g;
var lootableZoneAsteroidCommodityRegex = /asteroid_loot_commodity = (.*)/g;
var lootableZoneAsteroidCommodityRegex = /asteroid_loot_commodity = (.*)/g;
var lootableZoneAsteroidDifficultyRegex = /asteroid_loot_difficulty = (.*)/g;
var lootableZoneAsteroidDifficultyRegex = /asteroid_loot_difficulty = (.*)/g;
var lootableZoneAsteroidCountRegex = /asteroid_loot_count = (.*)/g;
var lootableZoneAsteroidCountRegex = /asteroid_loot_count = (.*)/g;
var activeAsteroidGetRequests = -1;
var activeAsteroidGetRequests = -1;
var ambientRegex = /(\[Ambient\])(\r\n.+)*/g;
var ambientRegex = /(\[Ambient\])(\r\n.+)*/g;
var systemRegex = /(\[system\])(\r\n.+)*/g;
var systemRegex = /(\[system\])(\r\n.+)*/g;
var baseRegex = /(\[Base\])(\r\n.+)*/g;
var baseRegex = /(\[Base\])(\r\n.+)*/g;
var posRegex = /pos = (.*)/g;
var posRegex = /pos = (.*)/g;
var sizeRegex = /size = (.*)/g;
var sizeRegex = /size = (.*)/g;
var repRegex = /reputation = (.*)/g;
var repRegex = /reputation = (.*)/g;
var pathRegex = /Path = (.*)/g;
var pathRegex = /Path = (.*)/g;
var gotoRegex = /goto = (.*)/g;
var gotoRegex = /goto = (.*)/g;
var burnColourRegex = /burn_color = (.*)/g;
var burnColourRegex = /burn_color = (.*)/g;
var colourRegex = /color = (.*)/g
var colourRegex = /color = (.*)/g
var fogColourRegex = /property_fog_color = (.*)/g;
var fogColourRegex = /property_fog_color = (.*)/g;
var zoneTypeRegex = /property_flags = (.*)/g;
var zoneTypeRegex = /property_flags = (.*)/g;
var nameRegex = /nickname = (.*)/g;
var nameRegex = /nickname = (.*)/g;
var rotationRegex = /rotate = (.*)/g;
var rotationRegex = /rotate = (.*)/g;
var textRegex = /(<(text|TEXT)>.+?<\/(text|TEXT)>|<(para|PARA)\/>)/g;
var textRegex = /(<(text|TEXT)>.+?<\/(text|TEXT)>|<(para|PARA)\/>)/g;
var oorpArray = ["li11","br17","br19","ew63","ga11","ga13","ga09","ga12","ga05","ga06","ga10","ga14","br10","iw09","li06","ca01","ev01","bw14", "bw13","st02c","st03b","hi19","hi22","hi08","hi08","ew37", "ku15", "li07"];
var oorpArray = ["li11","br17","br19","ew63","ga11","ga13","ga09","ga12","ga05","ga06","ga10","ga14","br10","iw09","li06","ca01","ev01","bw14", "bw13","st02c","st03b","hi19","hi22","hi08","hi08","ew37", "ku15", "li07"];
var systemScaleFactor = 1;
var systemScaleFactor = 1;
var searchTimedOut = "nope";
var searchTimedOut = "nope";
var universeFileGetResult;
var universeFileGetResult;
var prevResponsiveState;
var lastSearch;
var longSystemName;
var baseNameArray = {};
var baseNameArray = {};
var systemNameArray = {};
var systemNameArray = {};
var systemClassArray = {};
var systemClassArray = {};
var systemIdsNameArray = {};
var systemIdsNameArray = {};
var systemIdsNameArrayState = "nope";
var systemIdsNameArrayState = "nope";
var searchArray = {};
var searchArray = {};
var matchArray = [];
var matchArray = [];
var searchArrayState = "nope";
var searchArrayState = "nope";
var systemPosArray = {};
var systemPosArray = {};
var systemPosArrayState = "nope";
var systemPosArrayState = "nope";
var systemInfoArray = {};
var systemInfoArray = {};
var systemScaleFactorArray = {};
var systemScaleFactorArray = {};
var systemScaleFactorArrayState = "nope";
var systemScaleFactorArrayState = "nope";
var infocardArray = {};
var infocardArray = {};
var infocardArrayState = "nope";
var infocardArrayState = "nope";
var baseSystemArray = {};
var baseSystemArray = {};
var baseSystemArrayState = "nope";
var baseSystemArrayState = "nope";
var factionNameArray = {};
var factionNameArray = {};
var factionNameArrayState = "nope";
var factionNameArrayState = "nope";
var commodityNameArray = {};
var commodityNameArray = {};
var commodityNameArrayState = "nope";
var commodityNameArrayState = "nope";
var connectionArray = {};
var connectionArray = {};
var connectionArrayState = "nope";
var connectionArrayState = "nope";
var jgConnectionArray = {};
var jgConnectionArray = {};
var jgConnectionArrayState = "nope";
var jgConnectionArrayState = "nope";
var systemConnectionState = "nope";
var systemConnectionState = "nope";
var universeMapState = "nope";
var universeMapState = "nope";
var sysLootableZoneArray = {};
var sysLootableZoneArray = {};
var asteroidsURIArray = {};
var asteroidsURIArray = {};
var zoneFlagArray = {
var zoneFlagArray = {
0: "zoneHidden",
0: "zoneHidden",
64: "zoneRockAsteroids",
64: "zoneRockAsteroids",
65: "zoneAlphaBigDust",
65: "zoneAlphaBigDust",
66: "zoneRock",
66: "zoneRock",
74: "zoneLeedsUraniumAsteroids",
74: "zoneLeedsUraniumAsteroids",
82: "zoneDublinGoldField",
82: "zoneDublinGoldField",
128: "zoneJerseyDebris",
128: "zoneJerseyDebris",
129: "zoneDetroitDebrisNormal",
129: "zoneDetroitDebrisNormal",
130: "zoneDetroitDebrisHigh",
130: "zoneDetroitDebrisHigh",
132: "zoneDetroitDebrisLow",
132: "zoneDetroitDebrisLow",
256: "zoneIceAsteroidsSmall",
256: "zoneIceAsteroidsSmall",
257: "zoneIceAsteroidsTau37",
257: "zoneIceAsteroidsTau37",
258: "zoneIceAsteroids1",
258: "zoneIceAsteroids1",
512: "zoneLavaRocks",
512: "zoneLavaRocks",
513: "zoneVonRoheBeltLavaRocks",
513: "zoneVonRoheBeltLavaRocks",
514: "zoneDresdenLavaRocks",
514: "zoneDresdenLavaRocks",
1024: "zoneGreenAsteroids",
1024: "zoneGreenAsteroids",
1026: "zoneZetaGreenAsteroids",
1026: "zoneZetaGreenAsteroids",
2049: "zoneIceAsteroids2",
2049: "zoneIceAsteroids2",
4096: "zoneMinefield1",
4096: "zoneMinefield1",
4128: "zoneMinefield2",
4128: "zoneMinefield2",
8192: "zoneAsteroidField",
8192: "zoneAsteroidField",
8200: "zoneAsteroids",
8200: "zoneAsteroids",
16400: "zoneIceNebula",
16400: "zoneIceNebula",
32768: "zoneDresdenFog",
32768: "zoneDresdenFog",
32776: "zoneLeedsSmog",
32776: "zoneLeedsSmog",
32833: "zoneChugokuCloud",
32833: "zoneChugokuCloud",
62768: "zoneNebulaWithFogColour",
62768: "zoneNebulaWithFogColour",
65536: "zoneExclusion1",
65536: "zoneExclusion1",
131072: "zoneExclusion2",
131072: "zoneExclusion2",
196608: "zoneExclusion3"
196608: "zoneExclusion3"
};
};
function updateCookie(){
function updateCookie(){
var elementValues = {};
var elementValues = {};
$(":checkbox").each(function(){
$(":checkbox").each(function(){
elementValues[this.id] = this.checked;
elementValues[this.id] = this.checked;
});
});


elementValues["buttonText"] = $("button").text();
elementValues["buttonText"] = $("button").text();
$.cookie('elementValues', elementValues, { expires: 7, path: '/' })
$.cookie('elementValues', elementValues, { expires: 7, path: '/' })
}
}


function repopulateFormElements(){
function repopulateFormElements(){
var elementValues = $.cookie('elementValues');
var elementValues = $.cookie('elementValues');
if (elementValues){
if (elementValues){
Object.keys(elementValues).forEach(function(element) {
Object.keys(elementValues).forEach(function(element) {
var checked = elementValues[element];
var checked = elementValues[element];
$("#" + element).prop('checked', checked);
$("#" + element).prop('checked', checked);
});
});
$("button").text(elementValues["buttonText"]);
$("button").text(elementValues["buttonText"]);
}
}
}
}
$(document).ready(function () {
$(document).ready(function () {
$(":checkbox").on("change", function(){
$(":checkbox").on("change", function(){
updateCookie();
updateCookie();
updateConfigClasses();
updateConfigClasses();
});
});


$("#configButton").click(function(event) {
$("#configButton").click(function(event) {
toggleConfigMenu();
toggleConfigMenu();
event.stopPropagation();
event.stopPropagation();
});
});
$("#screenshotButton").click(function(event) {
$("#screenshotButton").click(function(event) {
$("body").toggleClass("screenshotMode");
$("body").toggleClass("screenshotMode");
});
});


$.cookie.json = true;
$.cookie.json = true;
repopulateFormElements();
repopulateFormElements();
// initialise rising/falling edge detector
prevResponsiveState = "init";
/* if (document.querySelector(".configOption#responsive input").checked) {
prevResponsiveState = "checked";
} else {
prevResponsiveState = "unchecked";
} */
updateConfigClasses();
updateConfigClasses();
});
});
function toggleConfigMenu () {
function toggleConfigMenu () {
$(".configMenu").toggleClass("closed");
$(".configMenu").toggleClass("closed");
console.log("configMenu toggled");
console.log("configMenu toggled");
if (document.querySelector(".configMenu").className.indexOf("closed") == -1) {
if (document.querySelector(".configMenu").className.indexOf("closed") == -1) {
$('html').click(function() {
$('html').click(function() {
$(".configMenu").addClass("closed");
$(".configMenu").addClass("closed");
});
});
$(".configMenu").click(function(event){
$(".configMenu").click(function(event){
event.stopPropagation();
event.stopPropagation();
});
});
} else {
} else {
$("html").unbind("click");
$("html").unbind("click");
$(".configMenu").unbind("click");
$(".configMenu").unbind("click");
}
}
}
}
function updateConfigClasses() {
function updateConfigClasses() {
if (document.querySelector(".configOption#wrecks input").checked) {
if (document.querySelector(".configOption#wrecks input").checked) {
$(".object.wreck").removeClass("hidden");
$(".object.wreck").removeClass("hidden");
$(".map .object.wreck label").hAlign();
} else {
} else {
$(".object.wreck").addClass("hidden");
$(".object.wreck").addClass("hidden");
}
}
if (document.querySelector(".configOption#wreckLabels input").checked) {
$(".object.wreck label").removeClass("hidden");
$(".map .object.wreck label").hAlign();
} else {
$(".object.wreck label").addClass("hidden");
}
console.log("prevResponsiveState = "+prevResponsiveState);
if (document.querySelector(".configOption#responsive input").checked && (prevResponsiveState == "unchecked" | prevResponsiveState == "init")) {
$(".systemConnection").remove();
$("body").addClass("responsive");
prevResponsiveState = "checked";
generateSystemConnections();
} else if (!document.querySelector(".configOption#responsive input").checked && prevResponsiveState == "checked" | prevResponsiveState == "init") {
$(".systemConnection").remove();
$("body").removeClass("responsive");
prevResponsiveState = "unchecked";
generateSystemConnections();
}
if (document.querySelector(".configOption#zoneLabels input").checked) {
$(".zone label").not($(".mineable label")).removeClass("hidden");
$(".map .zone label").hAlign();
} else {
$(".zone label").not($(".mineable label")).addClass("hidden");
}
if (document.querySelector(".configOption#zones input").checked) {
if (document.querySelector(".configOption#zones input").checked) {
$(".zone").removeClass("hidden");
$(".zone").removeClass("hidden");
$(".map .zone label").hAlign();
} else {
} else {
$(".zone").addClass("hidden");
$(".zone").addClass("hidden");
}
}
if (document.querySelector(".configOption#connections input").checked
if (document.querySelector(".configOption#connections input").checked
&& document.querySelector(".systemConnectionProp") == null) {
&& document.querySelector(".systemConnectionProp") == null) {
generateSystemConnections();
generateSystemConnections();
if (document.querySelector(".map .system") == null) {
if (document.querySelector(".map .system") == null) {
$(".systemConnectionProp").hide();
$(".systemConnectionProp").hide();
}
}
} else if (!(document.querySelector(".configOption#connections input").checked)) {
} else if (!(document.querySelector(".configOption#connections input").checked)) {
$(".systemConnectionProp").hide();
$(".systemConnectionProp").hide();
} else if (document.querySelector(".configOption#connections input").checked
} else if (document.querySelector(".configOption#connections input").checked
&& document.querySelector(".map .system") !== null) {
&& document.querySelector(".map .system") !== null) {
$(".systemConnectionProp").show();
$(".systemConnectionProp").show();
}
}
if (document.querySelector(".configOption#oorp input").checked) {
if (document.querySelector(".configOption#oorp input").checked) {
$(".oorp").removeClass("hidden");
$(".oorp").removeClass("hidden");
$(".map .system.oorp label").hAlign();
$(".map .system.oorp label").hAlign();
} else {
} else {
$(".oorp").addClass("hidden");
$(".oorp").addClass("hidden");
}
}
generateSystemScale(currentSystem);
generateSystemScale(currentSystem);
if (document.querySelector(".map .system") == null) {
if (document.querySelector(".map .system") == null) {
$(".systemConnectionProp").hide();
$(".systemConnectionProp").hide();
}
}
console.log("config classes updated");
}
}
var currentSystem;
var currentSystem;
function generateSystemScale(system) {
function generateSystemScale(system) {
if (document.querySelector(".mapScale") != null) {
if (document.querySelector(".mapScale") != null) {
currentSystem = system;
currentSystem = system;
if (document.querySelector(".configOption#scale input").checked) {
if (document.querySelector(".configOption#scale input").checked) {
$(".mapScale").addClass("arrows");
$(".mapScale").addClass("arrows");
baseSize = 30;
baseSize = 30;
} else {
} else {
$(".mapScale").removeClass("arrows");
$(".mapScale").removeClass("arrows");
baseSize = 27.5;
baseSize = 27.5;
}
}
if (typeof systemScaleFactorArray[system.toLowerCase()] === "undefined") {
if (typeof systemScaleFactorArray[system.toLowerCase()] === "undefined") {
document.querySelector(".mapScale h2").innerHTML = baseSize+"k";
document.querySelector(".mapScale h2").innerHTML = baseSize+"k";
} else {
} else {
document.querySelector(".mapScale h2").innerHTML = (Math.round(baseSize/systemScaleFactorArray[system.toLowerCase()]*10) / 10)+"K";
document.querySelector(".mapScale h2").innerHTML = (Math.round(baseSize/systemScaleFactorArray[system.toLowerCase()]*10) / 10)+"K";
}
}
}
}
}
}
function generateLookupArrays() {
function generateLookupArrays() {
$.get(baseNameFile, function(data) {
$.get(baseNameFile, function(data) {
var nameArray = data.split("\n");
var nameArray = data.split("\n");
for (i = 0; i < nameArray.length; i++) {
for (i = 0; i < nameArray.length; i++) {
var keyPairArray = nameArray[i].split(" = ");
var keyPairArray = nameArray[i].split(" = ");
baseNameArray[keyPairArray[0].toLowerCase()] = keyPairArray[1];
baseNameArray[keyPairArray[0].toLowerCase()] = keyPairArray[1];
}
}
});
});
$.get(systemNameFile, function(data) {
$.get(systemNameFile, function(data) {
var nameArray = data.split("\n");
var nameArray = data.split("\n");
for (i = 0; i < nameArray.length; i++) {
for (i = 0; i < nameArray.length; i++) {
var keyPairArray = nameArray[i].split(" = ");
var keyPairArray = nameArray[i].split(" = ");
systemNameArray[keyPairArray[0].toLowerCase()] = keyPairArray[1];
systemNameArray[keyPairArray[0].toLowerCase()] = keyPairArray[1];
systemClassArray[keyPairArray[0].toLowerCase()] = keyPairArray[1].toString().slice(0,2).toLowerCase();
systemClassArray[keyPairArray[0].toLowerCase()] = keyPairArray[1].toString().slice(0,2).toLowerCase();
}
}
});
});


$.get(commodityNameFile, function(data) {
$.get(commodityNameFile, function(data) {
var nameArray = data.split("\n");
var nameArray = data.split("\n");
for (i = 0; i < nameArray.length; i++) {
for (i = 0; i < nameArray.length; i++) {
var keyPairArray = nameArray[i].substring(13).split(", ");
var keyPairArray = nameArray[i].substring(13).split(", ");
commodityNameArray[keyPairArray[0].toLowerCase()] = keyPairArray[1];
commodityNameArray[keyPairArray[0].toLowerCase()] = keyPairArray[1];
}
}
});
});


$.get(factionNameFile, function(data) {
$.get(factionNameFile, function(data) {
var nameArray = data.split("\n");
var nameArray = data.split("\n");
for (i = 0; i < nameArray.length; i++) {
for (i = 0; i < nameArray.length; i++) {
var keyPairArray = nameArray[i].split(" = ");
var keyPairArray = nameArray[i].split(" = ");
factionNameArray[keyPairArray[0].toLowerCase()] = keyPairArray[1].trim();
factionNameArray[keyPairArray[0].toLowerCase()] = keyPairArray[1].trim();
}
}
});
});
$.get(infocardFile, function(data) {
$.get(infocardFile, function(data) {
var rawInfocardArray = data.split("\r\n");
var rawInfocardArray = data.split("\r\n");
for (i = 0; i < rawInfocardArray.length-1; i += 2) {
for (i = 0; i < rawInfocardArray.length-1; i += 2) {
infocardArray[rawInfocardArray[i].toString()] = rawInfocardArray[i+1].toString();
infocardArray[rawInfocardArray[i].toString()] = rawInfocardArray[i+1].toString();
}
}
infocardArrayState = "ready";
infocardArrayState = "ready";
console.log("Infocard lookup array generated");
console.log("Infocard lookup array generated");
});
});
$.get(systemPathFile, function(data) {
$.get(systemPathFile, function(data) {
var rawPathFileArray = data.split("\r\n");
var rawPathFileArray = data.split("\r\n");
for (i = 0; i < rawPathFileArray.length; i++) {
for (i = 0; i < rawPathFileArray.length; i++) {
if (rawPathFileArray[i].indexOf("Path =") != -1) {
if (rawPathFileArray[i].indexOf("Path =") != -1) {
var currentConnection = rawPathFileArray[i].match(pathRegex).join().substring(7).replace(/ /g,"").split(",");
var currentConnection = rawPathFileArray[i].match(pathRegex).join().substring(7).replace(/ /g,"").split(",");
if (typeof currentConnection[3] !== "undefined") {
if (typeof currentConnection[3] !== "undefined") {
var lowCurrentConnection = currentConnection[0].trim().toLowerCase();
var lowCurrentConnection = currentConnection[0].trim().toLowerCase();
if (typeof connectionArray[lowCurrentConnection] == "undefined") {
if (typeof connectionArray[lowCurrentConnection] == "undefined") {
connectionArray[lowCurrentConnection] = [currentConnection[3].trim().toLowerCase()];
connectionArray[lowCurrentConnection] = [currentConnection[3].trim().toLowerCase()];
}
}
if (connectionArray[lowCurrentConnection].indexOf(currentConnection[3].trim().toLowerCase()) == -1) {
if (connectionArray[lowCurrentConnection].indexOf(currentConnection[3].trim().toLowerCase()) == -1) {
connectionArray[lowCurrentConnection].push(currentConnection[3].trim().toLowerCase());
connectionArray[lowCurrentConnection].push(currentConnection[3].trim().toLowerCase());
}
}
}
}
}
}
}
}
connectionArrayState = "ready";
connectionArrayState = "ready";
console.log("Connection lookup array generated");
console.log("Connection lookup array generated");
});
});
$.get(systemLegalPathFile, function(data) {
$.get(systemLegalPathFile, function(data) {
var rawLegalPathFileArray = data.split("\r\n");
var rawLegalPathFileArray = data.split("\r\n");
for (i = 0; i < rawLegalPathFileArray.length; i++) {
for (i = 0; i < rawLegalPathFileArray.length; i++) {
if (rawLegalPathFileArray[i].indexOf("Path =") != -1) {
if (rawLegalPathFileArray[i].indexOf("Path =") != -1) {
var currentConnection = rawLegalPathFileArray[i].match(pathRegex).join().substring(7).replace(/ /g,"").split(",");
var currentConnection = rawLegalPathFileArray[i].match(pathRegex).join().substring(7).replace(/ /g,"").split(",");
if (typeof currentConnection[3] !== "undefined") {
if (typeof currentConnection[3] !== "undefined") {
var lowCurrentConnection = currentConnection[0].trim().toLowerCase();
var lowCurrentConnection = currentConnection[0].trim().toLowerCase();
if (typeof jgConnectionArray[lowCurrentConnection] == "undefined") {
if (typeof jgConnectionArray[lowCurrentConnection] == "undefined") {
jgConnectionArray[lowCurrentConnection] = [currentConnection[3].trim().toLowerCase()];
jgConnectionArray[lowCurrentConnection] = [currentConnection[3].trim().toLowerCase()];
}
}
if (jgConnectionArray[lowCurrentConnection].indexOf(currentConnection[3].trim().toLowerCase()) == -1) {
if (jgConnectionArray[lowCurrentConnection].indexOf(currentConnection[3].trim().toLowerCase()) == -1) {
jgConnectionArray[lowCurrentConnection].push(currentConnection[3].trim().toLowerCase());
jgConnectionArray[lowCurrentConnection].push(currentConnection[3].trim().toLowerCase());
}
}
}
}
}
}
}
}
jgConnectionArrayState = "ready";
jgConnectionArrayState = "ready";
console.log("Jumpgate connection lookup array generated");
console.log("Jumpgate connection lookup array generated");
});
});
$.get(universeFile, function(data) {
$.get(universeFile, function(data) {
universeFileGetResult = data;
universeFileGetResult = data;
var universeArray = data.match(systemRegex);
var universeArray = data.match(systemRegex);
for (i = 0; i < universeArray.length; i++) {
for (i = 0; i < universeArray.length; i++) {
if (universeArray[i].toLowerCase().indexOf("strid_name =") != -1) {
if (universeArray[i].toLowerCase().indexOf("strid_name =") != -1) {
var sysNameIds = universeArray[i].toLowerCase().match(idsSysNameRegex).join().substring(13);
var sysNameIds = universeArray[i].toLowerCase().match(idsSysNameRegex).join().substring(13);
var nameString = universeArray[i].toLowerCase().match(nameRegex).join().substring(11);
var nameString = universeArray[i].toLowerCase().match(nameRegex).join().substring(11);
systemIdsNameArray[nameString.toLowerCase()] = sysNameIds;
systemIdsNameArray[nameString.toLowerCase()] = sysNameIds;
}
}
if (universeArray[i].toLowerCase().indexOf("pos =") != -1) {
if (universeArray[i].toLowerCase().indexOf("pos =") != -1) {
var sysPos = universeArray[i].toLowerCase().match(posRegex).join().substring(6).replace(/ /g,"").split(",");
var sysPos = universeArray[i].toLowerCase().match(posRegex).join().substring(6).replace(/ /g,"").split(",");
var nameString = universeArray[i].toLowerCase().match(nameRegex).join().substring(11);
var nameString = universeArray[i].toLowerCase().match(nameRegex).join().substring(11);
systemPosArray[nameString.toLowerCase()] = sysPos;
systemPosArray[nameString.toLowerCase()] = sysPos;
}
}
if (universeArray[i].toLowerCase().indexOf("navmapscale") != -1) {
if (universeArray[i].toLowerCase().indexOf("navmapscale") != -1) {
var scaleFactor = universeArray[i].toLowerCase().match(scaleRegex).join().substring(14);
var scaleFactor = universeArray[i].toLowerCase().match(scaleRegex).join().substring(14);
var nameString = universeArray[i].toLowerCase().match(nameRegex).join().substring(11);
var nameString = universeArray[i].toLowerCase().match(nameRegex).join().substring(11);
systemScaleFactorArray[nameString.toLowerCase()] = parseFloat(scaleFactor);
systemScaleFactorArray[nameString.toLowerCase()] = parseFloat(scaleFactor);
}
}
}
}
systemPosArray["ev01"] = [-1,17];
systemPosArray["ev01"] = [-1,17];
systemIdsNameArrayState = "ready";
systemIdsNameArrayState = "ready";
systemScaleFactorArrayState = "ready";
systemScaleFactorArrayState = "ready";
systemPosArrayState = "ready";
systemPosArrayState = "ready";
console.log("System scale lookup array generated");
console.log("System scale lookup array generated");
console.log("Universe map position lookup array generated");
console.log("Universe map position lookup array generated");
console.log("System name infocard number lookup array generated");
console.log("System name infocard number lookup array generated");
});
});
generateSearchArray();
generateSearchArray();
}
}
function generateSearchArray() {
function generateSearchArray() {
if (infocardArrayState != "ready" | systemIdsNameArrayState != "ready") {
if (infocardArrayState != "ready" | systemIdsNameArrayState != "ready") {
setTimeout(function(){generateSearchArray()},10);
setTimeout(function(){generateSearchArray()},10);
} else {
} else {
for (systemNickname in systemIdsNameArray) {
for (systemNickname in systemIdsNameArray) {
if(systemNickname.toLowerCase().indexOf("sector") == -1) {
if(systemNickname.toLowerCase().indexOf("sector") == -1) {
matchArray.push(infocardArray[systemIdsNameArray[systemNickname]]);
matchArray.push(infocardArray[systemIdsNameArray[systemNickname]]);
searchArray[infocardArray[systemIdsNameArray[systemNickname]]] = systemNickname;
searchArray[infocardArray[systemIdsNameArray[systemNickname]]] = systemNickname;
searchArray[infocardArray[systemIdsNameArray[systemNickname]].toLowerCase()] = systemNickname;
searchArray[infocardArray[systemIdsNameArray[systemNickname]].toLowerCase()] = systemNickname;
}
}
}
}
var universeBaseArray = universeFileGetResult.match(baseRegex);
var universeBaseArray = universeFileGetResult.match(baseRegex);
for (i = 0; i < universeBaseArray.length; i++) {
for (i = 0; i < universeBaseArray.length; i++) {
if (universeBaseArray[i].toLowerCase().indexOf("proxy_base") == -1
if (universeBaseArray[i].toLowerCase().indexOf("proxy_base") == -1
&& universeBaseArray[i].toLowerCase().indexOf("miners") == -1
&& universeBaseArray[i].toLowerCase().indexOf("miners") == -1
&& universeBaseArray[i].toLowerCase().indexOf("system =") != -1
&& universeBaseArray[i].toLowerCase().indexOf("system =") != -1
&& universeBaseArray[i].toLowerCase().indexOf("strid_name") != -1) {
&& universeBaseArray[i].toLowerCase().indexOf("strid_name") != -1) {
var baseName = infocardArray[universeBaseArray[i].toLowerCase().match(idsSysNameRegex).join().substring(13)];
var baseName = infocardArray[universeBaseArray[i].toLowerCase().match(idsSysNameRegex).join().substring(13)];
var systemNickname = universeBaseArray[i].toLowerCase().match(sysNameRegex).join().substring(9);
var systemNickname = universeBaseArray[i].toLowerCase().match(sysNameRegex).join().substring(9);
if (typeof baseName !== "undefined" && typeof systemNickname !== "undefined") {
if (typeof baseName !== "undefined" && typeof systemNickname !== "undefined") {
baseSystemArray[baseName.toLowerCase()] = systemNickname.toLowerCase();
baseSystemArray[baseName.toLowerCase()] = systemNickname.toLowerCase();
matchArray.push(baseName);
matchArray.push(baseName);
searchArray[baseName] = systemNickname;
searchArray[baseName] = systemNickname;
searchArray[baseName.toLowerCase()] = systemNickname;
searchArray[baseName.toLowerCase()] = systemNickname;
} else {
} else {
console.log(universeBaseArray[i] + " infocardNumber: "+universeBaseArray[i].toLowerCase().match(idsSysNameRegex).join().substring(13) + " systemNick: "+ systemNickname);
console.log(universeBaseArray[i] + " infocardNumber: "+universeBaseArray[i].toLowerCase().match(idsSysNameRegex).join().substring(13) + " systemNick: "+ systemNickname);
}
}
}
}
}
}
searchArrayState = "ready";
searchArrayState = "ready";
console.log("Base system lookup array generated");
console.log("Base system lookup array generated");
baseSystemArrayState = "ready";
baseSystemArrayState = "ready";
console.log("Search array generated");
console.log("Search array generated");
}
}
}
}
function parseInfocard(infocard) {
function parseInfocard(infocard) {
console.log(infocard);
console.log(infocard);
if (infocard.toLowerCase().indexOf("<text>") == -1) {
if (infocard.toLowerCase().indexOf("<text>") == -1) {
return infocard;
return infocard;
} else {
} else {
return infocard.toString().match(textRegex).map(function (textElement) {
return infocard.toString().match(textRegex).map(function (textElement) {
if (textElement.toLowerCase().indexOf("<para") != -1) {
if (textElement.toLowerCase().indexOf("<para") != -1) {
return "<br class='infocardBreak'>";
return "<br class='infocardBreak'>";
} else {
} else {
return "<span class='infocardText'>"+textElement.slice(6,-7)+"</span>";
return "<span class='infocardText'>"+textElement.slice(6,-7)+"</span>";
}
}
}).join("");
}).join("");
}
}
}
}
function scrollUp() {
function scrollUp() {
$('html, body').animate({ scrollTop: 0}, 150);
history.replaceState(longSystemName, "Discovery Navmap for "+longSystemName, "#"+encodeURI(longSystemName));
Text moved with changes from lines 527-531 (92.6% similarity)
$('html, body').animate({ scrollTop: 0}, 300, function(){
while (document.querySelector(".infocardContainer").firstChild) {
document.querySelector(".infocardContainer").removeChild(document.querySelector(".infocardContainer").firstChild);
}
document.querySelector(".infocardContainer").style.display = "none";
});
}
}
function showObjectInfo(idsNameNumber, idsInfoNumber, classString, zPosition, factionNickname, systemNickname, dynamicCommodity, dynamicDifficulty, dynamicCount) {
function showObjectInfo(idsNameNumber, idsInfoNumber, classString, zPosition, factionNickname, systemNickname, dynamicCommodity, dynamicDifficulty, dynamicCount) {
$(".highlighter").remove();
document.querySelector(".infocardContainer").style.display = "block";
document.querySelector(".infocardContainer").style.display = "block";
var scaleFactor = 1;
var scaleFactor = 1;
if (typeof systemScaleFactorArray[systemNickname] !== "undefined") {
if (typeof systemScaleFactorArray[systemNickname] !== "undefined") {
scaleFactor = parseFloat(systemScaleFactorArray[systemNickname]);
scaleFactor = parseFloat(systemScaleFactorArray[systemNickname]);
}
}
var planePosition;
var planePosition;
if (zPosition == 0) {
if (zPosition == 0) {
planePosition = "on";
planePosition = "on";
} else if (zPosition > 0) {
} else if (zPosition > 0) {
planePosition = (Math.round(parseFloat(zPosition)/(scaleFactor*1000)*10) / 10)+"K above";
planePosition = (Math.round(parseFloat(zPosition)/(scaleFactor*1000)*10) / 10)+"K above";
} else if (zPosition < 0) {
} else if (zPosition < 0) {
planePosition = (Math.round(parseFloat(zPosition)/(scaleFactor*1000)*-10) / 10)+"K below";
planePosition = (Math.round(parseFloat(zPosition)/(scaleFactor*1000)*-10) / 10)+"K below";
} else {
} else {
// :)))
// :)))
planePosition = "non-standard in relation to";
planePosition = "non-standard in relation to";
}
}
if (typeof factionNickname !== "undefined") {
if (typeof factionNickname !== "undefined") {
var ownerString = " It belongs to "+factionNameArray[factionNickname]+".";
var ownerString = " It belongs to "+factionNameArray[factionNickname]+".";
} else {
} else {
var ownerString = "";
var ownerString = "";
}
}
if (typeof searchArray[infocardArray[idsNameNumber]] !== "undefined"
&& searchArray[infocardArray[idsNameNumber]].toLowerCase() == currentSystemNickname.toLowerCase()) {
history.replaceState(longSystemName, "Discovery Navmap for "+longSystemName, "#"+encodeURI(infocardArray[idsNameNumber]));
} else {
history.replaceState(longSystemName, "Discovery Navmap for "+longSystemName, "#"+encodeURI(longSystemName));
}
var infoString = "";
var infoString = "";
var miningString = "";
var miningString = "";
var scrollUpString = "<div class='scrollUpButton' onclick='scrollUp()'><i class='fa fa-arrow-circle-o-up'></i><p>Scroll up</p></div>";
var scrollUpString = "<div class='scrollUpButton' onclick='scrollUp()'><i class='fa fa-arrow-circle-o-up'></i><p>Scroll up / Close</p></div>";
if (typeof dynamicCommodity !== "undefined") {
if (typeof dynamicCommodity !== "undefined") {
if (dynamicCount.indexOf("1, 1") == -1) {
if (dynamicCount.indexOf("1, 1") == -1) {
amountString = dynamicCount.replace(/\s/g, '').split(",").join(" to ")+" units";
amountString = dynamicCount.replace(/\s/g, '').split(",").join(" to ")+" units";
} else {
} else {
amountString = "one unit";
amountString = "one unit";
}
}
var commodityName = dynamicCommodity;
var commodityName = dynamicCommodity;
var commodityArrayName = commodityNameArray[dynamicCommodity.toLowerCase()];
var commodityArrayName = commodityNameArray[dynamicCommodity.toLowerCase()];
if (typeof commodityArrayName !== "undefined") {
if (typeof commodityArrayName !== "undefined") {
commodityName = commodityArrayName;
commodityName = commodityArrayName;
}
}
miningString = "<p>This zone drops "+amountString+" of the commodity "+commodityName+" when mined using <a id='miningLink' href='http://discoverygc.com/forums/showthread.php?tid=132063' target='_BLANK'>appropriate equipment</a>.</p>";
miningString = "<p>This zone drops "+amountString+" of the commodity "+commodityName+" when mined using <a id='miningLink' href='http://discoverygc.com/forums/showthread.php?tid=132063' target='_BLANK'>appropriate equipment</a>.</p>";
}
}
if (typeof idsInfoNumber !== "undefined") {
if (typeof idsInfoNumber !== "undefined") {
if ((classString.indexOf("base") != -1 | classString.indexOf("planet") != -1) && classString.indexOf("dockable") != -1 && typeof infocardArray[(parseInt(idsInfoNumber)+1).toString()] !== "undefined" && idsInfoNumber != 66140 && idsInfoNumber != 66143) {
if ((classString.indexOf("base") != -1 | classString.indexOf("planet") != -1) && classString.indexOf("dockable") != -1 && typeof infocardArray[(parseInt(idsInfoNumber)+1).toString()] !== "undefined" && idsInfoNumber != 66140 && idsInfoNumber != 66143) {
var infocardURI = encodeURI(infocardArray[(parseInt(idsInfoNumber)+1).toString()]);
var infocardURI = encodeURI(infocardArray[(parseInt(idsInfoNumber)+1).toString()]);
document.querySelector(".infocardContainer").innerHTML = "<h2>"+infocardArray[idsNameNumber]+"</h2>"+parseInfocard(infocardArray[idsInfoNumber])+parseInfocard(infocardArray[(parseInt(idsInfoNumber)+1).toString()])+"<h3>Technical info</h3><p class='technicalInfo'>This object is located "+planePosition+" the plane, and has infocard number "+idsInfoNumber+", base description infocard number "+(parseInt(idsInfoNumber)+1).toString()+" and name infocard number "+idsNameNumber+"."+ownerString+" "+"<a class='editLink' target='_blank'><i class='fa fa-pencil-square-o'></i></a></p>"+miningString+scrollUpString;
document.querySelector(".infocardContainer").innerHTML = "<h2>"+infocardArray[idsNameNumber]+"</h2>"+parseInfocard(infocardArray[idsInfoNumber])+parseInfocard(infocardArray[(parseInt(idsInfoNumber)+1).toString()])+"<h3>Technical info</h3><p class='technicalInfo'>This object is located "+planePosition+" the plane, and has infocard number "+idsInfoNumber+", base description infocard number "+(parseInt(idsInfoNumber)+1).toString()+" and name infocard number "+idsNameNumber+"."+ownerString+" "+"<a class='editLink' target='_blank'><i class='fa fa-pencil-square-o'></i></a></p>"+miningString+scrollUpString;
document.querySelector(".editLink").href = "https://docs.google.com/forms/d/1bIYtQCx0lLgguEF6xWDm0RRFr0IIz-tM1Toh6SyB9wA/viewform?entry.515729986="+(parseInt(idsInfoNumber)+1).toString()+"&entry.628548621="+infocardURI+"&entry.899322418="+infocardURI;
document.querySelector(".editLink").href = "https://docs.google.com/forms/d/1bIYtQCx0lLgguEF6xWDm0RRFr0IIz-tM1Toh6SyB9wA/viewform?entry.515729986="+(parseInt(idsInfoNumber)+1).toString()+"&entry.628548621="+infocardURI+"&entry.899322418="+infocardURI;
} else {
} else {
var infocardURI = encodeURI(infocardArray[idsInfoNumber]);
var infocardURI = encodeURI(infocardArray[idsInfoNumber]);
document.querySelector(".infocardContainer").innerHTML = "<h2>"+infocardArray[idsNameNumber]+"</h2>"+parseInfocard(infocardArray[idsInfoNumber])+"<h3>Technical info</h3><p class='technicalInfo'>This object is located "+planePosition+" the plane, and has infocard number "+idsInfoNumber+" and name infocard number "+idsNameNumber+"."+ownerString+" "+"<a class='editLink' target='_blank'><i class='fa fa-pencil-square-o'></i></a></p>"+miningString+scrollUpString;
document.querySelector(".infocardContainer").innerHTML = "<h2>"+infocardArray[idsNameNumber]+"</h2>"+parseInfocard(infocardArray[idsInfoNumber])+"<h3>Technical info</h3><p class='technicalInfo'>This object is located "+planePosition+" the plane, and has infocard number "+idsInfoNumber+" and name infocard number "+idsNameNumber+"."+ownerString+" "+"<a class='editLink' target='_blank'><i class='fa fa-pencil-square-o'></i></a></p>"+miningString+scrollUpString;
document.querySelector(".editLink").href = "https://docs.google.com/forms/d/1bIYtQCx0lLgguEF6xWDm0RRFr0IIz-tM1Toh6SyB9wA/viewform?entry.515729986="+idsInfoNumber+"&entry.628548621="+infocardURI+"&entry.899322418="+infocardURI;
document.querySelector(".editLink").href = "https://docs.google.com/forms/d/1bIYtQCx0lLgguEF6xWDm0RRFr0IIz-tM1Toh6SyB9wA/viewform?entry.515729986="+idsInfoNumber+"&entry.628548621="+infocardURI+"&entry.899322418="+infocardURI;
}
}
} else if (typeof dynamicCommodity !== "undefined") {
} else if (typeof dynamicCommodity !== "undefined") {
document.querySelector(".infocardContainer").innerHTML = miningString+scrollUpString;
document.querySelector(".infocardContainer").innerHTML = miningString+scrollUpString;
}
}
console.log("Infocard "+idsInfoNumber+" for "+infocardArray[idsNameNumber]+" fetched");
console.log("Infocard "+idsInfoNumber+" for "+infocardArray[idsNameNumber]+" fetched");
if ($(".navContainer").css("position") == "fixed") {
if ($(".navContainer").css("position") == "fixed") {
$('html, body').animate({ scrollTop: $("body").scrollTop()+document.querySelector(".infocardContainer *:first-child").getBoundingClientRect().top-document.querySelector(".navContainer").scrollHeight}, 150);
$('html, body').animate({ scrollTop: $("body").scrollTop()+document.querySelector(".infocardContainer *:first-child").getBoundingClientRect().top-document.querySelector(".navContainer").scrollHeight}, 300);
} else {
} else {
$('html, body').animate({ scrollTop: $("body").scrollTop()+document.querySelector(".infocardContainer *:first-child").getBoundingClientRect().top}, 150);
$('html, body').animate({ scrollTop: $("body").scrollTop()+document.querySelector(".infocardContainer *:first-child").getBoundingClientRect().top}, 300);
}
}
}
}
function findObjectName(internalNickname, classString) {
function findObjectName(internalNickname, classString) {
if (typeof classString !== "undefined" && typeof internalNickname !== "undefined" && classString.indexOf("jump") != -1) {
if (typeof classString !== "undefined" && typeof internalNickname !== "undefined" && classString.indexOf("jump") != -1) {
if (classString.indexOf("hole") != -1) {
if (classString.indexOf("hole") != -1) {
var jumpSystems = internalNickname.slice(0,-5).split("_to_");
var jumpSystems = internalNickname.slice(0,-5).split("_to_");
return systemNameArray[jumpSystems[0].toLowerCase()] + " > " + systemNameArray[jumpSystems[1].toLowerCase()] + " Jump Hole";
return systemNameArray[jumpSystems[0].toLowerCase()] + " > " + systemNameArray[jumpSystems[1].toLowerCase()] + " Jump Hole";
} else {
} else {
var jumpSystems = internalNickname.split("_to_");
var jumpSystems = internalNickname.split("_to_");
return systemNameArray[jumpSystems[0].toLowerCase()] + " > " + systemNameArray[jumpSystems[1].toLowerCase()] + " Jump Gate";
return systemNameArray[jumpSystems[0].toLowerCase()] + " > " + systemNameArray[jumpSystems[1].toLowerCase()] + " Jump Gate";
}
}
}
}
if (baseNameArray[internalNickname.toLowerCase()] != null) {
if (baseNameArray[internalNickname.toLowerCase()] != null) {
return baseNameArray[internalNickname.toLowerCase()];
return baseNameArray[internalNickname.toLowerCase()];
} else if (baseNameArray[internalNickname.toLowerCase()+"_base"] != null) {
} else if (baseNameArray[internalNickname.toLowerCase()+"_base"] != null) {
return baseNameArray[internalNickname.toLowerCase()+"_base"];
return baseNameArray[internalNickname.toLowerCase()+"_base"];
} else {
} else {
return internalNickname + "???";
return
}
}
function createLoadAnimation() {
if (document.querySelector(".loadingOverlay") == null) {
$('html, body').animate({ scrollTop: 0 }, 150);
var loader = document.createElement("div");
loader.innerHTML = "<div class='loadTextContainer'><h2 class='loaderTitle'>Loading...</h2><div class='loader'></div></div>";
loader.className = "loadingOverlay";
document.querySelector("body").appendChild(loader);
}
}
function generateUniverseMap() {
createLoadAnimation();
document.querySelector(".navContainer #showUniverseMap").style.display = "none";
$(".grid").children().hide();
document.querySelector(".mapLegend").style.display = "block";
document.querySelector(".navContainer #helpLink").style.display = "block";
document.querySelector("#navSystemTitle").style.display = "none";
if (currentSystemNickname != "Sirius") {
history.replaceState("Sirius", "Discovery Navmap", ".");
}
if (document.querySelector(".configOption#connections input").checked) {
if (systemConnectionState = "ready") {
var systemConnectionsEvaluated = true;
} else {
var systemConnectionsEvaluated = false;
}
} else {
var systemConnectionsEvaluated = true;
}
if (infocardArrayState != "ready" | systemScaleFactorArrayState != "ready" | searchArrayState != "ready" | systemConnectionsEvaluated != true) {
setTimeout(function(){generateUniverseMap()},10);
} else {
if (document.querySelector(".configOption#connections input").checked) {
$(".systemConnectionProp").show();
}
document.querySelector(".loaderTitle").innerHTML = "Generating map...";
document.querySelector("#searchField").value = "";
currentSystemNickname = "Sirius";
document.querySelector(".grid").style.background = "url('SiriusMap.jpg') black"
document.querySelector(".grid").style.backgroundSize = "cover !important"
// empty the map div before doing anything else
Text moved with changes to lines 442-446 (92.6% similarity)
$(".map").children().not(".systemConnectionProp").remove();
while (document.querySelector(".infocardContainer").firstChild) {
document.querySelector(".infocardContainer").removeChild(document.querySelector(".infocardContainer").firstChild);
}
document.querySelector(".infocardContainer").style.display = "none";
if (document.querySelector(".systemTitle") == null) {
var systemTitle = document.createElement("h2");
document.querySelector(".grid").appendChild(syste