mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
WebUI: access attribute/property natively
It is now clearer to see what property is being accessed. Previously mootools library would re-map attribute/property to another. PR #21007.
This commit is contained in:
@@ -186,8 +186,8 @@ window.qBittorrent.ContextMenu = (function() {
|
||||
|
||||
addTarget: function(t) {
|
||||
// prevent long press from selecting this text
|
||||
t.style.setProperty("user-select", "none");
|
||||
t.style.setProperty("-webkit-user-select", "none");
|
||||
t.style.userSelect = "none";
|
||||
t.style["-webkit-user-select"] = "none";
|
||||
|
||||
this.targets[this.targets.length] = t;
|
||||
this.setupEventListeners(t);
|
||||
@@ -219,7 +219,7 @@ window.qBittorrent.ContextMenu = (function() {
|
||||
item.addEvent("click", (e) => {
|
||||
e.preventDefault();
|
||||
if (!item.hasClass("disabled")) {
|
||||
this.execute(item.get("href").split("#")[1], $(this.options.element));
|
||||
this.execute(item.href.split("#")[1], $(this.options.element));
|
||||
this.fireEvent("click", [item, e]);
|
||||
}
|
||||
});
|
||||
@@ -540,13 +540,13 @@ window.qBittorrent.ContextMenu = (function() {
|
||||
const enabledColumnIndex = function(text) {
|
||||
const columns = $("searchPluginsTableFixedHeaderRow").getChildren("th");
|
||||
for (let i = 0; i < columns.length; ++i) {
|
||||
if (columns[i].get("html") === "Enabled")
|
||||
if (columns[i].textContent === "Enabled")
|
||||
return i;
|
||||
}
|
||||
};
|
||||
|
||||
this.showItem("Enabled");
|
||||
this.setItemChecked("Enabled", this.options.element.getChildren("td")[enabledColumnIndex()].get("html") === "Yes");
|
||||
this.setItemChecked("Enabled", (this.options.element.getChildren("td")[enabledColumnIndex()].textContent === "Yes"));
|
||||
|
||||
this.showItem("Uninstall");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user