WebUI: Eliminate redundant DOM element queries
This commit is contained in:
parent
0b3bce8993
commit
7b3aa51bb1
@ -190,7 +190,7 @@ window.qBittorrent.ContextMenu ??= (() => {
|
||||
e.stopPropagation();
|
||||
}
|
||||
// record this as the trigger
|
||||
this.options.element = $(el);
|
||||
this.options.element = el;
|
||||
this.adjustMenuPosition(e);
|
||||
// show the menu
|
||||
this.show();
|
||||
@ -219,7 +219,7 @@ window.qBittorrent.ContextMenu ??= (() => {
|
||||
});
|
||||
|
||||
// hide on body click
|
||||
$(document.body).addEventListener("click", () => {
|
||||
document.body.addEventListener("click", () => {
|
||||
this.hide();
|
||||
this.options.element = null;
|
||||
});
|
||||
|
@ -131,7 +131,7 @@ window.qBittorrent.Download ??= (() => {
|
||||
}
|
||||
};
|
||||
|
||||
$(window).addEventListener("load", async () => {
|
||||
window.addEventListener("load", async () => {
|
||||
// user might load this page directly (via browser magnet handler)
|
||||
// so wait for crucial initialization to complete
|
||||
await window.parent.qBittorrent.Client.initializeCaches();
|
||||
|
@ -3168,7 +3168,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||
$("rowMarkOfTheWeb").style.display = "none";
|
||||
|
||||
$("networkInterface").addEventListener("change", function() {
|
||||
updateInterfaceAddresses($(this).value, "");
|
||||
updateInterfaceAddresses(this.value, "");
|
||||
});
|
||||
|
||||
loadPreferences();
|
||||
|
Loading…
x
Reference in New Issue
Block a user