Skip to content

Commit

Permalink
fix: reduce the random 10s load time to load time of the web page
Browse files Browse the repository at this point in the history
  • Loading branch information
muhesh-kumar committed Sep 17, 2022
1 parent 3f0b9a4 commit a69a190
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions update-ui.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SOLVED_COUNT_CLASS_NAME } from "./constants.js";
import * as Counter from "./get-ac-count.js";
import { SOLVED_COUNT_CLASS_NAME } from './constants.js';
import * as Counter from './get-ac-count.js';

setTimeout(() => {
document.addEventListener('DOMContentLoaded', () => {
Counter.getACCount();

/********* Get Status Variables **********/
Expand Down Expand Up @@ -141,15 +141,13 @@ setTimeout(() => {
`;

/********* Update UI **********/
p.innerText = "";
p.insertAdjacentHTML("afterend", acCountContainerHTML);
p.innerText = '';
p.insertAdjacentHTML('afterend', acCountContainerHTML);

const acCountContainer = document.getElementById("ac-count-container");
const acCountContainer = document.getElementById('ac-count-container');

acCountContainer.innerHTML +=
// TODO: Add the feature(showLockedCheckboxHTML) later
// showLockedCheckboxHTML +
unlockedACCountHTML +
lockedACCountHTML +
totalACCountHTML;
}, 10000);
unlockedACCountHTML + lockedACCountHTML + totalACCountHTML;
});

0 comments on commit a69a190

Please sign in to comment.