mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
WebUI: use the correct property for accessing text
In these instances we don't need the rendered result. So use the most efficient property to access it: `.textContent`.
This commit is contained in:
@@ -34,7 +34,7 @@
|
|||||||
const uriHashes = window.qBittorrent.Misc.safeTrim(new URI().getData("hashes"));
|
const uriHashes = window.qBittorrent.Misc.safeTrim(new URI().getData("hashes"));
|
||||||
|
|
||||||
if (uriAction === "create")
|
if (uriAction === "create")
|
||||||
$("legendText").innerText = "QBT_TR(Tag:)QBT_TR[CONTEXT=TagFilterWidget]";
|
$("legendText").textContent = "QBT_TR(Tag:)QBT_TR[CONTEXT=TagFilterWidget]";
|
||||||
|
|
||||||
$("tagName").focus();
|
$("tagName").focus();
|
||||||
|
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ window.qBittorrent.PropTrackers ??= (() => {
|
|||||||
if (current_hash.length === 0)
|
if (current_hash.length === 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const trackerUrl = encodeURIComponent(element.childNodes[1].innerText);
|
const trackerUrl = encodeURIComponent(element.childNodes[1].textContent);
|
||||||
new MochaUI.Window({
|
new MochaUI.Window({
|
||||||
id: "trackersPage",
|
id: "trackersPage",
|
||||||
title: "QBT_TR(Tracker editing)QBT_TR[CONTEXT=TrackerListWidget]",
|
title: "QBT_TR(Tracker editing)QBT_TR[CONTEXT=TrackerListWidget]",
|
||||||
|
|||||||
@@ -401,7 +401,7 @@
|
|||||||
if (article) {
|
if (article) {
|
||||||
$("rssDetailsView").append((() => {
|
$("rssDetailsView").append((() => {
|
||||||
const torrentName = document.createElement("p");
|
const torrentName = document.createElement("p");
|
||||||
torrentName.innerText = article.title;
|
torrentName.textContent = article.title;
|
||||||
torrentName.id = "rssTorrentDetailsName";
|
torrentName.id = "rssTorrentDetailsName";
|
||||||
return torrentName;
|
return torrentName;
|
||||||
})());
|
})());
|
||||||
@@ -410,11 +410,11 @@
|
|||||||
torrentDate.id = "rssTorrentDetailsDate";
|
torrentDate.id = "rssTorrentDetailsDate";
|
||||||
|
|
||||||
const torrentDateDesc = document.createElement("b");
|
const torrentDateDesc = document.createElement("b");
|
||||||
torrentDateDesc.innerText = "QBT_TR(Date: )QBT_TR[CONTEXT=RSSWidget]";
|
torrentDateDesc.textContent = "QBT_TR(Date: )QBT_TR[CONTEXT=RSSWidget]";
|
||||||
torrentDate.append(torrentDateDesc);
|
torrentDate.append(torrentDateDesc);
|
||||||
|
|
||||||
const torrentDateData = document.createElement("span");
|
const torrentDateData = document.createElement("span");
|
||||||
torrentDateData.innerText = new Date(article.date).toLocaleString();
|
torrentDateData.textContent = new Date(article.date).toLocaleString();
|
||||||
torrentDate.append(torrentDateData);
|
torrentDate.append(torrentDateData);
|
||||||
|
|
||||||
return torrentDate;
|
return torrentDate;
|
||||||
|
|||||||
Reference in New Issue
Block a user