mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06:00
WebUI: Filter list improvements
A couple of tweaks to make them a little bit better: 1. Make highlighting functions more consistent (this also fixes minuscule bug when no filter item in tracker list is highlighted due to a type mismatch) 2. Use [event delegation](https://javascript.info/event-delegation) to handle filter toggling & item selection 3. Other minor improvements (everything should work like it was previously) PR #21191.
This commit is contained in:
@@ -179,6 +179,10 @@ window.qBittorrent.ContextMenu ??= (() => {
|
||||
this.setupEventListeners(t);
|
||||
},
|
||||
|
||||
searchAndAddTargets: function() {
|
||||
document.querySelectorAll(this.options.targets).forEach((target) => { this.addTarget(target); });
|
||||
},
|
||||
|
||||
triggerMenu: function(e, el) {
|
||||
if (this.options.disabled)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user