From bdf1e6324ed71d44108ffbbff4eeabfbaab13771 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Tue, 13 Apr 2021 19:59:00 +0200 Subject: [PATCH] Remove jQuery from toolbar.py --- qt/aqt/toolbar.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qt/aqt/toolbar.py b/qt/aqt/toolbar.py index a8bd20bce..c4e11dfc7 100644 --- a/qt/aqt/toolbar.py +++ b/qt/aqt/toolbar.py @@ -149,11 +149,8 @@ class Toolbar: """ def set_sync_active(self, active: bool) -> None: - if active: - meth = "addClass" - else: - meth = "removeClass" - self.web.eval(f"$('#sync-spinner').{meth}('spin')") + method = "add" if active else "remove" + self.web.eval(f"document.getElementById('sync-spinner').classList.{method}('spin')") def set_sync_status(self, status: SyncStatus) -> None: self.web.eval(f"updateSyncColor({status.required})")