var StringMessage; //Variable utilisée dans la sauvegarde des RE sous forme de texte/////////////////////
var StringMessage; //Variable utilisée dans la sauvegarde des RE sous forme de texte/////////////////////
var GlobalProfileUsed = GetData('ProfileUsed','', 'Profile1'); //Default value is "Profile1"
var GlobalProfileUsed = GetData('ProfileUsed','', 'Profile1'); //Default value is "Profile1"
var IdMessages; //Variable utilisée pour stocker les id messages, ce qui facilite leur vérification lors de l'intégration d'un nouveau message
var IdMessages; //Variable utilisée pour stocker les id messages, ce qui facilite leur vérification lors de l'intégration d'un nouveau message
var MessageIndex = 0; //Variable permettant d'indexer les messages sauvegardés dans le script////////////
var MessageIndex = 0; //Variable permettant d'indexer les messages sauvegardés dans le script////////////
var NbColumnsDisplayed = 0; //Variable indiquant le nombre de colonnes affichées dans le tableau HTML (tableau contenant les RE)
var NbColumnsDisplayed = 0; //Variable indiquant le nombre de colonnes affichées dans le tableau HTML (tableau contenant les RE)
var NbItemsDisplayed = 0; //Variable indiquant le nombre de lignes affichées dans le tableau HTML (tableau contenant les RE)
var NbItemsDisplayed = 0; //Variable indiquant le nombre de lignes affichées dans le tableau HTML (tableau contenant les RE)
var TriDone = 0; //Variable indiquant au script si un tri a déja été réalisé ou non
var TriDone = 0; //Variable indiquant au script si un tri a déja été réalisé ou non
var currentID; //Variable utilisée pour les boutons de tri (l'entête du tableau), dans la fonction initialisation tableau. Permet de faire passer un nom de propriété d'objet variable entre la fonction et le trieur
var currentID; //Variable utilisée pour les boutons de tri (l'entête du tableau), dans la fonction initialisation tableau. Permet de faire passer un nom de propriété d'objet variable entre la fonction et le trieur
var currentSort = GetData(GlobalProfileUsed, 'DropDown3', 'Loot'); //Variable used to know by which column to sort the board (user selected) --> default value is Loot
var currentSort = GetData(GlobalProfileUsed, 'DropDown3', 'Loot'); //Variable used to know by which column to sort the board (user selected) --> default value is Loot
var OldSorting = currentSort;
var OldSorting = currentSort;
var currentRCListSort = GetData('General', 'OptRC1000', 'DateStamp');
var currentRCListSort = GetData('General', 'OptRC1000', 'DateStamp');
var OldcurrentRCListSort = currentRCListSort;
var OldcurrentRCListSort = currentRCListSort;
var currentCoordListSort = GetData('General', 'OptRC1000', 'Coord_CoordCalc');
var currentCoordListSort = GetData('General', 'OptRC1000', 'Coord_CoordCalc');
var OldcurrentCoordListSort = currentCoordListSort;
var OldcurrentCoordListSort = currentCoordListSort;
var currentDailyListSort = GetData('General', 'OptRC1000', 'Day_Date'); //Note : n'existe pas, pour l'instant et renvoie donc obligatoirement Day_Date
var currentDailyListSort = GetData('General', 'OptRC1000', 'Day_Date'); //Note : n'existe pas, pour l'instant et renvoie donc obligatoirement Day_Date
var OldcurrentDailyListSort = currentDailyListSort;
var OldcurrentDailyListSort = currentDailyListSort;
var currentWeeklyListSort = GetData('General', 'OptRC1000', 'Week_Monday'); //Note : n'existe pas, pour l'instant et renvoie donc obligatoirement Day_Date
var currentWeeklyListSort = GetData('General', 'OptRC1000', 'Week_Monday'); //Note : n'existe pas, pour l'instant et renvoie donc obligatoirement Day_Date
var OldcurrentWeeklyListSort = currentWeeklyListSort;
var OldcurrentWeeklyListSort = currentWeeklyListSort;
var Version = "2.5.0";
var Version = "2.5.0";
var CurrentURL = window.location.href //get current url
var CurrentURL = window.location.href //get current url
var ScriptDisplayed = false; //When this variable is modified to true, the script stops to repeat this line : setInterval(affiche_script, 300);
var ScriptDisplayed = false; //When this variable is modified to true, the script stops to repeat this line : setInterval(affiche_script, 300);
var UI_ID_Global; //to know which ui-id the script will select (if there is the chat or not).
var UI_ID_Global; //to know which ui-id the script will select (if there is the chat or not).
var IdLineGLB = ''; //Used to cancel a line deletion
var IdLineGLB = ''; //Used to cancel a line deletion
////////////////////////////////////////////////////////SR AREA ------------------------- ZONE RAPPORTS ESPIONNAGE////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////SR AREA ------------------------- ZONE RAPPORTS ESPIONNAGE////////////////////////////////////////////////////////////////////////////////
//Vérifie la présence de contenu sauvegardé, le if fait exactement la même chose que pour les lignes paires et impaires juste au dessus (explications dispo à cet endroit-là)
//Vérifie la présence de contenu sauvegardé, le if fait exactement la même chose que pour les lignes paires et impaires juste au dessus (explications dispo à cet endroit-là)
GM_addStyle(".FltDefCtn:hover { color:#FFFFFF; text-decoration: underline;} "); //color fleet value in white on hover
GM_addStyle(".FltDefCtn:hover { color:#FFFFFF; text-decoration: underline;} "); //color fleet value in white on hover
//CSS to colorize fleet when it reaches the good amount
//CSS to colorize fleet when it reaches the good amount
GM_addStyle(".FltColorized { color:#" + GetData(GlobalProfileUsed, 'color6', 'FF0000') + ";} "); //Style used to colorize fleet value in table
GM_addStyle(".FltColorized { color:#" + GetData(GlobalProfileUsed, 'color6', 'FF0000') + ";} "); //Style used to colorize fleet value in table
//CSS to colorize def when it reaches the good amount
//CSS to colorize def when it reaches the good amount
GM_addStyle(".DefColorized { color:#" + GetData(GlobalProfileUsed, 'color7', 'FF0000') + ";} "); //Style used to colorize fleet value in table
GM_addStyle(".DefColorized { color:#" + GetData(GlobalProfileUsed, 'color7', 'FF0000') + ";} "); //Style used to colorize fleet value in table
//CSS to colorize def when it's profitable to send missiles
//CSS to colorize def when it's profitable to send missiles
GM_addStyle(".DefMissilesColorized { color:#" + GetData(GlobalProfileUsed, 'color12', '00FF00') + ";} "); //Style used to colorize fleet value in table
GM_addStyle(".DefMissilesColorized { color:#" + GetData(GlobalProfileUsed, 'color12', '00FF00') + ";} "); //Style used to colorize fleet value in table
document.getElementById('OptionsButton').addEventListener("click", function(event) //Création du bouton permettant la collecte et la sauvegarde des messages
document.getElementById('OptionsButton').addEventListener("click", function(event) //Création du bouton permettant la collecte et la sauvegarde des messages
//If you don't understand something explained on this part, try to change values to see the problems from yourself. I try my best to explain, but this part is kind of... hard for me.
//If you don't understand something explained on this part, try to change values to see the problems from yourself. I try my best to explain, but this
//This part took me 2 days to make it work correctly (a lot of problems occured :( )
//This is really important for eventlistener to wait until the tooltip is correctly shown inside the source code. If the script don't wait, eventlistener generates an error, as no id is found (no tooltip at this time). That's why this part is only executed when user put the mouse on "+" button, and waits some milliseconds until the tooltip is shown.
document.querySelector('#Plus').addEventListener("mouseover", function(event) //Waits the user to put the mouse on "+" Button
{
console.log("[O-Table] : + Button has been asked");
GM_addStyle("#Plus {color: orange;}"); //Puts the "+" in orange, to help user to know when he has to wait
setTimeout(function(){ //Set timeout is used to let the time to the source code to create the tooltip (without, the script will generate a VM8610:235 Uncaught TypeError: Cannot read property 'addEventListener' of null ERROR) as eventlistener will not find the id it needs, as this id is not yet on the source code
var TrashBinButtons = document.querySelectorAll("#TRASHBIN");
var UndeleteButton = document.querySelectorAll("#UNDELETETOOLTIP");
var DeleteAttackedButton = document.querySelectorAll("#DELETEATTACKED");