Adjusting position of time estimate
This commit is contained in:
@@ -42,23 +42,26 @@
|
|||||||
function initClockExtension(timerElement) {
|
function initClockExtension(timerElement) {
|
||||||
// Create a custom UI box to display our text safely without breaking Torn's CSS
|
// Create a custom UI box to display our text safely without breaking Torn's CSS
|
||||||
const travelRoot = document.querySelector("#travel-root");
|
const travelRoot = document.querySelector("#travel-root");
|
||||||
|
const parentContainer = travelRoot.querySelector('[class^="progressText"]');
|
||||||
// Remove travel fact
|
// Remove travel fact
|
||||||
travelRoot.querySelector('[class^="factWrapper"]').remove();
|
travelRoot.querySelector('[class^="factWrapper"]').remove();
|
||||||
// Remove flight scene
|
// Remove flight scene
|
||||||
travelRoot.querySelector('[class^="airspaceScene"]').remove();
|
travelRoot.querySelector('[class^="airspaceScene"]').remove();
|
||||||
const ogTimer = document.querySelector("#travel-root > div.viewport___cdEK9 > div.flightProgressSection___OEJoR > div.progressText___BEQ0k > div > span");
|
const ogTimer = document.querySelector("#travel-root > div.viewport___cdEK9 > div.flightProgressSection___OEJoR > div.progressText___BEQ0k > div > span");
|
||||||
var timerContainer = null;
|
var timerContainer = null;
|
||||||
if (ogTimer) {
|
/* if (ogTimer) {
|
||||||
ogTimer.style.cssText = 'font-weight: bold; font-size: 1.5rem;';
|
ogTimer.style.cssText = 'font-weight: bold; font-size: 1.5rem;';
|
||||||
ogTimer.innerText = 'Calculating landing time...';
|
ogTimer.innerText = 'Calculating landing time...';
|
||||||
timerContainer = ogTimer;
|
timerContainer = ogTimer;
|
||||||
} else {
|
}
|
||||||
|
*/
|
||||||
const timeDisplay = document.createElement('div');
|
const timeDisplay = document.createElement('div');
|
||||||
timeDisplay.style.cssText = 'padding: 10px; margin-top: 10px; color: #fff; text-align: center; border-radius: 5px; font-weight: bold; border: 1px solid #444; transition: color 0.5s ease;';
|
timeDisplay.style.cssText = 'padding: 10px; margin-top: 10px; color: #fff; text-align: center; border-radius: 5px; font-weight: bold; border: 1px solid #444; transition: color 0.5s ease; font-weight: bold; font-size: 1.5rem;';
|
||||||
timerElement.parentNode.insertBefore(timeDisplay, timerElement.nextSibling);
|
timerElement.parentNode.insertBefore(timeDisplay, timerElement.nextSibling);
|
||||||
|
//parentContainer.insertAdjacentElement(1, timeDisplay);
|
||||||
timeDisplay.innerText = 'Calculating landing time...';
|
timeDisplay.innerText = 'Calculating landing time...';
|
||||||
timerContainer = timeDisplay;
|
timerContainer = timeDisplay;
|
||||||
}
|
|
||||||
//const info = document.querySelector("#travel-root > div.viewport___cdEK9.stage0 > div.factWrapper___LvERA > div");
|
//const info = document.querySelector("#travel-root > div.viewport___cdEK9.stage0 > div.factWrapper___LvERA > div");
|
||||||
//info.remove();
|
//info.remove();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user