Skip to content

Commit 4d7103b

Browse files
committed
removing last update timestamp
1 parent 75ec10d commit 4d7103b

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

FO2/MarketTracker/FO2MarketTrack.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ <h1>Fantasy Online 2 Market Tracker</h1>
5151
</button>
5252
</div>
5353
<div class="update-info">
54-
<span id="last-updated-timestamp">Last Updated: Never</span>
54+
<!-- <span id="last-updated-timestamp">Last Updated: Never</span> -->
5555
<button id="refresh-button" title="Fetch latest data from API">Refresh</button>
5656
</div>
5757
</div>

FO2/MarketTracker/market-track-style.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ h1 { margin: 0; font-size: 2rem; }
3939
select { padding: 8px; border-radius: 4px; border: 1px solid #ddd; }
4040

4141
/* Last Updated and Refresh Button Styles */
42-
.update-info { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; justify-content: flex-start; margin-left: auto; font-size: 0.9rem; color: #555; }
43-
#last-updated-timestamp { white-space: nowrap; }
42+
.update-info { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; justify-content: flex-start; overflow: hidden; margin-left: auto; font-size: 0.9rem; color: #555; }
43+
/* #last-updated-timestamp { white-space: nowrap; } */
4444
#refresh-button { padding: 6px 12px; flex-shrink: 0; white-space: nowrap; background-color: #4CAF50; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; transition: background-color 0.3s; }
4545
#refresh-button:hover { background-color: #45a049; }
4646
#refresh-button:disabled { background-color: #cccccc; color: #666666; cursor: not-allowed; }
@@ -117,6 +117,7 @@ footer { margin-top: 40px; text-align: center; color: #757575; font-size: 0.9rem
117117
.update-info { margin-left: 0; margin-top: 10px; justify-content: space-between; }
118118
}
119119
@media (max-width: 768px) {
120+
.update-info { justify-content: space-between; }
120121
.search-container, #search-form { flex-direction: column; }
121122
#search-input { border-radius: 4px; margin-bottom: 10px; }
122123
#search-button { border-radius: 4px; }

FO2/MarketTracker/market-track.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ let itemDatabase = null;
3535
let currentMarketListings = []; // Stores full data for the current page from API
3636
let currentlyDisplayedListings = []; // Stores the listings currently shown (after filtering)
3737
let abortController = null;
38-
let lastUpdateTime = null;
38+
// let lastUpdateTime = null;
3939
let showProfitableOnlyState = false; // Tracks if the profitable filter *should* be active
4040
let isComprehensiveSearchActive = false; // Tracks if we are *currently showing* comprehensive results
4141
let comprehensiveSearchResults = [];
@@ -67,7 +67,7 @@ const detailsRecentlyListedPrice = document.getElementById('details-recently-lis
6767
const detailsBuyPrice = document.getElementById('details-buy-price');
6868
const detailsSellPrice = document.getElementById('details-sell-price');
6969
const detailsError = document.getElementById('details-error');
70-
const lastUpdatedTimestampSpan = document.getElementById('last-updated-timestamp');
70+
// const lastUpdatedTimestampSpan = document.getElementById('last-updated-timestamp');
7171
const refreshButton = document.getElementById('refresh-button');
7272
const detailsPotentialProfit = document.getElementById('details-potential-profit');
7373
const detailsPersonalProfit = document.getElementById('details-personal-profit');
@@ -159,7 +159,7 @@ function findItemById(itemId) { return itemDatabase?.[String(itemId)] || null; }
159159
function formatNumber(num) { return (num == null || isNaN(num)) ? 'N/A' : num.toLocaleString(); }
160160
function formatPrice(price) { return (price == null || price === "" || isNaN(price)) ? 'N/A' : `${formatNumber(price)} Coins`; }
161161
function setTableLoading(loading) { if (loading) { resultsBody.innerHTML = `<tr><td colspan="3" style="text-align:center; padding: 30px;"><div class="loading-spinner"></div></td></tr>`; } }
162-
function updateTimestampDisplay() { lastUpdatedTimestampSpan.textContent = lastUpdateTime ? `Last Updated: ${lastUpdateTime.toLocaleTimeString()}` : 'Last Updated: Never'; }
162+
// function updateTimestampDisplay() { lastUpdatedTimestampSpan.textContent = lastUpdateTime ? `Last Updated: ${lastUpdateTime.toLocaleTimeString()}` : 'Last Updated: Never'; }
163163

164164
async function searchMarket(page = currentPage, term = searchInput.value.trim(), sort = currentSort, direction = currentDirection) {
165165
const isForComprehensive = isComprehensiveSearchActive; // Snapshot state
@@ -214,8 +214,8 @@ async function searchMarket(page = currentPage, term = searchInput.value.trim(),
214214
updatePagination();
215215
applyClientSideFilter(); // Filter and display the new data
216216
resultsContainer.style.display = 'flex';
217-
lastUpdateTime = new Date();
218-
updateTimestampDisplay();
217+
// lastUpdateTime = new Date();
218+
// updateTimestampDisplay();
219219
return data; // Return data
220220

221221
} catch (error) {
@@ -804,7 +804,7 @@ async function initializeApp() {
804804
loadPersonalPrices(); // Load personal prices (if applicable)
805805
await loadEmbeddedItemData(); // Ensure JSON data is loaded before proceeding
806806
const dbLoaded = await loadItemDatabase(); // Load the item database after JSON is loaded
807-
updateTimestampDisplay(); // Update timestamp display
807+
// updateTimestampDisplay(); // Update timestamp display
808808

809809
if (dbLoaded) {
810810
updateSortIndicators(); // Set initial sort indicators

0 commit comments

Comments
 (0)