mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
WebUI: simplify close window implementation
The caller site now take the responsibility to ensure the element is valid. PR #21892.
This commit is contained in:
@@ -64,15 +64,12 @@ window.qBittorrent.Client ??= (() => {
|
||||
}
|
||||
};
|
||||
|
||||
const closeWindow = (windowID) => {
|
||||
const window = document.getElementById(windowID);
|
||||
if (!window)
|
||||
return;
|
||||
const closeWindow = (window) => {
|
||||
MochaUI.closeWindow(window);
|
||||
};
|
||||
|
||||
const closeFrameWindow = (window) => {
|
||||
closeWindow(window.frameElement.closest("div.mocha").id);
|
||||
MochaUI.closeWindow(window.frameElement.closest("div.mocha"));
|
||||
};
|
||||
|
||||
const getSyncMainDataInterval = () => {
|
||||
|
||||
Reference in New Issue
Block a user