mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-22 22:33:34 -07:00
WebUI: use template literals instead of string concatenation
This commit is contained in:
parent
8db360e937
commit
f442ae748a
18 changed files with 126 additions and 126 deletions
|
@ -37,6 +37,7 @@ export default [
|
|||
"operator-assignment": "error",
|
||||
"prefer-arrow-callback": "error",
|
||||
"prefer-const": "error",
|
||||
"prefer-template": "error",
|
||||
"radix": "error",
|
||||
"PreferArrowFunctions/prefer-arrow-functions": "error",
|
||||
"Stylistic/no-mixed-operators": [
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
})
|
||||
.then((response) => {
|
||||
if (!response.ok) {
|
||||
alert("QBT_TR(Unable to create category)QBT_TR[CONTEXT=Category] " + window.qBittorrent.Misc.escapeHtml(categoryName));
|
||||
alert(`QBT_TR(Unable to create category)QBT_TR[CONTEXT=Category] ${window.qBittorrent.Misc.escapeHtml(categoryName)}`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@
|
|||
// Update renamed column for matched rows
|
||||
for (let i = 0; i < matchedRows.length; ++i) {
|
||||
const row = matchedRows[i];
|
||||
$("filesTablefileRenamed" + row.rowId).textContent = row.renamed;
|
||||
$(`filesTablefileRenamed${row.rowId}`).textContent = row.renamed;
|
||||
}
|
||||
};
|
||||
fileRenamer.onInvalidRegex = (err) => {
|
||||
|
|
|
@ -88,9 +88,10 @@ window.qBittorrent.Client ??= (() => {
|
|||
const mainTitle = () => {
|
||||
const emDash = "\u2014";
|
||||
const qbtVersion = window.qBittorrent.Cache.qbtVersion.get();
|
||||
const suffix = window.qBittorrent.Cache.preferences.get()["app_instance_name"] || "";
|
||||
const title = `qBittorrent ${qbtVersion} QBT_TR(WebUI)QBT_TR[CONTEXT=OptionsDialog]`
|
||||
+ ((suffix.length > 0) ? ` ${emDash} ${suffix}` : "");
|
||||
let suffix = window.qBittorrent.Cache.preferences.get()["app_instance_name"] || "";
|
||||
if (suffix.length > 0)
|
||||
suffix = ` ${emDash} ${suffix}`;
|
||||
const title = `qBittorrent ${qbtVersion} QBT_TR(WebUI)QBT_TR[CONTEXT=OptionsDialog]${suffix}`;
|
||||
return title;
|
||||
};
|
||||
|
||||
|
@ -952,13 +953,13 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||
const processServerState = () => {
|
||||
let transfer_info = window.qBittorrent.Misc.friendlyUnit(serverState.dl_info_speed, true);
|
||||
if (serverState.dl_rate_limit > 0)
|
||||
transfer_info += " [" + window.qBittorrent.Misc.friendlyUnit(serverState.dl_rate_limit, true) + "]";
|
||||
transfer_info += " (" + window.qBittorrent.Misc.friendlyUnit(serverState.dl_info_data, false) + ")";
|
||||
transfer_info += ` [${window.qBittorrent.Misc.friendlyUnit(serverState.dl_rate_limit, true)}]`;
|
||||
transfer_info += ` (${window.qBittorrent.Misc.friendlyUnit(serverState.dl_info_data, false)})`;
|
||||
$("DlInfos").textContent = transfer_info;
|
||||
transfer_info = window.qBittorrent.Misc.friendlyUnit(serverState.up_info_speed, true);
|
||||
if (serverState.up_rate_limit > 0)
|
||||
transfer_info += " [" + window.qBittorrent.Misc.friendlyUnit(serverState.up_rate_limit, true) + "]";
|
||||
transfer_info += " (" + window.qBittorrent.Misc.friendlyUnit(serverState.up_info_data, false) + ")";
|
||||
transfer_info += ` [${window.qBittorrent.Misc.friendlyUnit(serverState.up_rate_limit, true)}]`;
|
||||
transfer_info += ` (${window.qBittorrent.Misc.friendlyUnit(serverState.up_info_data, false)})`;
|
||||
$("UpInfos").textContent = transfer_info;
|
||||
|
||||
document.title = (speedInTitle
|
||||
|
@ -1010,12 +1011,12 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||
$("TotalWastedSession").textContent = window.qBittorrent.Misc.friendlyUnit(serverState.total_wasted_session, false);
|
||||
$("GlobalRatio").textContent = serverState.global_ratio;
|
||||
$("TotalPeerConnections").textContent = serverState.total_peer_connections;
|
||||
$("ReadCacheHits").textContent = serverState.read_cache_hits + "%";
|
||||
$("ReadCacheHits").textContent = `${serverState.read_cache_hits}%`;
|
||||
$("TotalBuffersSize").textContent = window.qBittorrent.Misc.friendlyUnit(serverState.total_buffers_size, false);
|
||||
$("WriteCacheOverload").textContent = serverState.write_cache_overload + "%";
|
||||
$("ReadCacheOverload").textContent = serverState.read_cache_overload + "%";
|
||||
$("WriteCacheOverload").textContent = `${serverState.write_cache_overload}%`;
|
||||
$("ReadCacheOverload").textContent = `${serverState.read_cache_overload}%`;
|
||||
$("QueuedIOJobs").textContent = serverState.queued_io_jobs;
|
||||
$("AverageTimeInQueue").textContent = serverState.average_time_queue + " ms";
|
||||
$("AverageTimeInQueue").textContent = `${serverState.average_time_queue} ms`;
|
||||
$("TotalQueuedSize").textContent = window.qBittorrent.Misc.friendlyUnit(serverState.total_queued_size, false);
|
||||
}
|
||||
|
||||
|
@ -1149,8 +1150,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||
hashParams.set("download", "");
|
||||
|
||||
const templateHashString = hashParams.toString().replace("download=", "download=%s");
|
||||
const templateUrl = location.origin + location.pathname
|
||||
+ location.search + "#" + templateHashString;
|
||||
const templateUrl = `${location.origin}${location.pathname}${location.search}#${templateHashString}`;
|
||||
|
||||
navigator.registerProtocolHandler("magnet", templateUrl,
|
||||
"qBittorrent WebUI magnet handler");
|
||||
|
|
|
@ -81,8 +81,8 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
this.selectedRows = [];
|
||||
this.columns = [];
|
||||
this.contextMenu = contextMenu;
|
||||
this.sortedColumn = LocalPreferences.get("sorted_column_" + this.dynamicTableDivId, 0);
|
||||
this.reverseSort = LocalPreferences.get("reverse_sort_" + this.dynamicTableDivId, "0");
|
||||
this.sortedColumn = LocalPreferences.get(`sorted_column_${this.dynamicTableDivId}`, 0);
|
||||
this.reverseSort = LocalPreferences.get(`reverse_sort_${this.dynamicTableDivId}`, "0");
|
||||
this.initColumns();
|
||||
this.loadColumnsOrder();
|
||||
this.updateTableHeaders();
|
||||
|
@ -283,13 +283,13 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
this.saveColumnWidth(this.resizeTh.columnName);
|
||||
if ((this.currentHeaderAction === "drag") && (el !== this.lastHoverTh)) {
|
||||
this.saveColumnsOrder();
|
||||
const val = LocalPreferences.get("columns_order_" + this.dynamicTableDivId).split(",");
|
||||
const val = LocalPreferences.get(`columns_order_${this.dynamicTableDivId}`).split(",");
|
||||
val.erase(el.columnName);
|
||||
let pos = val.indexOf(this.lastHoverTh.columnName);
|
||||
if (this.dropSide === "right")
|
||||
++pos;
|
||||
val.splice(pos, 0, el.columnName);
|
||||
LocalPreferences.set("columns_order_" + this.dynamicTableDivId, val.join(","));
|
||||
LocalPreferences.set(`columns_order_${this.dynamicTableDivId}`, val.join(","));
|
||||
this.loadColumnsOrder();
|
||||
this.updateTableHeaders();
|
||||
this.tableBody.replaceChildren();
|
||||
|
@ -369,7 +369,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
|
||||
showColumn: function(columnName, show) {
|
||||
this.columns[columnName].visible = show ? "1" : "0";
|
||||
LocalPreferences.set("column_" + columnName + "_visible_" + this.dynamicTableDivId, show ? "1" : "0");
|
||||
LocalPreferences.set(`column_${columnName}_visible_${this.dynamicTableDivId}`, show ? "1" : "0");
|
||||
this.updateColumn(columnName);
|
||||
},
|
||||
|
||||
|
@ -430,7 +430,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
setupHeaderMenu: function() {
|
||||
this.setupDynamicTableHeaderContextMenuClass();
|
||||
|
||||
const menuId = this.dynamicTableDivId + "_headerMenu";
|
||||
const menuId = `${this.dynamicTableDivId}_headerMenu`;
|
||||
|
||||
// reuse menu if already exists
|
||||
let ul = document.getElementById(menuId);
|
||||
|
@ -504,7 +504,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
document.body.append(ul);
|
||||
|
||||
this.headerContextMenu = new DynamicTableHeaderContextMenuClass({
|
||||
targets: "#" + this.dynamicTableFixedHeaderDivId + " tr th",
|
||||
targets: `#${this.dynamicTableFixedHeaderDivId} tr th`,
|
||||
actions: actions,
|
||||
menu: menuId,
|
||||
offsets: {
|
||||
|
@ -522,11 +522,11 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
const column = {};
|
||||
column["name"] = name;
|
||||
column["title"] = name;
|
||||
column["visible"] = LocalPreferences.get("column_" + name + "_visible_" + this.dynamicTableDivId, defaultVisible ? "1" : "0");
|
||||
column["visible"] = LocalPreferences.get(`column_${name}_visible_${this.dynamicTableDivId}`, (defaultVisible ? "1" : "0"));
|
||||
column["force_hide"] = false;
|
||||
column["caption"] = caption;
|
||||
column["style"] = style;
|
||||
column["width"] = LocalPreferences.get("column_" + name + "_width_" + this.dynamicTableDivId, defaultWidth);
|
||||
column["width"] = LocalPreferences.get(`column_${name}_width_${this.dynamicTableDivId}`, defaultWidth);
|
||||
column["dataProperties"] = [name];
|
||||
column["getRowValue"] = function(row, pos) {
|
||||
if (pos === undefined)
|
||||
|
@ -557,7 +557,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
|
||||
loadColumnsOrder: function() {
|
||||
const columnsOrder = [];
|
||||
const val = LocalPreferences.get("columns_order_" + this.dynamicTableDivId);
|
||||
const val = LocalPreferences.get(`columns_order_${this.dynamicTableDivId}`);
|
||||
if ((val === null) || (val === undefined))
|
||||
return;
|
||||
val.split(",").forEach((v) => {
|
||||
|
@ -581,7 +581,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
val += ",";
|
||||
val += this.columns[i].name;
|
||||
}
|
||||
LocalPreferences.set("columns_order_" + this.dynamicTableDivId, val);
|
||||
LocalPreferences.set(`columns_order_${this.dynamicTableDivId}`, val);
|
||||
},
|
||||
|
||||
updateTableHeaders: function() {
|
||||
|
@ -597,9 +597,9 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
th._this = this;
|
||||
th.title = this.columns[i].caption;
|
||||
th.textContent = this.columns[i].caption;
|
||||
th.setAttribute("style", "width: " + this.columns[i].width + "px;" + this.columns[i].style);
|
||||
th.style.cssText = `width: ${this.columns[i].width}px; ${this.columns[i].style}`;
|
||||
th.columnName = this.columns[i].name;
|
||||
th.classList.add("column_" + th.columnName);
|
||||
th.classList.add(`column_${th.columnName}`);
|
||||
th.classList.toggle("invisible", ((this.columns[i].visible === "0") || this.columns[i].force_hide));
|
||||
}
|
||||
},
|
||||
|
@ -618,10 +618,10 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
const ths = this.hiddenTableHeader.getElements("th");
|
||||
const fths = this.fixedTableHeader.getElements("th");
|
||||
const trs = this.tableBody.getElements("tr");
|
||||
const style = "width: " + this.columns[pos].width + "px;" + this.columns[pos].style;
|
||||
const style = `width: ${this.columns[pos].width}px; ${this.columns[pos].style}`;
|
||||
|
||||
ths[pos].setAttribute("style", style);
|
||||
fths[pos].setAttribute("style", style);
|
||||
ths[pos].style.cssText = style;
|
||||
fths[pos].style.cssText = style;
|
||||
|
||||
if (visible) {
|
||||
ths[pos].classList.remove("invisible");
|
||||
|
@ -640,7 +640,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
},
|
||||
|
||||
getSortedColumn: function() {
|
||||
return LocalPreferences.get("sorted_column_" + this.dynamicTableDivId);
|
||||
return LocalPreferences.get(`sorted_column_${this.dynamicTableDivId}`);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -659,14 +659,14 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
this.reverseSort = reverse ?? (this.reverseSort === "0" ? "1" : "0");
|
||||
this.setSortedColumnIcon(column, null, (this.reverseSort === "1"));
|
||||
}
|
||||
LocalPreferences.set("sorted_column_" + this.dynamicTableDivId, column);
|
||||
LocalPreferences.set("reverse_sort_" + this.dynamicTableDivId, this.reverseSort);
|
||||
LocalPreferences.set(`sorted_column_${this.dynamicTableDivId}`, column);
|
||||
LocalPreferences.set(`reverse_sort_${this.dynamicTableDivId}`, this.reverseSort);
|
||||
this.updateTable(false);
|
||||
},
|
||||
|
||||
setSortedColumnIcon: function(newColumn, oldColumn, isReverse) {
|
||||
const getCol = (headerDivId, colName) => {
|
||||
const colElem = $$("#" + headerDivId + " .column_" + colName);
|
||||
const colElem = $$(`#${headerDivId} .column_${colName}`);
|
||||
if (colElem.length === 1)
|
||||
return colElem[0];
|
||||
return null;
|
||||
|
@ -1265,7 +1265,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
const num_complete = this.getRowValue(row, 1);
|
||||
let value = num_seeds;
|
||||
if (num_complete !== -1)
|
||||
value += " (" + num_complete + ")";
|
||||
value += ` (${num_complete})`;
|
||||
td.textContent = value;
|
||||
td.title = value;
|
||||
};
|
||||
|
@ -2125,9 +2125,9 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
|
||||
initColumns: function() {
|
||||
// Blocks saving header width (because window width isn't saved)
|
||||
LocalPreferences.remove("column_" + "checked" + "_width_" + this.dynamicTableDivId);
|
||||
LocalPreferences.remove("column_" + "original" + "_width_" + this.dynamicTableDivId);
|
||||
LocalPreferences.remove("column_" + "renamed" + "_width_" + this.dynamicTableDivId);
|
||||
LocalPreferences.remove(`column_checked_width_${this.dynamicTableDivId}`);
|
||||
LocalPreferences.remove(`column_original_width_${this.dynamicTableDivId}`);
|
||||
LocalPreferences.remove(`column_renamed_width_${this.dynamicTableDivId}`);
|
||||
this.newColumn("checked", "", "", 50, true);
|
||||
this.newColumn("original", "", "QBT_TR(Original)QBT_TR[CONTEXT=TrackerListWidget]", 270, true);
|
||||
this.newColumn("renamed", "", "QBT_TR(Renamed)QBT_TR[CONTEXT=TrackerListWidget]", 220, true);
|
||||
|
@ -2226,7 +2226,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
|
||||
const checkbox = document.createElement("input");
|
||||
checkbox.type = "checkbox";
|
||||
checkbox.id = "cbRename" + id;
|
||||
checkbox.id = `cbRename${id}`;
|
||||
checkbox.setAttribute("data-id", id);
|
||||
checkbox.className = "RenamingCB";
|
||||
checkbox.addEventListener("click", (e) => {
|
||||
|
@ -2247,12 +2247,12 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
// original
|
||||
this.columns["original"].updateTd = function(td, row) {
|
||||
const id = row.rowId;
|
||||
const fileNameId = "filesTablefileName" + id;
|
||||
const fileNameId = `filesTablefileName${id}`;
|
||||
const node = that.getNode(id);
|
||||
|
||||
if (node.isFolder) {
|
||||
const value = this.getRowValue(row);
|
||||
const dirImgId = "renameTableDirImg" + id;
|
||||
const dirImgId = `renameTableDirImg${id}`;
|
||||
if ($(dirImgId)) {
|
||||
// just update file name
|
||||
$(fileNameId).textContent = value;
|
||||
|
@ -2285,7 +2285,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
// renamed
|
||||
this.columns["renamed"].updateTd = function(td, row) {
|
||||
const id = row.rowId;
|
||||
const fileNameRenamedId = "filesTablefileRenamed" + id;
|
||||
const fileNameRenamedId = `filesTablefileRenamed${id}`;
|
||||
const value = this.getRowValue(row);
|
||||
|
||||
const span = document.createElement("span");
|
||||
|
@ -2549,13 +2549,13 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
// name
|
||||
this.columns["name"].updateTd = function(td, row) {
|
||||
const id = row.rowId;
|
||||
const fileNameId = "filesTablefileName" + id;
|
||||
const fileNameId = `filesTablefileName${id}`;
|
||||
const node = that.getNode(id);
|
||||
|
||||
if (node.isFolder) {
|
||||
const value = this.getRowValue(row);
|
||||
const collapseIconId = "filesTableCollapseIcon" + id;
|
||||
const dirImgId = "filesTableDirImg" + id;
|
||||
const collapseIconId = `filesTableCollapseIcon${id}`;
|
||||
const dirImgId = `filesTableDirImg${id}`;
|
||||
if ($(dirImgId)) {
|
||||
// just update file name
|
||||
$(fileNameId).textContent = value;
|
||||
|
@ -2607,10 +2607,10 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
const id = row.rowId;
|
||||
const value = this.getRowValue(row);
|
||||
|
||||
const progressBar = $("pbf_" + id);
|
||||
const progressBar = $(`pbf_${id}`);
|
||||
if (progressBar === null) {
|
||||
td.append(new window.qBittorrent.ProgressBar.ProgressBar(value.toFloat(), {
|
||||
id: "pbf_" + id,
|
||||
id: `pbf_${id}`,
|
||||
width: 80
|
||||
}));
|
||||
}
|
||||
|
@ -2790,7 +2790,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
this.columns["name"].updateTd = function(td, row) {
|
||||
const name = this.getRowValue(row, 0);
|
||||
const unreadCount = this.getRowValue(row, 1);
|
||||
const value = name + " (" + unreadCount + ")";
|
||||
const value = `${name} (${unreadCount})`;
|
||||
td.textContent = value;
|
||||
td.title = value;
|
||||
};
|
||||
|
@ -2836,8 +2836,8 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
row["data"] = {};
|
||||
tds[0].style.overflow = "visible";
|
||||
const indentation = row.full_data.indentation;
|
||||
tds[0].style.paddingLeft = (indentation * 32 + 4) + "px";
|
||||
tds[1].style.paddingLeft = (indentation * 32 + 4) + "px";
|
||||
tds[0].style.paddingLeft = `${indentation * 32 + 4}px`;
|
||||
tds[1].style.paddingLeft = `${indentation * 32 + 4}px`;
|
||||
},
|
||||
updateIcons: function() {
|
||||
// state_icon
|
||||
|
@ -3017,10 +3017,10 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
this.newColumn("name", "", "", -1, true);
|
||||
|
||||
this.columns["checked"].updateTd = function(td, row) {
|
||||
if ($("cbRssDlRule" + row.rowId) === null) {
|
||||
if ($(`cbRssDlRule${row.rowId}`) === null) {
|
||||
const checkbox = document.createElement("input");
|
||||
checkbox.type = "checkbox";
|
||||
checkbox.id = "cbRssDlRule" + row.rowId;
|
||||
checkbox.id = `cbRssDlRule${row.rowId}`;
|
||||
checkbox.checked = row.full_data.checked;
|
||||
|
||||
checkbox.addEventListener("click", function(e) {
|
||||
|
@ -3035,7 +3035,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
td.append(checkbox);
|
||||
}
|
||||
else {
|
||||
$("cbRssDlRule" + row.rowId).checked = row.full_data.checked;
|
||||
$(`cbRssDlRule${row.rowId}`).checked = row.full_data.checked;
|
||||
}
|
||||
};
|
||||
this.columns["checked"].staticWidth = 50;
|
||||
|
@ -3115,10 +3115,10 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
this.newColumn("name", "", "", -1, true);
|
||||
|
||||
this.columns["checked"].updateTd = function(td, row) {
|
||||
if ($("cbRssDlFeed" + row.rowId) === null) {
|
||||
if ($(`cbRssDlFeed${row.rowId}`) === null) {
|
||||
const checkbox = document.createElement("input");
|
||||
checkbox.type = "checkbox";
|
||||
checkbox.id = "cbRssDlFeed" + row.rowId;
|
||||
checkbox.id = `cbRssDlFeed${row.rowId}`;
|
||||
checkbox.checked = row.full_data.checked;
|
||||
|
||||
checkbox.addEventListener("click", function(e) {
|
||||
|
@ -3132,7 +3132,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
td.append(checkbox);
|
||||
}
|
||||
else {
|
||||
$("cbRssDlFeed" + row.rowId).checked = row.full_data.checked;
|
||||
$(`cbRssDlFeed${row.rowId}`).checked = row.full_data.checked;
|
||||
}
|
||||
};
|
||||
this.columns["checked"].staticWidth = 50;
|
||||
|
|
|
@ -123,13 +123,13 @@ window.qBittorrent.Misc ??= (() => {
|
|||
|
||||
let ret;
|
||||
if (i === 0) {
|
||||
ret = value + " " + units[i];
|
||||
ret = `${value} ${units[i]}`;
|
||||
}
|
||||
else {
|
||||
const precision = friendlyUnitPrecision(i);
|
||||
const offset = Math.pow(10, precision);
|
||||
// Don't round up
|
||||
ret = (Math.floor(offset * value) / offset).toFixed(precision) + " " + units[i];
|
||||
ret = `${(Math.floor(offset * value) / offset).toFixed(precision)} ${units[i]}`;
|
||||
}
|
||||
|
||||
if (isSpeed)
|
||||
|
@ -169,7 +169,7 @@ window.qBittorrent.Misc ??= (() => {
|
|||
percentage = 0;
|
||||
if (percentage > 100)
|
||||
percentage = 100;
|
||||
return percentage.toFixed(1) + "%";
|
||||
return `${percentage.toFixed(1)}%`;
|
||||
};
|
||||
|
||||
const friendlyFloat = (value, precision) => {
|
||||
|
|
|
@ -152,16 +152,16 @@ let exportTorrentFN = () => {};
|
|||
const initializeWindows = () => {
|
||||
saveWindowSize = (windowId) => {
|
||||
const size = $(windowId).getSize();
|
||||
LocalPreferences.set("window_" + windowId + "_width", size.x);
|
||||
LocalPreferences.set("window_" + windowId + "_height", size.y);
|
||||
LocalPreferences.set(`window_${windowId}_width`, size.x);
|
||||
LocalPreferences.set(`window_${windowId}_height`, size.y);
|
||||
};
|
||||
|
||||
loadWindowWidth = (windowId, defaultValue) => {
|
||||
return LocalPreferences.get("window_" + windowId + "_width", defaultValue);
|
||||
return LocalPreferences.get(`window_${windowId}_width`, defaultValue);
|
||||
};
|
||||
|
||||
loadWindowHeight = (windowId, defaultValue) => {
|
||||
return LocalPreferences.get("window_" + windowId + "_height", defaultValue);
|
||||
return LocalPreferences.get(`window_${windowId}_height`, defaultValue);
|
||||
};
|
||||
|
||||
const addClickEvent = (el, fn) => {
|
||||
|
@ -340,8 +340,8 @@ const initializeWindows = () => {
|
|||
for (let i = 0; i < hashes.length; ++i) {
|
||||
const hash = hashes[i];
|
||||
const row = torrentsTable.getRow(hash).full_data;
|
||||
const origValues = row.ratio_limit + "|" + row.seeding_time_limit + "|" + row.inactive_seeding_time_limit + "|"
|
||||
+ row.max_ratio + "|" + row.max_seeding_time + "|" + row.max_inactive_seeding_time;
|
||||
const origValues = `${row.ratio_limit}|${row.seeding_time_limit}|${row.inactive_seeding_time_limit}|${row.max_ratio}`
|
||||
+ `|${row.max_seeding_time}|${row.max_inactive_seeding_time}`;
|
||||
|
||||
// initialize value
|
||||
if (shareRatio === null)
|
||||
|
|
|
@ -42,7 +42,7 @@ window.qBittorrent.pathAutofill ??= (() => {
|
|||
|
||||
const showInputSuggestions = (inputElement, names) => {
|
||||
const datalist = document.createElement("datalist");
|
||||
datalist.id = inputElement.id + "Suggestions";
|
||||
datalist.id = `${inputElement.id}Suggestions`;
|
||||
for (const name of names) {
|
||||
const option = document.createElement("option");
|
||||
option.value = name;
|
||||
|
|
|
@ -48,7 +48,7 @@ window.qBittorrent.PiecesBar ??= (() => {
|
|||
const PiecesBar = new Class({
|
||||
initialize: (pieces, parameters) => {
|
||||
const vals = {
|
||||
id: "piecesbar_" + (piecesBarUniqueId++),
|
||||
id: `piecesbar_${piecesBarUniqueId++}`,
|
||||
width: 0,
|
||||
height: 0,
|
||||
downloadingColor: "hsl(110deg 94% 27%)", // @TODO palette vars not supported for this value, apply average
|
||||
|
|
|
@ -40,7 +40,7 @@ window.qBittorrent.ProgressBar ??= (() => {
|
|||
const ProgressBar = new Class({
|
||||
initialize: (value, parameters) => {
|
||||
const vals = {
|
||||
id: "progressbar_" + (progressBars++),
|
||||
id: `progressbar_${progressBars++}`,
|
||||
value: [value, 0].pick(),
|
||||
width: 0,
|
||||
height: 0,
|
||||
|
|
|
@ -127,13 +127,13 @@ window.qBittorrent.PropFiles ??= (() => {
|
|||
};
|
||||
|
||||
const isDownloadCheckboxExists = (id) => {
|
||||
return $("cbPrio" + id) !== null;
|
||||
return $(`cbPrio${id}`) !== null;
|
||||
};
|
||||
|
||||
const createDownloadCheckbox = (id, fileId, checked) => {
|
||||
const checkbox = document.createElement("input");
|
||||
checkbox.type = "checkbox";
|
||||
checkbox.id = "cbPrio" + id;
|
||||
checkbox.id = `cbPrio${id}`;
|
||||
checkbox.setAttribute("data-id", id);
|
||||
checkbox.setAttribute("data-file-id", fileId);
|
||||
checkbox.className = "DownloadedCB";
|
||||
|
@ -144,7 +144,7 @@ window.qBittorrent.PropFiles ??= (() => {
|
|||
};
|
||||
|
||||
const updateDownloadCheckbox = (id, checked) => {
|
||||
const checkbox = $("cbPrio" + id);
|
||||
const checkbox = $(`cbPrio${id}`);
|
||||
updateCheckbox(checkbox, checked);
|
||||
};
|
||||
|
||||
|
@ -163,7 +163,7 @@ window.qBittorrent.PropFiles ??= (() => {
|
|||
};
|
||||
|
||||
const isPriorityComboExists = (id) => {
|
||||
return $("comboPrio" + id) !== null;
|
||||
return $(`comboPrio${id}`) !== null;
|
||||
};
|
||||
|
||||
const createPriorityCombo = (id, fileId, selectedPriority) => {
|
||||
|
@ -176,7 +176,7 @@ window.qBittorrent.PropFiles ??= (() => {
|
|||
};
|
||||
|
||||
const select = document.createElement("select");
|
||||
select.id = "comboPrio" + id;
|
||||
select.id = `comboPrio${id}`;
|
||||
select.setAttribute("data-id", id);
|
||||
select.setAttribute("data-file-id", fileId);
|
||||
select.classList.add("combo_priority");
|
||||
|
@ -196,7 +196,7 @@ window.qBittorrent.PropFiles ??= (() => {
|
|||
};
|
||||
|
||||
const updatePriorityCombo = (id, selectedPriority) => {
|
||||
const combobox = $("comboPrio" + id);
|
||||
const combobox = $(`comboPrio${id}`);
|
||||
if (Number(combobox.value) !== selectedPriority)
|
||||
selectComboboxPriority(combobox, selectedPriority);
|
||||
};
|
||||
|
@ -324,10 +324,10 @@ window.qBittorrent.PropFiles ??= (() => {
|
|||
});
|
||||
|
||||
const ignore = (priority === FilePriority.Ignored);
|
||||
ids.forEach((_id) => {
|
||||
torrentFilesTable.setIgnored(_id, ignore);
|
||||
ids.forEach((id) => {
|
||||
torrentFilesTable.setIgnored(id, ignore);
|
||||
|
||||
const combobox = $("comboPrio" + _id);
|
||||
const combobox = $(`comboPrio${id}`);
|
||||
if (combobox !== null)
|
||||
selectComboboxPriority(combobox, priority);
|
||||
});
|
||||
|
@ -522,7 +522,7 @@ window.qBittorrent.PropFiles ??= (() => {
|
|||
const rowIds = [];
|
||||
const fileIds = [];
|
||||
selectedRows.forEach((rowId) => {
|
||||
const elem = $("comboPrio" + rowId);
|
||||
const elem = $(`comboPrio${rowId}`);
|
||||
rowIds.push(rowId);
|
||||
fileIds.push(elem.getAttribute("data-file-id"));
|
||||
});
|
||||
|
@ -558,8 +558,7 @@ window.qBittorrent.PropFiles ??= (() => {
|
|||
icon: "images/qbittorrent-tray.svg",
|
||||
title: "QBT_TR(Renaming)QBT_TR[CONTEXT=TorrentContentTreeView]",
|
||||
loadMethod: "iframe",
|
||||
contentURL: "rename_file.html?hash=" + hash + "&isFolder=" + node.isFolder
|
||||
+ "&path=" + encodeURIComponent(path),
|
||||
contentURL: `rename_file.html?hash=${hash}&isFolder=${node.isFolder}&path=${encodeURIComponent(path)}`,
|
||||
scrollbars: false,
|
||||
resizable: true,
|
||||
maximizable: false,
|
||||
|
@ -673,7 +672,7 @@ window.qBittorrent.PropFiles ??= (() => {
|
|||
* Show/hide a node's row
|
||||
*/
|
||||
const _hideNode = (node, shouldHide) => {
|
||||
const span = $("filesTablefileName" + node.rowId);
|
||||
const span = $(`filesTablefileName${node.rowId}`);
|
||||
// span won't exist if row has been filtered out
|
||||
if (span === null)
|
||||
return;
|
||||
|
@ -685,7 +684,7 @@ window.qBittorrent.PropFiles ??= (() => {
|
|||
* Update a node's collapsed state and icon
|
||||
*/
|
||||
const _updateNodeState = (node, isCollapsed) => {
|
||||
const span = $("filesTablefileName" + node.rowId);
|
||||
const span = $(`filesTablefileName${node.rowId}`);
|
||||
// span won't exist if row has been filtered out
|
||||
if (span === null)
|
||||
return;
|
||||
|
@ -700,7 +699,7 @@ window.qBittorrent.PropFiles ??= (() => {
|
|||
};
|
||||
|
||||
const _isCollapsed = (node) => {
|
||||
const span = $("filesTablefileName" + node.rowId);
|
||||
const span = $(`filesTablefileName${node.rowId}`);
|
||||
if (span === null)
|
||||
return true;
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ window.qBittorrent.PropPeers ??= (() => {
|
|||
icon: "images/qbittorrent-tray.svg",
|
||||
title: "QBT_TR(Add Peers)QBT_TR[CONTEXT=PeersAdditionDialog]",
|
||||
loadMethod: "iframe",
|
||||
contentURL: "addpeers.html?hash=" + hash,
|
||||
contentURL: `addpeers.html?hash=${hash}`,
|
||||
scrollbars: false,
|
||||
resizable: false,
|
||||
maximizable: false,
|
||||
|
|
|
@ -177,7 +177,7 @@ window.qBittorrent.PropTrackers ??= (() => {
|
|||
icon: "images/qbittorrent-tray.svg",
|
||||
title: "QBT_TR(Add trackers)QBT_TR[CONTEXT=TrackersAdditionDialog]",
|
||||
loadMethod: "iframe",
|
||||
contentURL: "addtrackers.html?hash=" + current_hash,
|
||||
contentURL: `addtrackers.html?hash=${current_hash}`,
|
||||
scrollbars: true,
|
||||
resizable: false,
|
||||
maximizable: false,
|
||||
|
@ -202,7 +202,7 @@ window.qBittorrent.PropTrackers ??= (() => {
|
|||
icon: "images/qbittorrent-tray.svg",
|
||||
title: "QBT_TR(Tracker editing)QBT_TR[CONTEXT=TrackerListWidget]",
|
||||
loadMethod: "iframe",
|
||||
contentURL: "edittracker.html?hash=" + current_hash + "&url=" + trackerUrl,
|
||||
contentURL: `edittracker.html?hash=${current_hash}&url=${trackerUrl}`,
|
||||
scrollbars: true,
|
||||
resizable: false,
|
||||
maximizable: false,
|
||||
|
|
|
@ -150,7 +150,7 @@ window.qBittorrent.PropWebseeds ??= (() => {
|
|||
id: "webseedsPage",
|
||||
title: "QBT_TR(Add web seeds)QBT_TR[CONTEXT=HttpServer]",
|
||||
loadMethod: "iframe",
|
||||
contentURL: "addwebseeds.html?hash=" + current_hash,
|
||||
contentURL: `addwebseeds.html?hash=${current_hash}`,
|
||||
scrollbars: true,
|
||||
resizable: false,
|
||||
maximizable: false,
|
||||
|
@ -179,7 +179,7 @@ window.qBittorrent.PropWebseeds ??= (() => {
|
|||
id: "webseedsPage",
|
||||
title: "QBT_TR(Web seed editing)QBT_TR[CONTEXT=PropertiesWidget]",
|
||||
loadMethod: "iframe",
|
||||
contentURL: "editwebseed.html?hash=" + current_hash + "&url=" + encodeURIComponent(webseedUrl),
|
||||
contentURL: `editwebseed.html?hash=${current_hash}&url=${encodeURIComponent(webseedUrl)}`,
|
||||
scrollbars: true,
|
||||
resizable: false,
|
||||
maximizable: false,
|
||||
|
|
|
@ -159,7 +159,7 @@ window.qBittorrent.MultiRename ??= (() => {
|
|||
// Get file extension and reappend the "." (only when the file has an extension)
|
||||
let fileExtension = window.qBittorrent.Filesystem.fileExtension(row.original);
|
||||
if (fileExtension)
|
||||
fileExtension = "." + fileExtension;
|
||||
fileExtension = `.${fileExtension}`;
|
||||
|
||||
const fileNameWithoutExt = row.original.slice(0, row.original.lastIndexOf(fileExtension));
|
||||
|
||||
|
|
|
@ -1824,42 +1824,42 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
|||
|
||||
const addWatchFolder = (folder = "", sel = "default_folder", other = "") => {
|
||||
const pos = $("watched_folders_tab").getChildren("tbody")[0].getChildren("tr").length;
|
||||
const myinput = "<input id='text_watch_" + pos + "' type='text' value='" + folder + "'>";
|
||||
const myinput = `<input id='text_watch_${pos}' type='text' value='${folder}'>`;
|
||||
const disableInput = (sel !== "other");
|
||||
const mycb = "<div class='select-watched-folder-editable'>"
|
||||
+ "<select id ='cb_watch_" + pos + "' onchange='qBittorrent.Preferences.changeWatchFolderSelect(this)'>"
|
||||
+ "<option value='watch_folder'>QBT_TR(Monitored folder)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
|
||||
+ "<option value='default_folder'>QBT_TR(Default save location)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
|
||||
+ "<option value='other'>QBT_TR(Other...)QBT_TR[CONTEXT=ScanFoldersModel]</option>"
|
||||
+ "</select>"
|
||||
+ "<input id='cb_watch_txt_" + pos + "' type='text' " + (disableInput ? "hidden " : "") + "/>"
|
||||
+ "<img src='images/list-add.svg' id='addFolderImg_" + pos + "' alt='Add' style='padding-left:170px;width:16px;cursor:pointer;' onclick='qBittorrent.Preferences.addWatchFolder();'>"
|
||||
+ "</div>";
|
||||
const mycb = `<div class='select-watched-folder-editable'>`
|
||||
+ `<select id ='cb_watch_${pos}' onchange='qBittorrent.Preferences.changeWatchFolderSelect(this);'>`
|
||||
+ `<option value='watch_folder'>QBT_TR(Monitored folder)QBT_TR[CONTEXT=ScanFoldersModel]</option>`
|
||||
+ `<option value='default_folder'>QBT_TR(Default save location)QBT_TR[CONTEXT=ScanFoldersModel]</option>`
|
||||
+ `<option value='other'>QBT_TR(Other...)QBT_TR[CONTEXT=ScanFoldersModel]</option>`
|
||||
+ `</select>`
|
||||
+ `<input id='cb_watch_txt_${pos}' type='text' ${disableInput ? "hidden " : ""}/>`
|
||||
+ `<img src='images/list-add.svg' id='addFolderImg_${pos}' alt='Add' style='padding-left:170px;width:16px;cursor:pointer;' onclick='qBittorrent.Preferences.addWatchFolder();'>`
|
||||
+ `</div>`;
|
||||
|
||||
watchedFoldersTable.push([myinput, mycb]);
|
||||
$("cb_watch_" + pos).value = sel;
|
||||
$(`cb_watch_${pos}`).value = sel;
|
||||
if (disableInput) {
|
||||
const elt = $("cb_watch_" + pos);
|
||||
const elt = $(`cb_watch_${pos}`);
|
||||
other = elt.options[elt.selectedIndex].textContent;
|
||||
}
|
||||
$("cb_watch_txt_" + pos).value = other;
|
||||
$(`cb_watch_txt_${pos}`).value = other;
|
||||
|
||||
// hide previous img
|
||||
if (pos > 0)
|
||||
$("addFolderImg_" + (pos - 1)).style.display = "none";
|
||||
$(`addFolderImg_${pos - 1}`).style.display = "none";
|
||||
};
|
||||
|
||||
const getWatchedFolders = () => {
|
||||
const nb_folders = $("watched_folders_tab").getChildren("tbody")[0].getChildren("tr").length;
|
||||
const folders = new Hash();
|
||||
for (let i = 0; i < nb_folders; ++i) {
|
||||
const fpath = $("text_watch_" + i).value.trim();
|
||||
const fpath = $(`text_watch_${i}`).value.trim();
|
||||
if (fpath.length > 0) {
|
||||
const sel = $("cb_watch_" + i).value.trim();
|
||||
const sel = $(`cb_watch_${i}`).value.trim();
|
||||
|
||||
let other;
|
||||
if (sel === "other")
|
||||
other = $("cb_watch_txt_" + i).value.trim();
|
||||
other = $(`cb_watch_txt_${i}`).value.trim();
|
||||
else
|
||||
other = (sel === "watch_folder") ? 0 : 1;
|
||||
|
||||
|
@ -2096,7 +2096,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
|||
const time_padding = (val) => {
|
||||
let ret = val.toString();
|
||||
if (ret.length === 1)
|
||||
ret = "0" + ret;
|
||||
ret = `0${ret}`;
|
||||
return ret;
|
||||
};
|
||||
|
||||
|
|
|
@ -343,7 +343,7 @@
|
|||
icon: "images/qbittorrent-tray.svg",
|
||||
title: "QBT_TR(Please type a RSS feed URL)QBT_TR[CONTEXT=RSSWidget]",
|
||||
loadMethod: "iframe",
|
||||
contentURL: "newfeed.html?path=" + encodeURIComponent(path),
|
||||
contentURL: `newfeed.html?path=${encodeURIComponent(path)}`,
|
||||
scrollbars: false,
|
||||
resizable: false,
|
||||
maximizable: false,
|
||||
|
@ -371,7 +371,7 @@
|
|||
icon: "images/qbittorrent-tray.svg",
|
||||
title: "QBT_TR(Please choose a folder name)QBT_TR[CONTEXT=RSSWidget]",
|
||||
loadMethod: "iframe",
|
||||
contentURL: "newfolder.html?path=" + encodeURIComponent(path),
|
||||
contentURL: `newfolder.html?path=${encodeURIComponent(path)}`,
|
||||
scrollbars: false,
|
||||
resizable: false,
|
||||
maximizable: false,
|
||||
|
@ -449,7 +449,7 @@
|
|||
// Place in iframe with sandbox attribute to prevent js execution
|
||||
const torrentDescription = document.createRange().createContextualFragment('<iframe sandbox id="rssDescription"></iframe>');
|
||||
$("rssDetailsView").append(torrentDescription);
|
||||
document.getElementById("rssDescription").srcdoc = '<html><head><link rel="stylesheet" type="text/css" href="css/style.css"></head><body>' + article.description + "</body></html>";
|
||||
document.getElementById("rssDescription").srcdoc = `<html><head><link rel="stylesheet" type="text/css" href="css/style.css"></head><body>${article.description}</body></html>`;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -475,7 +475,7 @@
|
|||
if (!Object.hasOwn(current, child))
|
||||
continue;
|
||||
|
||||
const currentFullName = fullName ? (fullName + "\\" + child) : child;
|
||||
const currentFullName = fullName ? `${fullName}\\${child}` : child;
|
||||
if (current[child].uid !== undefined) {
|
||||
current[child].name = child;
|
||||
current[child].isFolder = false;
|
||||
|
@ -733,7 +733,7 @@
|
|||
icon: "images/qbittorrent-tray.svg",
|
||||
title: "QBT_TR(Please choose a new name for this RSS feed)QBT_TR[CONTEXT=RSSWidget]",
|
||||
loadMethod: "iframe",
|
||||
contentURL: "rename_feed.html?oldPath=" + encodeURIComponent(oldPath),
|
||||
contentURL: `rename_feed.html?oldPath=${encodeURIComponent(oldPath)}`,
|
||||
scrollbars: false,
|
||||
resizable: false,
|
||||
maximizable: false,
|
||||
|
@ -769,7 +769,7 @@
|
|||
icon: "images/qbittorrent-tray.svg",
|
||||
title: "QBT_TR(Deletion confirmation)QBT_TR[CONTEXT=RSSWidget]",
|
||||
loadMethod: "iframe",
|
||||
contentURL: "confirmfeeddeletion.html?paths=" + encodeURIComponent(encodedPaths.join("|")),
|
||||
contentURL: `confirmfeeddeletion.html?paths=${encodeURIComponent(encodedPaths.join("|"))}`,
|
||||
scrollbars: false,
|
||||
resizable: false,
|
||||
maximizable: false,
|
||||
|
|
|
@ -375,17 +375,17 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
|
|||
// recalculate height
|
||||
const warningHeight = $("rssDownloaderDisabled").getBoundingClientRect().height;
|
||||
|
||||
$("leftRssDownloaderColumn").style.height = "calc(100% - " + warningHeight + "px)";
|
||||
$("centerRssDownloaderColumn").style.height = "calc(100% - " + warningHeight + "px)";
|
||||
$("rightRssDownloaderColumn").style.height = "calc(100% - " + warningHeight + "px)";
|
||||
$("leftRssDownloaderColumn").style.height = `calc(100% - ${warningHeight}px)`;
|
||||
$("centerRssDownloaderColumn").style.height = `calc(100% - ${warningHeight}px)`;
|
||||
$("rightRssDownloaderColumn").style.height = `calc(100% - ${warningHeight}px)`;
|
||||
|
||||
$("rulesTable").style.height = "calc(100% - " + $("rulesTableDesc").getBoundingClientRect().height + "px)";
|
||||
$("rssDownloaderArticlesTable").style.height = "calc(100% - " + $("articleTableDesc").getBoundingClientRect().height + "px)";
|
||||
$("rulesTable").style.height = `calc(100% - ${$("rulesTableDesc").getBoundingClientRect().height}px)`;
|
||||
$("rssDownloaderArticlesTable").style.height = `calc(100% - ${$("articleTableDesc").getBoundingClientRect().height}px)`;
|
||||
|
||||
const centerRowNotTableHeight = $("saveButton").getBoundingClientRect().height
|
||||
+ $("ruleSettings").getBoundingClientRect().height + 15;
|
||||
|
||||
$("rssDownloaderFeeds").style.height = "calc(100% - " + centerRowNotTableHeight + "px)";
|
||||
$("rssDownloaderFeeds").style.height = `calc(100% - ${centerRowNotTableHeight}px)`;
|
||||
|
||||
// firefox calculates the height of the table inside fieldset differently and thus doesn't need the offset
|
||||
if (navigator.userAgent.toLowerCase().includes("firefox")) {
|
||||
|
@ -393,7 +393,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
|
|||
}
|
||||
else {
|
||||
const outsideTableHeight = ($("rssDownloaderFeedsTable").getBoundingClientRect().top - $("rssDownloaderFeeds").getBoundingClientRect().top) - 10;
|
||||
$("rssDownloaderFeedsTable").style.height = "calc(100% - " + outsideTableHeight + "px)";
|
||||
$("rssDownloaderFeedsTable").style.height = `calc(100% - ${outsideTableHeight}px)`;
|
||||
}
|
||||
|
||||
const rssDownloaderRuleContextMenu = new window.qBittorrent.ContextMenu.RssDownloaderRuleContextMenu({
|
||||
|
@ -547,7 +547,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
|
|||
icon: "images/qbittorrent-tray.svg",
|
||||
title: "QBT_TR(Rule renaming)QBT_TR[CONTEXT=AutomatedRssDownloader]",
|
||||
loadMethod: "iframe",
|
||||
contentURL: "rename_rule.html?rule=" + encodeURIComponent(rule),
|
||||
contentURL: `rename_rule.html?rule=${encodeURIComponent(rule)}`,
|
||||
scrollbars: false,
|
||||
resizable: false,
|
||||
maximizable: false,
|
||||
|
@ -570,7 +570,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
|
|||
icon: "images/qbittorrent-tray.svg",
|
||||
title: "QBT_TR(Rule deletion confirmation)QBT_TR[CONTEXT=AutomatedRssDownloader]",
|
||||
loadMethod: "iframe",
|
||||
contentURL: "confirmruledeletion.html?rules=" + encodeURIComponent(encodedRules.join("|")),
|
||||
contentURL: `confirmruledeletion.html?rules=${encodeURIComponent(encodedRules.join("|"))}`,
|
||||
scrollbars: false,
|
||||
resizable: false,
|
||||
maximizable: false,
|
||||
|
@ -586,7 +586,7 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
|
|||
icon: "images/qbittorrent-tray.svg",
|
||||
title: "QBT_TR(New rule name)QBT_TR[CONTEXT=AutomatedRssDownloader]",
|
||||
loadMethod: "iframe",
|
||||
contentURL: "confirmruleclear.html?rules=" + encodeURIComponent(encodedRules.join("|")),
|
||||
contentURL: `confirmruleclear.html?rules=${encodeURIComponent(encodedRules.join("|"))}`,
|
||||
scrollbars: false,
|
||||
resizable: false,
|
||||
maximizable: false,
|
||||
|
@ -818,8 +818,8 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
|
|||
const secondPart = "QBT_TR(An expression with an empty %1 clause (e.g. %2))QBT_TR[CONTEXT=AutomatedRssDownloader]"
|
||||
.replace("%1", "|").replace("%2", "expr|");
|
||||
|
||||
$("mustContainText").title = mainPart + secondPart + "QBT_TR( will match all articles.)QBT_TR[CONTEXT=AutomatedRssDownloader]";
|
||||
$("mustNotContainText").title = mainPart + secondPart + "QBT_TR( will exclude all articles.)QBT_TR[CONTEXT=AutomatedRssDownloader]";
|
||||
$("mustContainText").title = `${mainPart}${secondPart}QBT_TR( will match all articles.)QBT_TR[CONTEXT=AutomatedRssDownloader]`;
|
||||
$("mustNotContainText").title = `${mainPart}${secondPart}QBT_TR( will exclude all articles.)QBT_TR[CONTEXT=AutomatedRssDownloader]`;
|
||||
|
||||
let episodeFilterTitle = "QBT_TR(Matches articles based on episode filter.)QBT_TR[CONTEXT=AutomatedRssDownloader]\n\n"
|
||||
+ "QBT_TR(Example: )QBT_TR[CONTEXT=AutomatedRssDownloader]"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue