mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06:00
WebUI: Use native function for selecting elements by ID
This commit is contained in:
@@ -151,7 +151,7 @@ let exportTorrentFN = () => {};
|
||||
|
||||
const initializeWindows = () => {
|
||||
saveWindowSize = (windowId) => {
|
||||
const size = $(windowId).getSize();
|
||||
const size = document.getElementById(windowId).getSize();
|
||||
LocalPreferences.set(`window_${windowId}_width`, size.x);
|
||||
LocalPreferences.set(`window_${windowId}_height`, size.y);
|
||||
};
|
||||
@@ -166,8 +166,8 @@ const initializeWindows = () => {
|
||||
|
||||
const addClickEvent = (el, fn) => {
|
||||
["Link", "Button"].each((item) => {
|
||||
if ($(el + item))
|
||||
$(el + item).addEventListener("click", fn);
|
||||
if (document.getElementById(el + item))
|
||||
document.getElementById(el + item).addEventListener("click", fn);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user