mirror of
https://github.com/GuySandler/CanvasRefined.git
synced 2026-11-25 23:17:56 +01:00
slight widget fix
This commit is contained in:
1 parent
81e49178aa
commit
d61907c2c6
2 files changed
+32
No files matched your search
@@ -1650,6 +1650,12 @@ function resetTimer() {
|
||||
}, 1);
|
||||
}
|
||||
|
||||
function syncDashboardLoadingState() {
|
||||
const dc = document.querySelector("#DashboardCard_Container");
|
||||
if (!dc) return;
|
||||
const hasRealCards = !!dc.querySelector(".ic-DashboardCard__link");
|
||||
dc.classList.toggle("cr-loading", !hasRealCards);
|
||||
}
|
||||
function checkDashboardReady() {
|
||||
const isDashboard = () => current_page == "/" || current_page == "" || /^\/courses\/(\d+)(?:\/|$)/.test(current_page);
|
||||
|
||||
@@ -1665,6 +1671,7 @@ function checkDashboardReady() {
|
||||
dashboardReadyTimer = setTimeout(() => {
|
||||
dashboardReadyTimer = null;
|
||||
|
||||
syncDashboardLoadingState();
|
||||
const c = document.querySelector("#DashboardCard_Container");
|
||||
if (c) {
|
||||
let cards = document.querySelectorAll(".ic-DashboardCard");
|
||||
|
||||
Reference in new issue
Block a user